summaryrefslogtreecommitdiff
path: root/packages/postfix/postfix_2.0.20.bb
blob: c826dc5469a59fe3e05dcdd47f7113b226fd49d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
SECTION = "console/network"
DEPENDS = "db3 pcre postfix-native"
LICENSE = "IPL"
SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
	   file://${FILESDIR}/makedefs.patch;patch=1 \
	   file://${FILESDIR}/install.patch;patch=1"
S = "${WORKDIR}/postfix-${PV}"

export SYSLIBS = "-lpcre -ldb -lnsl -lresolv ${LDFLAGS}"
export EXPORT = "AUXLIBS='-lpcre' CCARGS='-DHAS_PCRE ${CFLAGS}' OPT='' DEBUG='-g'"
export CC_append = " -DHAS_PCRE ${CFLAGS}"
export EXTRA_OEMAKE = "-e"
export POSTCONF = "${STAGING_BINDIR}/postconf"

do_compile () {
	unset CFLAGS CPPFLAGS CXXFLAGS
	oe_runmake makefiles
	oe_runmake
}

do_install () {
	sh ./postfix-install 'install_root=${D}' -non-interactive
}

pkg_postinst () {
        grep postfix /etc/passwd || adduser --disabled-password --home=/var/spool/mail --ingroup nogroup postfix
}

pkg_postrm () {
        grep postfix /etc/passwd && deluser postfix
}