# $Id: ITO.spec,v 1.6 2012/08/12 15:13:40 ksb Exp $ # $KeyFile: ${echo:-echo} msrcmux.pl %define _tmpdir /tmp %define _local_prefix /usr/local %define _local_bindir %{_local_prefix}/libexec %define _local_mandir %{_local_prefix}/man/man7 # 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: msrcmux Version: 1.8 Release: 1%{?dist} BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC service to extrat configured shadow source over tcmpux Group: Applications/System License: BSD BuildRequires: gcc m4 msrc_base install_base # 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: 1 Requires: /bin/ksh msrc_base perl %description You only need this is you want let clients pull from your master source repositoy on-deman to configure platform (shadow) copies of products from the server. Otherwise you can use mpull, which configures the pulled source on the client with the local auto.cf. %prep %setup -q %build umask 022 mkdir -p $RPM_BUILD_ROOT/%{_local_bindir} mkdir -p $RPM_BUILD_ROOT/%{_local_mandir} %install F=`mktemp -d /var/tmp/bmHMXXXXXX` mmsrc -y INTO=$F -Cauto.cf -- make DESTDIR=$RPM_BUILD_ROOT install mk -mInstall -D DESTDIR=$RPM_BUILD_ROOT *.man rm -rf $F find $RPM_BUILD_ROOT -type d -depth -name OLD -exec rm -rf \{\} \; %clean # Do not confilct with the next user of the fixed-path build directory [ / != "%{buildroot}" ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %{_local_bindir}/%{name} %doc %{_local_mandir}/ %changelog * Sun Aug 12 2012 KS Braunsdorf - fixed the HTML document's spelling, markup, and links - now the missing reverse name is '@' which works way better - (any host without a reverse used '*' which mk matched too agressively) * Tue Jun 26 2012 KS Braunsdorf - added -X, -Z and fixed the manual page formatting an content - should depricate -L in favor of the environment list - hxmd's -Zmux.zf hook allows leverage in auto.cf to remember the pull source * Mon Jun 18 2012 KS Braunsdorf - added -R because it is need that at most sites, viz. for 1918 IPs - the above also creates a depend on mk (from install_base) * Wed Mar 21 2012 KS Braunsdorf - added the env=value sets at the end of the command to set $PATH or the like * Wed Mar 14 2012 KS Braunsdorf - Built the RPM spec file and added it to the msrc cache