%define version 0.58 Name: mess822 Summary: mess822 is a library for parsing Internet mail messages Version: %{version} Release: 0 Copyright: Unknown Packager: William Stearns Group: System Environment/Daemons Source: http://cr.yp.to/software/mess822-%{version}.tar.gz #Source1: goober.init #Patch0: mess822-path-tmpinstall.patch Patch0: mess822-path.patch #Patch1: goober-2.1-config.patch #Prereq: /sbin/chkconfig logrotate #Buildarch: noarch Vendor: Daniel J. Bernstein URL: http://cr.yp.to/mess822.html BuildRoot: /tmp/mess822-broot %description mess822 is a library for parsing Internet mail messages. The mess822 package contains several applications that work with qmail: - ofmipd rewrites messages from dumb clients. It supports a database of recognized senders and From lines, using cdb for fast lookups. - new-inject is an experimental new version of qmail-inject. It includes a flexible user-controlled hostname rewriting mechanism. - iftocc can be used in .qmail files. It checks whether a known address is listed in To or Cc. - 822header, 822field, 822date, and 822received extract various pieces of information from a mail message. - 822print converts a message into an easier-to-read format. %changelog * Fri Mar 07 2003 William Stearns - First rpm from 0.58 sources. %prep %setup #%setup -n goober #%setup -q -a 1 %patch0 -p1 #%patch0 -p1 -b .make #%patch1 -p1 -b .config %build make %install if [ "$RPM_BUILD_ROOT" = "/tmp/mess822-broot" ]; then rm -rf $RPM_BUILD_ROOT #You've got to be kidding me. #You know, there _are_ shell commands to make directories and copy files. #Not everything in the world needs to be a C program. :-) #make setup check install -d $RPM_BUILD_ROOT/etc install -d $RPM_BUILD_ROOT/usr install -d $RPM_BUILD_ROOT/usr/bin install -d $RPM_BUILD_ROOT/usr/lib install -d $RPM_BUILD_ROOT/usr/include install -d $RPM_BUILD_ROOT/usr/man install -d $RPM_BUILD_ROOT/usr/man/cat1 install -d $RPM_BUILD_ROOT/usr/man/cat3 install -d $RPM_BUILD_ROOT/usr/man/cat5 install -d $RPM_BUILD_ROOT/usr/man/cat8 install -d $RPM_BUILD_ROOT/usr/man/man1 install -d $RPM_BUILD_ROOT/usr/man/man3 install -d $RPM_BUILD_ROOT/usr/man/man5 install -d $RPM_BUILD_ROOT/usr/man/man8 cp -p leapsecs.dat $RPM_BUILD_ROOT/etc/ cp -p ofmipd $RPM_BUILD_ROOT/usr/bin/ cp -p ofmipname $RPM_BUILD_ROOT/usr/bin/ cp -p iftocc $RPM_BUILD_ROOT/usr/bin/ cp -p new-inject $RPM_BUILD_ROOT/usr/bin/ cp -p 822field $RPM_BUILD_ROOT/usr/bin/ cp -p 822header $RPM_BUILD_ROOT/usr/bin/ cp -p 822date $RPM_BUILD_ROOT/usr/bin/ cp -p 822received $RPM_BUILD_ROOT/usr/bin/ cp -p 822print $RPM_BUILD_ROOT/usr/bin/ cp -p mess822.h $RPM_BUILD_ROOT/usr/include/ cp -p mess822.a $RPM_BUILD_ROOT/usr/lib/ cp -p iftocc.0 $RPM_BUILD_ROOT/usr/man/cat1/ cp -p new-inject.0 $RPM_BUILD_ROOT/usr/man/cat1/ cp -p 822field.0 $RPM_BUILD_ROOT/usr/man/cat1/ cp -p 822header.0 $RPM_BUILD_ROOT/usr/man/cat1/ cp -p 822date.0 $RPM_BUILD_ROOT/usr/man/cat1/ cp -p 822received.0 $RPM_BUILD_ROOT/usr/man/cat1/ cp -p 822print.0 $RPM_BUILD_ROOT/usr/man/cat1/ cp -p rewriting.0 $RPM_BUILD_ROOT/usr/man/cat5/ cp -p ofmipd.0 $RPM_BUILD_ROOT/usr/man/cat8/ cp -p ofmipname.0 $RPM_BUILD_ROOT/usr/man/cat8/ cp -p mess822.0 $RPM_BUILD_ROOT/usr/man/cat3/ cp -p mess822_addr.0 $RPM_BUILD_ROOT/usr/man/cat3/ cp -p mess822_date.0 $RPM_BUILD_ROOT/usr/man/cat3/ cp -p mess822_fold.0 $RPM_BUILD_ROOT/usr/man/cat3/ cp -p mess822_quote.0 $RPM_BUILD_ROOT/usr/man/cat3/ cp -p mess822_token.0 $RPM_BUILD_ROOT/usr/man/cat3/ cp -p mess822_when.0 $RPM_BUILD_ROOT/usr/man/cat3/ cp -p iftocc.1 $RPM_BUILD_ROOT/usr/man/man1/ cp -p new-inject.1 $RPM_BUILD_ROOT/usr/man/man1/ cp -p 822field.1 $RPM_BUILD_ROOT/usr/man/man1/ cp -p 822header.1 $RPM_BUILD_ROOT/usr/man/man1/ cp -p 822date.1 $RPM_BUILD_ROOT/usr/man/man1/ cp -p 822received.1 $RPM_BUILD_ROOT/usr/man/man1/ cp -p 822print.1 $RPM_BUILD_ROOT/usr/man/man1/ cp -p rewriting.5 $RPM_BUILD_ROOT/usr/man/man5/ cp -p ofmipd.8 $RPM_BUILD_ROOT/usr/man/man8/ cp -p ofmipname.8 $RPM_BUILD_ROOT/usr/man/man8/ cp -p mess822.3 $RPM_BUILD_ROOT/usr/man/man3/ cp -p mess822_addr.3 $RPM_BUILD_ROOT/usr/man/man3/ cp -p mess822_date.3 $RPM_BUILD_ROOT/usr/man/man3/ cp -p mess822_fold.3 $RPM_BUILD_ROOT/usr/man/man3/ cp -p mess822_quote.3 $RPM_BUILD_ROOT/usr/man/man3/ cp -p mess822_token.3 $RPM_BUILD_ROOT/usr/man/man3/ cp -p mess822_when.3 $RPM_BUILD_ROOT/usr/man/man3/ #install -d $RPM_BUILD_ROOT/etc #install -d $RPM_BUILD_ROOT/etc/rc.d/init.d #install -d $RPM_BUILD_ROOT/sbin #install -d $RPM_BUILD_ROOT/usr/man/man8 #make BINDIR=$RPM_BUILD_ROOT/sbin CONFIG_FILE=$RPM_BUILD_ROOT/etc/goober.conf install #cp -p goober.8 $RPM_BUILD_ROOT/usr/man/man8 #cp -p $RPM_SOURCE_DIR/goober.init $RPM_BUILD_ROOT/etc/rc.d/init.d/goober else echo Invalid Build root \'"$RPM_BUILD_ROOT"\' exit 1 fi %clean if [ "$RPM_BUILD_ROOT" = "/tmp/mess822-broot" ]; then rm -rf $RPM_BUILD_ROOT else echo Invalid Build root \'"$RPM_BUILD_ROOT"\' exit 1 fi %files %defattr(-,root,root) %attr(644,root,root) /etc/leapsecs.dat %attr(755,root,root) /usr/bin/ofmipd %attr(755,root,root) /usr/bin/ofmipname %attr(755,root,root) /usr/bin/iftocc %attr(755,root,root) /usr/bin/new-inject %attr(755,root,root) /usr/bin/822field %attr(755,root,root) /usr/bin/822header %attr(755,root,root) /usr/bin/822date %attr(755,root,root) /usr/bin/822received %attr(755,root,root) /usr/bin/822print %attr(644,root,root) /usr/include/mess822.h %attr(644,root,root) /usr/lib/mess822.a %attr(644,root,root) /usr/man/cat1/iftocc.0 %attr(644,root,root) /usr/man/cat1/new-inject.0 %attr(644,root,root) /usr/man/cat1/822field.0 %attr(644,root,root) /usr/man/cat1/822header.0 %attr(644,root,root) /usr/man/cat1/822date.0 %attr(644,root,root) /usr/man/cat1/822received.0 %attr(644,root,root) /usr/man/cat1/822print.0 %attr(644,root,root) /usr/man/cat5/rewriting.0 %attr(644,root,root) /usr/man/cat8/ofmipd.0 %attr(644,root,root) /usr/man/cat8/ofmipname.0 %attr(644,root,root) /usr/man/cat3/mess822.0 %attr(644,root,root) /usr/man/cat3/mess822_addr.0 %attr(644,root,root) /usr/man/cat3/mess822_date.0 %attr(644,root,root) /usr/man/cat3/mess822_fold.0 %attr(644,root,root) /usr/man/cat3/mess822_quote.0 %attr(644,root,root) /usr/man/cat3/mess822_token.0 %attr(644,root,root) /usr/man/cat3/mess822_when.0 %attr(644,root,root) /usr/man/man1/iftocc.1.gz %attr(644,root,root) /usr/man/man1/new-inject.1.gz %attr(644,root,root) /usr/man/man1/822field.1.gz %attr(644,root,root) /usr/man/man1/822header.1.gz %attr(644,root,root) /usr/man/man1/822date.1.gz %attr(644,root,root) /usr/man/man1/822received.1.gz %attr(644,root,root) /usr/man/man1/822print.1.gz %attr(644,root,root) /usr/man/man5/rewriting.5.gz %attr(644,root,root) /usr/man/man8/ofmipd.8.gz %attr(644,root,root) /usr/man/man8/ofmipname.8.gz %attr(644,root,root) /usr/man/man3/mess822.3.gz %attr(644,root,root) /usr/man/man3/mess822_addr.3.gz %attr(644,root,root) /usr/man/man3/mess822_date.3.gz %attr(644,root,root) /usr/man/man3/mess822_fold.3.gz %attr(644,root,root) /usr/man/man3/mess822_quote.3.gz %attr(644,root,root) /usr/man/man3/mess822_token.3.gz %attr(644,root,root) /usr/man/man3/mess822_when.3.gz %doc BLURB CHANGES INSTALL README THANKS TODO VERSION #%attr(644,root,root) %config /etc/goober.conf #%attr(755,root,root) /etc/rc.d/init.d/goober #%attr(755,root,root) /sbin/goober #%attr(644,root,root) /usr/man/man8/goober.8 # %doc faq/* README ChangeLog QUICKSTART doc/* # %doc contrib/url-normalizer.pl contrib/rredir.* contrib/user-agents.pl #%attr(750,nobody,nobody) %dir /var/log/goober #%attr(750,nobody,nobody) %dir /var/spool/goober #%pre #if [ "$1" = "1" ]; then #This package is being installed for the first time # #pre - $1=1 - first install #else #This is an upgrade # #pre - $1=2 - upgrade (techically, $1>1) #fi # # #%post #if [ "$1" = "1" ]; then #This package is being installed for the first time # /sbin/chkconfig --add goober # if [ -f /etc/rc.d/rc.sysinit ]; then # if [ `cat /etc/rc.d/rc.sysinit | grep devfsd | wc -l` -eq 0 ]; then #If no references to devfs yet # #Add the following lines just after #!/bin/sh or #!/bin/bash. # cat /etc/rc.d/rc.sysinit | sed -e 's@\(#!/bin/.*sh\)@\1\ #if [ -c /dev/.devfsd ]; then #devfsdinstall\ # if ! ps axf | grep [d]evfsd >/dev/null ; then #devfsdinstall\ # #devfs not running yet #devfsdinstall\ # /sbin/devfsd /dev #devfsdinstall\ # fi #devfsdinstall\ #fi #devfsdinstall\ #@' >/etc/rc.d/rc.sysinit.tmp # cat /etc/rc.d/rc.sysinit.tmp >/etc/rc.d/rc.sysinit # rm -f /etc/rc.d/rc.sysinit.tmp # fi # else # echo You don\'t have an /etc/rc.d/rc.sysinit - you will need to add # echo 'if [ -c /dev/.devfsd ]; then' # echo ' if ! ps axf | grep [d]evfsd >/dev/null ; then' # echo ' /sbin/devfsd /dev' # echo ' fi' # echo 'fi' # echo to your initialization scripts, before any filesystem checking is done. # fi #fi #if [ "$1" = "1" ]; then #This package is being installed for the first time # #post - $1=1 - first install #else #This is an upgrade # #post - $1=2 - upgrade (techically, $1>1) #fi #/usr/bin/at 04:00 <0) #fi # # #%postun #if [ "$1" = "0" ]; then #Final removal, not upgrade. # if [ -f /etc/rc.d/rc.sysinit ]; then # if [ `cat /etc/rc.d/rc.sysinit | grep devfsdinstall | wc -l` -gt 0 ]; then # cat /etc/rc.d/rc.sysinit | grep -v devfsdinstall >/etc/rc.d/rc.sysinit.tmp # cat /etc/rc.d/rc.sysinit.tmp >/etc/rc.d/rc.sysinit # rm -f /etc/rc.d/rc.sysinit.tmp # fi # fi #fi # #if [ "$1" = "0" ]; then #This is being completely erased, not upgraded # #postun - $1=0 - final erasure #else #This is an upgrade # #postun - $1=1 - upgrade (techically, $1>0) #fi # ##Here are the scripts run at first install, in this order: ##pre - 1 - first install ##post - 1 - first install # ##Here are the scripts run during an upgrade, in this order: ##pre - 2 - upgrade ##post - 2 - upgrade ##preun - 1 - upgrade ##postun - 1 - upgrade # ##Here are the scripts run at final erase, in this order: ##preun - 0 - final erasure ##postun - 0 - final erasure