# $Id: ITO.spec,v 4.43 2012/07/03 20:28:36 ksb Exp $ # $KeyFile: ${echo:-echo} level2s %define _local_prefix /usr/local %define _local_bindir %{_local_prefix}/sbin %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: level2s Version: 4.45 Release: 1%{?dist} BuildRoot: /tmp/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC tool for building level2 packages and RPMs from those Group: Utilities License: BSD URL: http://patch.sac.fedex.com/RPMS Source: http://patch.sac.fedex.com/tarball/%{name}-%{version}.tgz BuildRequires: gcc /bin/ksh 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: 0 Requires: gcc /bin/ksh msrc_base install_base tar diffutils rcsvg msync Provides: verof %description Only customers that need to replicate the RPM build environment, or the master source environment, need this product. This packages a master source directory (at level two configuration management) into a "tar ball" that can be fed to RPM build. In fact it builds the tar file for this RPM, as well as the RPM itself. Now that's eating your own dog food. %prep %setup -q %build %install umask 022 mkdir -p %{buildroot}/usr/local/man/man8 %{buildroot}/usr/local/sbin F=`mktemp -d /tmp/bmHMXXXXXX` mmsrc -y INTO=$F -Cauto.cf -- make DESTDIR=%{buildroot} install mk -mInstall -D DESTDIR=%{buildroot} %{name}.man rm -rf $F find %{buildroot} -type d -name OLD -depth -exec rm -rf {} \; %clean rm -rf %{buildroot} %files %defattr(-,root,root) %{_local_bindir}/%{name} %doc %{_local_mandir}/%{name}.* %changelog * Tue Jul 3 2012 KS Braunsdorf - added -l0 to mk calls and added some missing shell double-quote * Thu May 10 2012 KS Braunsdorf - the path to the Pkgs directory was a local spelling, not the real one * Thu Mar 8 2012 KS Braunsdorf - missing help line for "list" verb, extra tab in msrc recipe * Thu Dec 30 2010 KS Braunsdorf - added ${SOURCE} group support - chain to level3s when we should - document "restore" subcommand with an example * Thu Nov 11 2010 KS Braunsdorf and Ed Anderson - added some support for the {osdist} macro Alex wants * Wed Dec 10 2008 KS Braunsdorf - level2s build updated to not need the Products file * Tue Nov 18 2008 KS Braunsdorf - upgraded to better packaging * Sat Nov 08 2008 KS Braunsdorf - Built the RPM spec file and added it to the msrc cache