# $Id: ITO.spec,v 1.17 2012/07/08 21:31:22 ksb Exp $ # $KeyFile: ${echo:-echo} glob.m %define _local_prefix /usr/local %define _local_bindir %{_local_prefix}/bin %define _local_mandir %{_local_prefix}/man/man1 # 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: %define debug_package %{nil} Name: glob Version: 1.8 Release: 2%{?dist} BuildRoot: /tmp/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC tool for matching huge file lists in automation 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 mk # 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 msrc mk %description Some automated clean-up tasks stop working when they overflow the argv max, this prevents that. Any script that uses it depends on this RPM. %prep %setup -q %build %install mkdir -p %{buildroot}/usr/local/bin %{buildroot}/usr/local/man/man1 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} -depth -type d -name OLD -exec rm -rf {} \; %clean rm -rf %{buildroot} %files %defattr(-,root,root) %{_local_bindir}/ %doc %{_local_mandir}/ %changelog * Sun Jul 8 2012 KS Braunsdorf - an actual bug in a realloc(3), forgot a *sizeof in it. My Bad. * Thu Feb 2 2012 KS Braunsdorf - added -m, which I like a lot. * Tue May 3 2011 KS Braunsdorf - updated manual page with better usage. More oue an -s examples. * Tue Nov 18 2008 KS Braunsdorf - man sure the manual page get there. * Sat Nov 12 2008 ksb and anderson - Better build options, more sane package * Sat Nov 08 2008 ksb and anderson - cleaned up the style a lot * Sat Nov 08 2008 ksb and anderson - Built the RPM spec file and added it to the msrc cache