# $Id: ITO.spec,v 5.14 2012/09/06 00:04:35 ksb Exp $ # $KeyFile: ${echo:-echo} distrib.m %define _tmpdir /tmp %define _local_prefix /usr/local %define _local_bindir %{_local_prefix}/sbin %define _local_libdir %{_local_prefix}/lib/distrib %define _local_mandir %{_local_prefix}/man/man8 # for signing of packages #%_signature gpg #%_gpg_name FIXME@example.org # %dist should be defined on the target but in case it isn't we can guess one %define distguess %(cat /etc/{redhat,fedora,suse,ubuntu}-release | sed -e 's/Fedora Core/fc@/; s/Fedora/f@/; s/Red Hat[^0-9]*\(Enterprise|Server\)*[^0-9]*/rhel@/; s/Red Hat[^0-9]*/rh/; s/.*Suse[^0-9]*/se@/; s/Ubuntu[^0-9]*/ubuntu@/; s/@[^0-9]*//;s/\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)/\1_\2/; s/[^0-9]*$//') %{!?dist:%define dist .%{distguess}} # Do not generate debugging packages by default - older versions of rpmbuild # (like RehHat 6.2) choke on the line with the percent in the macro name: # We need a sed spell on RH6.x to "s/\(^.define \)%d/\1d/", Sigh. -- ksb %define debug_package %{nil} Name: distrib Version: 5.9 Release: 4%{?dist} BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC tool for the out-dated master source system Group: Utilities License: BSD URL: http://patch.sac.fedex.com/RPMS Source: http://patch.sac.fedex.com/tarball/%{name}-%{version}.tgz BuildRequires: gcc m4 /bin/bash /bin/ksh msrc # Autoreq:0 prevents misleading depencies from being generated. Normally, this # is perfectly sane; however, the system is picking up mk directives and # mkcmd directives as well as system depencies. Autoreq: 0 Requires: gcc bzip2 /bin/ksh msrc rdist m4 %description This was used to drive the MTP system, the accounting system, and the older version of the master source chain. It might still be used by some of those, but not for much longer. %prep %setup -q %build %install umask 022 mkdir -p %{buildroot}/%{_local_bindir} mkdir -p %{buildroot}/%{_local_mandir} mkdir -p %{buildroot}/%{_local_libdir} cat >%{buildroot}/%{_local_libdir}/distrib.cf <<\! # This is a place-holder. Add the "distrib_cf" RPM and follow the # instructions there, or just read about it in the hxmd documentation. # You really want to use msrc and hxmd, not distrib. -- ksb ! F=`mktemp -d /tmp/bmHMXXXXXX` mmsrc -y INTO=$F -Cauto.cf -- make DESTDIR=%{buildroot} install mk -mInstall -D DESTDIR=%{buildroot} *.man rm -rf $F find %{buildroot} -depth -type d -name OLD -exec rm -rf '{}' \; %clean # Do not confilct with the next user of the fixed-path build directory rm -rf %{buildroot} %files %defattr(-,root,root) %{_local_bindir}/%{name} %config %{_local_libdir}/*.cf %doc %{_local_mandir}/ %changelog * Wed Sep 5 2012 KS Braunsdorf - manual page fixes, lots more - white-space and ANSI C extern cleanup in C source files * Fri Aug 17 2012 KS Braunsdorf - manual page updated to current stds - HTML document updated a lot, including links to current tools * Sat Nov 08 2008 KS Braunsdorf - Built the RPM spec file and added it to the msrc cache