From 10b5969effff2ceda8cf8aa66b7fc73ce770b14e Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 20 May 2007 14:10:46 +0000 Subject: [PATCH] Add xmail from #1309 SVN-Revision: 7280 --- net/xmail/Makefile | 58 +++++++++++++++++++++ net/xmail/files/SysMachine.h | 24 +++++++++ net/xmail/patches/010-Makefile.common.patch | 21 ++++++++ net/xmail/patches/020-Makefile.lnx.patch | 16 ++++++ net/xmail/patches/030-xmail.patch | 12 +++++ 5 files changed, 131 insertions(+) create mode 100644 net/xmail/Makefile create mode 100644 net/xmail/files/SysMachine.h create mode 100644 net/xmail/patches/010-Makefile.common.patch create mode 100644 net/xmail/patches/020-Makefile.lnx.patch create mode 100644 net/xmail/patches/030-xmail.patch diff --git a/net/xmail/Makefile b/net/xmail/Makefile new file mode 100644 index 000000000..20904906a --- /dev/null +++ b/net/xmail/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xmail +PKG_VERSION:=1.24 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=http://www.xmailserver.org/ +PKG_MD5SUM:=106730bdbaa4fda9e90a7c22df024114 +PKG_CAT:=zcat + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/xmail + SECTION:=net + CATEGORY:=Network + DEPENDS:=+uclibcxx +libopenssl + TITLE:=advanced, fast and reliable ESMTP/POP3 mail server + DESCRIPTION:=\ + XMail is an Internet mail server featuring an SMTP, POP3 and finger server. \\\ + It's incredibly easy to set up and has lots of features including : \\\ + multiple domains, virtual users and spam protection. + URL:=http://www.xmailserver.org/ +endef + +define Build/Configure + $(CP) ./files/SysMachine.h $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.lnx \ + $(TARGET_CONFIGURE_OPTS) \ + LDFLAGS="$(EXTRA_LDFLAGS) -luClibc++ -lssl -lm -lpthread -lcrypto -ldl" \ + WITH_SSL_INCLUDE="$(STAGING_DIR)/usr/include" \ + WITH_SSL_LIB="$(STAGING_DIR)/usr/lib" \ + CPPFLAGS="$(TARGET_CFLAGS)" \ + CXX="$(TARGET_CROSS)g++" +endef + +define Package/xmail/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/var/MailRoot/ + $(CP) $(PKG_BUILD_DIR)/MailRoot $(1)/var/ +endef + +$(eval $(call BuildPackage,xmail)) diff --git a/net/xmail/files/SysMachine.h b/net/xmail/files/SysMachine.h new file mode 100644 index 000000000..c4b142dff --- /dev/null +++ b/net/xmail/files/SysMachine.h @@ -0,0 +1,24 @@ +#ifndef _MACHDEFS_H +#define _MACHDEFS_H + + +#undef MACH_BIG_ENDIAN_WORDS + +#undef MACH_BIG_ENDIAN_BITFIELD + +typedef signed char MachInt8; +typedef unsigned char MachUInt8; +#define MACH_TYPE_8BIT char + +typedef signed short MachInt16; +typedef unsigned short MachUInt16; +#define MACH_TYPE_16BIT short + +typedef signed int MachInt32; +typedef unsigned int MachUInt32; +#define MACH_TYPE_32BIT int + + + +#endif + diff --git a/net/xmail/patches/010-Makefile.common.patch b/net/xmail/patches/010-Makefile.common.patch new file mode 100644 index 000000000..c46f69eb2 --- /dev/null +++ b/net/xmail/patches/010-Makefile.common.patch @@ -0,0 +1,21 @@ +--- xmail-1.24.orig/Makefile.common 2006-12-31 20:03:59.000000000 +0100 ++++ xmail-1.24/Makefile.common 2007-02-01 20:41:08.000000000 +0100 +@@ -76,15 +76,15 @@ + SENDMAILOBJS = SendMail.o + + %.o : %.cpp +- ${CC} ${CPPFLAGS} ${CFLAGS} -c $*.cpp ++ ${CXX} ${CPPFLAGS} ${CFLAGS} -c $*.cpp + + all: ${OUTDIR} ${MKMACHDEPINC} ${MAILSVR} ${CRTLCLNT} ${XMCRYPT} ${MKUSERS} ${SENDMAIL} + + ${OUTDIR}: + @mkdir ${OUTDIR} + +-${MKMACHDEPINC}: ${MKMACHDEP} +- ./${MKMACHDEP} > ${MKMACHDEPINC} ++#${MKMACHDEPINC}: ${MKMACHDEP} ++# ./${MKMACHDEP} > ${MKMACHDEPINC} + + ${MKMACHDEP}: ${MKMACHDEPOBJS} + ${LD} -o ${MKMACHDEP} ${MKMACHDEPOBJS} ${LDFLAGS} diff --git a/net/xmail/patches/020-Makefile.lnx.patch b/net/xmail/patches/020-Makefile.lnx.patch new file mode 100644 index 000000000..7bda0480c --- /dev/null +++ b/net/xmail/patches/020-Makefile.lnx.patch @@ -0,0 +1,16 @@ +diff -ruaN xmail-1.24.orig/Makefile.lnx xmail-1.24/Makefile.lnx +--- xmail-1.24.orig/Makefile.lnx 2006-12-31 20:03:59.000000000 +0100 ++++ xmail-1.24/Makefile.lnx 2007-02-02 13:11:29.000000000 +0100 +@@ -19,9 +19,9 @@ + # Davide Libenzi + # + SYSTYPE = linux +-CC = g++ +-LD = g++ +-STRIP = strip ++CC = $(CXX) ++LD = $(CXX) ++#STRIP = strip + + ifneq ("$(WITH_SSL_INCLUDE)", "") + CFLAGS := $(CFLAGS) -I$(WITH_SSL_INCLUDE) diff --git a/net/xmail/patches/030-xmail.patch b/net/xmail/patches/030-xmail.patch new file mode 100644 index 000000000..520b39760 --- /dev/null +++ b/net/xmail/patches/030-xmail.patch @@ -0,0 +1,12 @@ +diff -ruaN xmail-1.24.orig/xmail xmail-1.24/xmail +--- xmail-1.24.orig/xmail 2006-12-31 20:03:59.000000000 +0100 ++++ xmail-1.24/xmail 2007-02-02 13:14:39.000000000 +0100 +@@ -19,7 +19,7 @@ + test -f $DAEMON || exit 0 + + set -e +-ulimit -c 20000 ++ulimit -c 10000 + + start_xmail() + { -- 2.30.2