#!/bin/sh CWD=`pwd` TMP=/tmp VERSION=12.4 ARCH=alpha BUILD=1 PKG=$TMP/package-mailx rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf mailx-$VERSION tar xjf $CWD/mailx-$VERSION.tar.bz2 cd mailx-$VERSION chown -R root:root . find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; make CFLAGS=-O2 PREFIX=/usr MANDIR=/usr/man MAILSPOOL=/var/spool/mail UCBINSTALL=/usr/bin/install SENDMAIL=/usr/sbin/sendmail make install CFLAGS=-O2 PREFIX=/usr MANDIR=/usr/man MAILSPOOL=/var/spool/mail UCBINSTALL=/usr/bin/install SENDMAIL=/usr/sbin/sendmail DESTDIR=$PKG # We put symlinks in /bin since some things still expect '/bin/mail' or '/bin/Mail': mkdir -p $PKG/bin ( cd $PKG/bin ln -sf /usr/bin/mailx Mail ln -sf /usr/bin/mailx mail ln -sf /usr/bin/mailx nail ) # Likewise, we make some compat symlinks in /usr/bin: ( cd $PKG/usr/bin ln -sf mailx Mail ln -sf mailx mail ln -sf mailx nail ) mv $PKG/etc/nail.rc $PKG/etc/nail.rc.new strip $PKG/usr/bin/mailx gzip -9 $PKG/usr/man/man1/* # Manpage links: ( cd $PKG/usr/man/man1 ln -sf mailx.1.gz mail.1.gz ln -sf mailx.1.gz nail.1.gz ln -sf mailx.1.gz Mail.1.gz ) mkdir -p $PKG/usr/doc/mailx-$VERSION cp -a AUTHORS COPYING ChangeLog INSTALL README TODO $PKG/usr/doc/mailx-$VERSION mkdir -p $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/mailx-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/mailx.build.log