wok-6.x annotate nail/receipt @ rev 10352

bash: make it cross compile!
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 22 22:38:05 2011 +0200 (2011-05-22)
parents 454a730fce46
children 749ffdd335d7
rev   line source
sygne@996 1 # SliTaz package receipt.
sygne@996 2
sygne@996 3 PACKAGE="nail"
sygne@1679 4 VERSION="12.4"
sygne@996 5 CATEGORY="network"
sygne@996 6 SHORT_DESC="Text mode mail user agent."
sygne@996 7 MAINTAINER="sygne@ombres.eu"
sygne@2830 8 DEPENDS="openssl"
sygne@2034 9 BUILD_DEPENDS="openssl-dev"
sygne@996 10 SOURCE="mailx"
sygne@996 11 TARBALL="$SOURCE-$VERSION.tar.bz2"
sygne@996 12 WEB_SITE="http://heirloom.sourceforge.net/mailx.html"
sygne@2034 13 WGET_URL="$SF_MIRROR/heirloom/$TARBALL"
sygne@2830 14 CONFIG_FILES="/etc/nailrc"
jozee@4969 15 TAGS="email imap pop3"
sygne@996 16
sygne@996 17 # Rules to configure and make the package.
sygne@996 18 compile_rules()
sygne@996 19 {
sygne@996 20 cd $src
pascal@5540 21 sed -i 's/static int smime/#define STACK STACK_OF(X509_NAME)\n&/' openssl.c
sygne@2034 22
sygne@2034 23 # avoid compiling with kerberos authentification:
sygne@2034 24 make config.h
sygne@2034 25 sed -i -e "/GSSAPI/d" config.h
sygne@2034 26 sed -i -e "/gssapi/d" config.h
sygne@2830 27 sed -i -e "s/-lgssapi_krb5//g" LIBS
sygne@996 28
sygne@996 29 make install UCBINSTALL=/usr/bin/install \
sygne@2034 30 DESTDIR=$PWD/_pkg PREFIX=/usr
sygne@996 31 }
sygne@996 32
sygne@996 33 # Rules to gen a SliTaz package suitable for Tazpkg.
sygne@996 34 genpkg_rules()
sygne@996 35 {
sygne@996 36 mkdir -p $fs/usr
sygne@996 37 cp -r $_pkg/usr/bin $fs/usr
sygne@996 38 mv $fs/usr/bin/mailx $fs/usr/bin/nail
sygne@996 39
sygne@996 40 cp -r $_pkg/etc $fs
sygne@996 41 }
sygne@996 42
sygne@996 43 # Post install commands for Tazpkg.
sygne@996 44 # Check mailx
sygne@996 45 post_install()
sygne@996 46 {
pascal@1137 47 . $1/etc/init.d/rc.functions
sygne@996 48
pascal@1137 49 if [ -e $1/usr/bin/mailx ]; then
sygne@996 50 echo ""
sygne@996 51 echo "/usr/bin/mailx exists"
sygne@996 52 echo -n "Do you want /usr/bin/nail for /usr/bin/mailx (y/N) ? : "
sygne@996 53 read anser
sygne@996 54 if [ "$anser" == "y" ]; then
sygne@996 55 echo ""
sygne@996 56 echo -n "linking /usr/bin/mailx to /usr/bin/nail"
pascal@1137 57 rm $1/usr/bin/mailx
pascal@1137 58 ln -s /usr/bin/nail $1/usr/bin/mailx
sygne@996 59 status
sygne@996 60 else
sygne@996 61 echo ""
sygne@996 62 echo "Doing nothing with /usr/bin/mailx"
sygne@996 63 echo ""
sygne@996 64 fi
sygne@996 65 else
sygne@996 66 echo -n "linking /usr/bin/mailx to /usr/bin/nail"
pascal@1137 67 ln -s /usr/bin/nail $1/usr/bin/mailx
sygne@996 68 status
sygne@996 69 fi
sygne@996 70 }