wok diff postfix/receipt @ rev 1159

Add postfix
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 27 14:51:29 2008 +0000 (2008-07-27)
parents
children 327fe5ea9abb
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/postfix/receipt	Sun Jul 27 14:51:29 2008 +0000
     1.3 @@ -0,0 +1,105 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="postfix"
     1.7 +VERSION="2.5.2"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="fast, easy to administer, and secure mailer."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.12 +WEB_SITE="http://www.postfix.org/"
    1.13 +WGET_URL="ftp://mir1.ovh.net/ftp.postfix.org/postfix-release/official/$TARBALL"
    1.14 +BUILD_DEPENDS="db-dev openldap-dev pcre-dev"
    1.15 +DEPENDS="libdb libldap pcre"
    1.16 +
    1.17 +# Rules to configure and make the package.
    1.18 +compile_rules()
    1.19 +{
    1.20 +
    1.21 +	cd $src
    1.22 +	make makefiles CCARGS="-DHAS_DB -DHAS_LDAP" AUXLIBS="-ldb -lldap -llber"
    1.23 +	make
    1.24 +	install_root=/home/slitaz/wok/postfix/postfix-2.5.2/_pkg \
    1.25 +		sh postfix-install -non-interactive
    1.26 +}
    1.27 +
    1.28 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.29 +genpkg_rules()
    1.30 +{
    1.31 +	mkdir -p $fs/usr/share/licenses/
    1.32 +	cp -a $_pkg/usr/libexec $fs/usr
    1.33 +	cp -a $_pkg/usr/bin $fs/usr
    1.34 +	cp -a $_pkg/usr/sbin $fs/usr
    1.35 +	cp -a $_pkg/etc $fs
    1.36 +	cp -a $_pkg/var $fs
    1.37 +	mv $fs/etc/postfix/TLS_LICENSE $fs/usr/share/licenses/POSTFIX_TLS_LICENSE
    1.38 +	mv $fs/etc/postfix/LICENSE $fs/usr/share/licenses/POSTFIX_LICENSE
    1.39 +	cp -a stuff/etc/init.d $fs/etc
    1.40 +	chmod 2755 $fs/usr/sbin/postdrop $fs/usr/sbin/postqueue
    1.41 +	rm -f $fs/etc/postfix/post-install $fs/etc/postfix/postfix-files \
    1.42 +		$fs/etc/postfix/postfix-script
    1.43 +}
    1.44 +
    1.45 +# Pre and post install commands for Tazpkg.
    1.46 +post_install()
    1.47 +{
    1.48 +	( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
    1.49 +		$1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
    1.50 +etc/postfix/access
    1.51 +etc/postfix/aliases
    1.52 +etc/postfix/canonical
    1.53 +etc/postfix/generic
    1.54 +etc/postfix/header_checks
    1.55 +etc/postfix/main.cf
    1.56 +etc/postfix/master.cf
    1.57 +etc/postfix/relocated
    1.58 +etc/postfix/transport
    1.59 +etc/postfix/virtual
    1.60 +EOT
    1.61 +        # adduser postfix if needed
    1.62 +	if ! grep -q postfix $1/etc/passwd; then
    1.63 +		echo -n "Adding user postfix..."
    1.64 +		chroot $1/ adduser postfix -D -H -S
    1.65 +		status
    1.66 +	fi
    1.67 +	# addgroup postfix if needed
    1.68 +	if ! grep -q postfix $1/etc/group; then
    1.69 +		echo -n "Adding group postfix..."
    1.70 +		chroot $1/ addgroup postfix && addgroup postfix postfix
    1.71 +		status
    1.72 +	fi
    1.73 +	# addgroup postdrop if needed
    1.74 +	if ! grep -q postdrop $1/etc/group; then
    1.75 +		echo -n "Adding group postdrop..."
    1.76 +		chroot $1/ addgroup postdrop
    1.77 +		status
    1.78 +	fi
    1.79 +	chown postfix /var/spool/postfix/* /var/lib/postfix
    1.80 +	chown root /var/spool/postfix/pid
    1.81 +	chgrp postdrop /var/spool/postfix/maildrop /var/spool/postfix/public \
    1.82 +			/usr/sbin/postdrop /usr/sbin/postqueue
    1.83 +	cat <<EOF
    1.84 +----
    1.85 +Warning: you still need to edit myorigin/mydestination/mynetworks
    1.86 +parameter settings in /etc/postfix/main.cf.
    1.87 +See also http://www.postfix.org/STANDARD_CONFIGURATION_README.html
    1.88 +
    1.89 +To start $PACKAGE server you can run :
    1.90 +
    1.91 +    /etc/init.d/$PACKAGE start
    1.92 +
    1.93 +Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
    1.94 +----
    1.95 +EOF
    1.96 +}
    1.97 +
    1.98 +post_remove()
    1.99 +{
   1.100 +	deluser postfix
   1.101 +	delgroup postfix
   1.102 +	delgroup postdrop
   1.103 +}
   1.104 +
   1.105 +repack_cleanup()
   1.106 +{
   1.107 +        zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
   1.108 +}