[package] update xmail to 1.26pre05 (#4794)
[openwrt/svn-archive/archive.git] / mail / xmail / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=xmail
12 PKG_VERSION:=1.26-pre05
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.xmailserver.org/
17 PKG_MD5SUM:=685e4b3e3652c9e82a13a56841c09201
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/xmail
22 SECTION:=mail
23 CATEGORY:=Mail
24 DEPENDS:=+uclibcxx +libopenssl +libpthread
25 TITLE:=advanced, fast and reliable ESMTP/POP3 mail server
26 URL:=http://www.xmailserver.org/
27 endef
28
29 define Package/xmail/description
30 XMail is an Internet mail server featuring an SMTP, POP3 and finger server.
31 It's incredibly easy to set up and has lots of features including :
32 multiple domains, virtual users and spam protection.
33 endef
34
35 define Build/Compile
36 CFLAGS="$(TARGET_CFLAGS)" \
37 $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.lnx \
38 $(TARGET_CONFIGURE_OPTS) \
39 LD="\$$$$(CC)" \
40 CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \
41 LDFLAGS="$(TARGET_LDFLAGS) -nodefaultlibs -lcrypto -lssl -luClibc++ -ldl -lm -lpthread" \
42 all
43 tar -cjf $(PKG_BUILD_DIR)/MailRoot.tar.bz2 -C $(PKG_BUILD_DIR)/MailRoot --exclude bin .
44 endef
45
46 define Package/xmail/install
47 $(INSTALL_DIR) $(1)/usr/bin/
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/* $(1)/usr/bin/
49 $(INSTALL_DIR) $(1)/etc
50 $(INSTALL_DATA) $(PKG_BUILD_DIR)/MailRoot.tar.bz2 $(1)/etc/
51 $(INSTALL_DIR) $(1)/etc/config
52 $(INSTALL_DATA) ./files/xmail.config $(1)/etc/config/xmail
53 $(INSTALL_DIR) $(1)/etc/init.d/
54 $(INSTALL_BIN) ./files/xmail.init $(1)/etc/init.d/xmail
55 endef
56
57 $(eval $(call BuildPackage,xmail))