9359714a5041da645fad644b097dc921de9c320d
[openwrt/svn-archive/archive.git] / mail / imapfilter / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=imapfilter
11 PKG_VERSION:=2.2.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://imapfilter.hellug.gr/source/
16 PKG_MD5SUM:=09c6ffb085a5a244dc9f3e798259f341
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/imapfilter
21 SECTION:=mail
22 CATEGORY:=Mail
23 DEPENDS:=+liblua +libopenssl +libpcre
24 TITLE:=IMAP server based email filtering
25 URL:=http://imapfilter.hellug.gr/
26 endef
27
28 define Package/imapfilter/description
29 IMAPFilter is a mail filtering utility. It connects to remote mail
30 servers using the Internet Message Access Protocol (IMAP), sends
31 searching queries to the server and processes mailboxes based on the
32 results. It can be used to delete, copy, move, flag, etc. messages
33 residing in mailboxes at the same or different mail servers. The 4rev1
34 and 4 versions of the IMAP protocol are supported.
35
36 IMAPFilter uses the Lua programming language as a configuration and
37 extension language.
38 endef
39
40 define Build/Configure
41 (cd $(PKG_BUILD_DIR); \
42 ./configure \
43 -d /usr \
44 );
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 $(TARGET_CONFIGURE_OPTS) \
50 INCDIRS="$(TARGET_CPPFLAGS)" \
51 LIBDIRS="$(TARGET_LDFLAGS)" \
52 MYCFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
53 MYLDFLAGS="-lcrypt"
54 endef
55
56 define Package/imapfilter/conffiles
57 /etc/imapfilter/config.lua
58 endef
59
60 define Package/imapfilter/install
61 $(INSTALL_DIR) $(1)/usr/bin
62 $(INSTALL_BIN) $(PKG_BUILD_DIR)/imapfilter $(1)/usr/bin/
63 $(INSTALL_DIR) $(1)/etc/imapfilter
64 $(INSTALL_CONF) $(PKG_BUILD_DIR)/sample.config.lua $(1)/etc/imapfilter/config.lua
65 $(INSTALL_DIR) $(1)/usr/share/imapfilter
66 $(INSTALL_DATA) $(PKG_BUILD_DIR)/{account,auxiliary,common,mailbox,message,options,regex,set}.lua $(1)/usr/share/imapfilter/
67 endef
68
69 $(eval $(call BuildPackage,imapfilter))