# $Id: ITO.spec,v 1.21 2012/09/03 19:13:34 ksb Exp $ # $KeyFile: ${echo:-echo} efmd.m %define _tmpdir /tmp %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: efmd Version: 1.21 Release: 1%{?dist} BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC tool that builds repors from hxmd meta data Group: Utilities License: BSD URL: http://patch.sac.fedex.com/RPMS Source: http://patch.sac.fedex.com/tarball/%{name}-%{version}.tgz 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 install_base %description Commonly used as a configuration file filter for sites that keep a lot of local configuration data in msrc (aka hxmd) files, and might generate reports via hxmd. This is faster and allows some more markup hxmd, but is otherwise compatible. It also knows how to trigger hxmd cache directories (which might useful for sanity checks). %prep %setup -q %build %install umask 022 mkdir -p %{buildroot}/%{_local_bindir} mkdir -p %{buildroot}/%{_local_mandir} 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} %doc %{_local_mandir}/ %changelog * Mon Sep 3 2012 KS Braunsdorf - moved to the new mkcmd "api" name-space, as mmsrc should do a well. * Thu Aug 9 2012 KS Braunsdorf - port to Darwin (MacOS 10.7+), mostly printf width lint * Tue Jul 3 2012 KS Braunsdorf - upgraded to match the new until_fsearch.m interface (following mmsrc/hxmd) * Thu Dec 23 2010 KS Braunsdorf - make -j -- use progname to find the include file (like hxmd) * Wed Dec 22 2010 KS Braunsdorf and Nathan Rivers - made -j --/some.m4 search like -I does, fixed html docs. * Wed Nov 3 2010 KS Braunsdorf - fixed a regression in the HXMD_PHASE code, we added it to argv, not m4's copy * Fri Oct 1 2010 KS Braunsdorf - changed to newer hostdb.m and s/HXMD_PATH/HXMD_LIB/ to match hxmd * Fri Aug 6 2010 KS Braunsdorf - cleaned up some white space bugs (multiple spaces for tabs) - added HXMD_PHASE ("selection", and "output" in this program) - made -n output a lot more useful as we pass -D, -U, -j on - nit: we output a comment for -I, because there m4 macro change include path * Fri Dec 18 2009 KS Braunsdorf - moved some code around into hostdb.m and added make gadget (cache) support * Fri Jan 23 2009 KS Braunsdorf - Built the RPM spec file and added it to the msrc cache