# $Id: ITO.spec,v 1.1 2011/11/11 15:22:50 ksb Exp $ # $KeyFile: ${echo:-echo} Makefile.host %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: # We need a sed spell on RH6.x to "s/\(^.define \)%d/\1d/", Sigh. -- ksb %define debug_package %{nil} Name: entomb-rm Version: 1.5 Release: 1%{?dist} BuildRoot: /tmp/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC Entombing build for GNU rm, mv, and cp 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_base entomb_base mk mktemp # 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_base entomb_base %description This is an example build to make the coreutils versions of rm, mv, and cp use entombing to allow mortal logins to recover deleted files. Mostly used as an example of how to make msrc build GNU products. %prep %setup %build %install mkdir -p %{buildroot}/usr/local/man/man1 mkdir -p %{buildroot}/usr/local/bin F=`mktemp -d /tmp/bmHMXXXXXX` PATH=$PATH:/usr/local/bin:/usr/local/sbin mmsrc -y INTO=$F -Cauto.cf -- make DESTDIR=%{buildroot} all # we do NOT install the files, source only 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 * Fri Nov 11 2011 KS Braunsdorf - Built the RPM spec file and added it to the msrc cache - This is really just a stub to get the source for the example into - the standard format (as it doesn't really install the results).