wok view postfix/receipt @ rev 1182
Add nbs
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Aug 03 06:51:20 2008 +0000 (2008-08-03) |
parents | ff8a1f3e8408 |
children | df33f077f61a |
line source
1 # SliTaz package receipt.
3 PACKAGE="postfix"
4 VERSION="2.5.2"
5 CATEGORY="network"
6 SHORT_DESC="fast, easy to administer, and secure mailer."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.postfix.org/"
10 WGET_URL="ftp://mir1.ovh.net/ftp.postfix.org/postfix-release/official/$TARBALL"
11 BUILD_DEPENDS="db-dev openldap-dev pcre-dev openssl-dev"
12 DEPENDS="libdb libldap pcre openssl"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
18 cd $src
19 make makefiles CCARGS="-DHAS_DB -DHAS_LDAP" AUXLIBS="-ldb -lldap -llber"
20 make
21 install_root=/home/slitaz/wok/postfix/postfix-2.5.2/_pkg \
22 sh postfix-install -non-interactive
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs/usr/share/licenses/
29 cp -a $_pkg/usr/libexec $fs/usr
30 cp -a $_pkg/usr/bin $fs/usr
31 cp -a $_pkg/usr/sbin $fs/usr
32 cp -a $_pkg/etc $fs
33 cp -a $_pkg/var $fs
34 mv $fs/etc/postfix/TLS_LICENSE $fs/usr/share/licenses/POSTFIX_TLS_LICENSE
35 mv $fs/etc/postfix/LICENSE $fs/usr/share/licenses/POSTFIX_LICENSE
36 cp -a stuff/etc/init.d $fs/etc
37 chmod 2755 $fs/usr/sbin/postdrop $fs/usr/sbin/postqueue
38 rm -f $fs/etc/postfix/post-install $fs/etc/postfix/postfix-files \
39 $fs/etc/postfix/postfix-script
40 }
42 # Pre and post install commands for Tazpkg.
43 post_install()
44 {
45 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
46 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
47 etc/postfix/access
48 etc/postfix/aliases
49 etc/postfix/canonical
50 etc/postfix/generic
51 etc/postfix/header_checks
52 etc/postfix/main.cf
53 etc/postfix/master.cf
54 etc/postfix/relocated
55 etc/postfix/transport
56 etc/postfix/virtual
57 EOT
58 # adduser postfix if needed
59 if ! grep -q postfix $1/etc/passwd; then
60 echo -n "Adding user postfix..."
61 chroot $1/ adduser postfix -D -H -S
62 status
63 fi
64 # addgroup postfix if needed
65 if ! grep -q postfix $1/etc/group; then
66 echo -n "Adding group postfix..."
67 chroot $1/ addgroup postfix && addgroup postfix postfix
68 status
69 fi
70 # addgroup postdrop if needed
71 if ! grep -q postdrop $1/etc/group; then
72 echo -n "Adding group postdrop..."
73 chroot $1/ addgroup postdrop
74 status
75 fi
76 chown postfix /var/spool/postfix/* /var/lib/postfix
77 chown root /var/spool/postfix/pid
78 chgrp postdrop /var/spool/postfix/maildrop /var/spool/postfix/public \
79 /usr/sbin/postdrop /usr/sbin/postqueue
80 cat <<EOF
81 ----
82 Warning: you still need to edit myorigin/mydestination/mynetworks
83 parameter settings in /etc/postfix/main.cf.
84 See also http://www.postfix.org/STANDARD_CONFIGURATION_README.html
86 To start $PACKAGE server you can run :
88 /etc/init.d/$PACKAGE start
90 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
91 ----
92 EOF
93 }
95 post_remove()
96 {
97 deluser postfix
98 delgroup postfix
99 delgroup postdrop
100 }
102 repack_cleanup()
103 {
104 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
105 }