# $Id: ITO.spec,v 2.3 2012/11/06 17:28:18 ksb Exp $ # $KeyFile: ${echo:-echo} Tee.m %define _tmpdir /tmp %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: Tee Version: 2.18 Release: 1%{?dist} BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC tool for "big Tee", advanced pipe fitment Group: Applications/System 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: 0 Requires: /bin/ksh install_base %description When a stream needs to be diverted to more than one destination a simple redirection won't do. Tee duplicates a stream standard output as well as to one or more files. The files may be filenames or shell commands when prefixed by a pipe (|). %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 * Tue Nov 6 2012 KS Braunsdorf - fixed -R default to be a square root of spigots - manual page format fixes * Thu Aug 9 2012 KS Braunsdorf - ported to DARWIN (MacOS 10.7+) * Fri May 20 2011 KS Braunsdorf - made -R docs more clear and split the resource between hubs better - an explicit -R is stronger than a default - allow a specification of >file (>>file) to reset (set) -a for a file param - don't attach to any tty devices specified - explicity toss the return of read/write to make -Wall happy * Wed May 18 2011 KS Braunsdorf - added the pipering code, and made it actually work. - Not as good as it was on older HP-UX hosts, but at ~900 bytes, who cares. - made -v work under -R, oops. * Wed Nov 19 2008 Ed Anderson - Built the RPM spec file and added it to the msrc cache