aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorRoman I Khimov <khimov@altell.ru>2010-03-31 14:35:19 +0400
committerRoman I Khimov <khimov@altell.ru>2010-04-02 00:01:48 +0400
commitfa985b1459bace9f6eb30f857f2281996f55af9d (patch)
tree1e91ae41dfca630fee435e103c6aa21ddfdc1ebd /recipes
parent42f948f5c170b134ae8a0eace9a174b317d32c5d (diff)
downloadopenembedded-fa985b1459bace9f6eb30f857f2281996f55af9d.tar.gz
postfix: convert to BBCLASSEXTEND and new staging for native
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes')
-rw-r--r--recipes/postfix/postfix-native_2.0.20.bb10
-rw-r--r--recipes/postfix/postfix-native_2.2.12.bb10
-rw-r--r--recipes/postfix/postfix.inc25
3 files changed, 22 insertions, 23 deletions
diff --git a/recipes/postfix/postfix-native_2.0.20.bb b/recipes/postfix/postfix-native_2.0.20.bb
deleted file mode 100644
index 66ff65de4c..0000000000
--- a/recipes/postfix/postfix-native_2.0.20.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require postfix_${PV}.bb
-
-inherit native
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/postfix-${PV}"
-DEPENDS = "virtual/db-native libpcre-native"
-export DIRS = "src/util src/global src/postconf"
-
-do_stage () {
- install -m 0755 src/postconf/postconf ${STAGING_BINDIR}/
-}
diff --git a/recipes/postfix/postfix-native_2.2.12.bb b/recipes/postfix/postfix-native_2.2.12.bb
deleted file mode 100644
index 66ff65de4c..0000000000
--- a/recipes/postfix/postfix-native_2.2.12.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require postfix_${PV}.bb
-
-inherit native
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/postfix-${PV}"
-DEPENDS = "virtual/db-native libpcre-native"
-export DIRS = "src/util src/global src/postconf"
-
-do_stage () {
- install -m 0755 src/postconf/postconf ${STAGING_BINDIR}/
-}
diff --git a/recipes/postfix/postfix.inc b/recipes/postfix/postfix.inc
index 6a5f9bb170..5b18cefe70 100644
--- a/recipes/postfix/postfix.inc
+++ b/recipes/postfix/postfix.inc
@@ -1,5 +1,6 @@
SECTION = "console/network"
DEPENDS = "virtual/db libpcre postfix-native"
+DEPENDS_virtclass-native = "virtual/db-native libpcre-native"
LICENSE = "IPL"
INC_PR = "r13"
@@ -15,6 +16,8 @@ SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV
S = "${WORKDIR}/postfix-${PV}"
+BBCLASSEXTEND = "native"
+
inherit update-rc.d
INITSCRIPT_NAME = "postfix"
@@ -31,7 +34,7 @@ export SYSLIBS = "-lpcre -ldb ${LIBBDB_EXTRA} -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_NATIVE}/postconf"
+export POSTCONF = "${STAGING_SBINDIR_NATIVE}/postconf"
do_compile () {
unset CFLAGS CPPFLAGS CXXFLAGS
@@ -39,8 +42,23 @@ do_compile () {
oe_runmake
}
+do_install_prepend_virtclass-native() {
+ export POSTCONF="bin/postconf"
+}
+
do_install () {
- sh ./postfix-install 'install_root=${D}' -non-interactive
+ sh ./postfix-install 'install_root=${D}' \
+ 'config_directory=${sysconfdir}/postfix' \
+ 'daemon_directory=${libexecdir}/postfix' \
+ 'command_directory=${sbindir}' \
+ 'queue_directory=${localstatedir}/spool/postfix' \
+ 'sendmail_path=${sbindir}/sendmail.postfix' \
+ 'newaliases_path=${bindir}/newaliases' \
+ 'mailq_path=${bindir}/mailq' \
+ 'manpage_directory=${mandir}' \
+ 'readme_directory=${datadir}/doc/postfix' \
+ 'data_directory=${localstatedir}/lib/postfix' \
+ -non-interactive
rm -rf ${D}${localstatedir}/spool/postfix
mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
install -d ${D}${localstatedir}/tmp
@@ -50,9 +68,10 @@ do_install () {
install -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/01_postfix
install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix
install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient
- mv ${D}${sbindir}/sendmail ${D}${sbindir}/sendmail.${PN}
}
+NATIVE_INSTALL_WORKS = "1"
+
pkg_postinst () {
update-alternatives --install ${sbindir}/sendmail sendmail sendmail.${PN} 40
grep postfix /etc/group || addgroup postfix