packages/smtptrapd: use new service functions
[openwrt/svn-archive/archive.git] / net / smtptrapd / Makefile
1 #
2 # Copyright (C) 2008-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=smtptrapd
11 PKG_VERSION:=1.5
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
16 PKG_MD5SUM:=edc5f2f3ea9f9bdd9e0f479a58903bf1
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/smtptrapd
21 SECTION:=net
22 CATEGORY:=Network
23 DEPENDS:=+libpthread
24 TITLE:=SMTP Trap Daemon
25 URL:=http://smtptrapd.sourceforge.net/
26 endef
27
28 define Package/smtptrapd/description
29 The smtptrapd program is a multi-threaded daemon that provides
30 a RFC 2821 compliant SMTP service that always returns a 4xx soft
31 error to the RCPT TO verb.
32 endef
33
34 define Build/Compile
35 $(TARGET_CC) \
36 $(TARGET_CFLAGS) \
37 $(TARGET_CPPFLAGS) \
38 -D_REENTRANT \
39 $(PKG_BUILD_DIR)/smtptrapd.c \
40 -o $(PKG_BUILD_DIR)/smtptrapd \
41 $(TARGET_LDFLAGS) \
42 -lpthread
43 endef
44
45 define Package/smtptrapd/install
46 $(INSTALL_DIR) $(1)/etc/init.d
47 $(INSTALL_BIN) ./files/smtptrapd.init $(1)/etc/init.d/smtptrapd
48 $(INSTALL_DIR) $(1)/usr/sbin
49 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smtptrapd $(1)/usr/sbin/
50 endef
51
52 $(eval $(call BuildPackage,smtptrapd))