diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2011-12-03 19:03:04 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2011-12-03 19:03:04 +0100 |
commit | 00b2b3fdc4b5fdbb4f8c39889353fb6acc8425e8 (patch) | |
tree | 3fdc467968f30f44c7d86f18116caead50800a16 /package/postfix | |
parent | bf16ddf6e65e4ddcfd2775d0b5358480a389e0ca (diff) |
fix build
Diffstat (limited to 'package/postfix')
-rw-r--r-- | package/postfix/Makefile | 32 | ||||
-rw-r--r-- | package/postfix/files/main.cf | 13 | ||||
-rw-r--r-- | package/postfix/files/postfix.init | 35 | ||||
-rw-r--r-- | package/postfix/files/postfix.postinst | 9 | ||||
-rw-r--r-- | package/postfix/patches/patch-makedefs | 23 | ||||
-rw-r--r-- | package/postfix/patches/patch-src_util_dict_open_c | 24 |
6 files changed, 132 insertions, 4 deletions
diff --git a/package/postfix/Makefile b/package/postfix/Makefile index 20b37cfbe..c34530fd6 100644 --- a/package/postfix/Makefile +++ b/package/postfix/Makefile @@ -10,9 +10,12 @@ PKG_MD5SUM:= b3ff47a38db920fc15bb207f42da53db PKG_DESCR:= Postfix MTA PKG_SECTION:= mail PKG_BUILDDEP:= db +PKG_DEPENDS:= libdb PKG_URL:= http://www.postfix.org/ PKG_SITES:= http://de.postfix.org/ftpmirror/official/ +PKG_HOST_DEPENDS:= !darwin + include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,POSTFIX,postfix,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) @@ -20,10 +23,33 @@ $(eval $(call PKG_template,POSTFIX,postfix,$(PKG_VERSION)-${PKG_RELEASE},${PKG_D XAKE_FLAGS+= GCC_HONOUR_COPTS=s CONFIG_STYLE:= manual ALL_TARGET:= +INSTALL_STYLE:= manual postfix-install: - $(INSTALL_DIR) $(IDIR_POSTFIX)/usr/bin - $(INSTALL_BIN) $(WRKINST)/usr/bin/postfix \ - $(IDIR_POSTFIX)/usr/bin + $(INSTALL_DIR) $(IDIR_POSTFIX)/etc/postfix + $(CP) $(WRKBUILD)/conf/* $(IDIR_POSTFIX)/etc/postfix + $(CP) ./files/main.cf $(IDIR_POSTFIX)/etc/postfix + $(INSTALL_DIR) $(IDIR_POSTFIX)/usr/sbin + $(CP) $(WRKBUILD)/bin/* $(IDIR_POSTFIX)/usr/sbin + $(INSTALL_DIR) $(IDIR_POSTFIX)/usr/libexec/postfix + $(CP) $(WRKBUILD)/libexec/* $(IDIR_POSTFIX)/usr/libexec/postfix + rm $(IDIR_POSTFIX)/usr/libexec/postfix/master.cf + rm $(IDIR_POSTFIX)/usr/libexec/postfix/main.cf + rm $(IDIR_POSTFIX)/usr/libexec/postfix/postfix-script + mv $(IDIR_POSTFIX)/etc/postfix/postfix-script \ + $(IDIR_POSTFIX)/usr/libexec/postfix/ + rm $(IDIR_POSTFIX)/usr/libexec/postfix/postfix-files + mv $(IDIR_POSTFIX)/etc/postfix/postfix-files \ + $(IDIR_POSTFIX)/usr/libexec/postfix/ + rm $(IDIR_POSTFIX)/usr/libexec/postfix/post-install + mv $(IDIR_POSTFIX)/etc/postfix/post-install \ + $(IDIR_POSTFIX)/usr/libexec/postfix/ + rm $(IDIR_POSTFIX)/usr/libexec/postfix/postfix-wrapper + mv $(IDIR_POSTFIX)/etc/postfix/postfix-wrapper \ + $(IDIR_POSTFIX)/usr/libexec/postfix/ + rm $(IDIR_POSTFIX)/usr/libexec/postfix/postmulti-script + mv $(IDIR_POSTFIX)/etc/postfix/postmulti-script \ + $(IDIR_POSTFIX)/usr/libexec/postfix/ + chmod 755 $(IDIR_POSTFIX)/usr/libexec/postfix/* include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/postfix/files/main.cf b/package/postfix/files/main.cf new file mode 100644 index 000000000..c2640dc5d --- /dev/null +++ b/package/postfix/files/main.cf @@ -0,0 +1,13 @@ +queue_directory = /var/spool/postfix +command_directory = /usr/sbin +daemon_directory = /usr/libexec/postfix +data_directory = /var/lib/postfix +mail_owner = postfix +unknown_local_recipient_reject_code = 550 +debug_peer_level = 2 +debugger_command = + PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin + ddd $daemon_directory/$process_name $process_id & sleep 5 + +sendmail_path = /usr/sbin/sendmail +setgid_group = postdrop diff --git a/package/postfix/files/postfix.init b/package/postfix/files/postfix.init new file mode 100644 index 000000000..a4eb13c79 --- /dev/null +++ b/package/postfix/files/postfix.init @@ -0,0 +1,35 @@ +#!/bin/sh +#PKG postfix +#INIT 80 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${postfix:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + [ -d /var/spool/postfix ] || mkdir -p /var/spool/postfix + [ -d /var/lib/postfix ] || mkdir -p /var/lib/postfix + chown postfix /var/lib/postfix + mount -o remount,rw / + chgrp postdrop /usr/sbin/postqueue + chgrp postdrop /usr/sbin/postdrop + chmod 2755 /usr/sbin/postqueue /usr/sbin/postdrop + mount -o remount,ro / + postfix start + ;; +stop) + postfix stop + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/postfix/files/postfix.postinst b/package/postfix/files/postfix.postinst new file mode 100644 index 000000000..8c9fbba60 --- /dev/null +++ b/package/postfix/files/postfix.postinst @@ -0,0 +1,9 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf postfix postfix NO +gid=$(get_next_gid) +add_group postfix $gid +add_user postfix $(get_next_uid) $gid /etc/postfix +gid=$(get_next_gid) +add_group postdrop $gid +add_service smtp 25/tcp diff --git a/package/postfix/patches/patch-makedefs b/package/postfix/patches/patch-makedefs index 385150c0c..cb064c6e3 100644 --- a/package/postfix/patches/patch-makedefs +++ b/package/postfix/patches/patch-makedefs @@ -1,5 +1,5 @@ --- postfix-2.8.7.orig/makedefs 2011-11-03 00:46:22.000000000 +0100 -+++ postfix-2.8.7/makedefs 2011-12-03 13:06:00.000000000 +0100 ++++ postfix-2.8.7/makedefs 2011-12-03 13:36:33.561684585 +0100 @@ -97,8 +97,8 @@ error() { case $# in @@ -11,3 +11,24 @@ VERSION=`(uname -v) 2>/dev/null` case "$VERSION" in dcosx*) SYSTEM=$VERSION;; +@@ -343,20 +343,6 @@ EOF + esac + ;; + Linux.3*) SYSTYPE=LINUX3 +- if [ -f /usr/include/db.h ] +- then +- : we are all set +- elif [ -f /usr/include/db/db.h ] +- then +- CCARGS="$CCARGS -I/usr/include/db" +- else +- # On a properly installed system, Postfix builds +- # by including <db.h> and by linking with -ldb +- echo "No <db.h> include file found." 1>&2 +- echo "Install the appropriate db*-devel package first." 1>&2 +- echo "See the RELEASE_NOTES file for more information." 1>&2 +- exit 1 +- fi + SYSLIBS="-ldb" + for name in nsl resolv + do diff --git a/package/postfix/patches/patch-src_util_dict_open_c b/package/postfix/patches/patch-src_util_dict_open_c new file mode 100644 index 000000000..48555d4e9 --- /dev/null +++ b/package/postfix/patches/patch-src_util_dict_open_c @@ -0,0 +1,24 @@ +--- postfix-2.8.7.orig/src/util/dict_open.c 2011-04-11 19:37:49.000000000 +0200 ++++ postfix-2.8.7/src/util/dict_open.c 2011-12-03 13:38:06.889686949 +0100 +@@ -202,8 +202,6 @@ + #include <dict_sdbm.h> + #include <dict_dbm.h> + #include <dict_db.h> +-#include <dict_nis.h> +-#include <dict_nisplus.h> + #include <dict_ni.h> + #include <dict_pcre.h> + #include <dict_regexp.h> +@@ -242,12 +240,6 @@ static const DICT_OPEN_INFO dict_open_in + DICT_TYPE_HASH, dict_hash_open, + DICT_TYPE_BTREE, dict_btree_open, + #endif +-#ifdef HAS_NIS +- DICT_TYPE_NIS, dict_nis_open, +-#endif +-#ifdef HAS_NISPLUS +- DICT_TYPE_NISPLUS, dict_nisplus_open, +-#endif + #ifdef HAS_NETINFO + DICT_TYPE_NETINFO, dict_ni_open, + #endif |