2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://imapfilter.hellug.gr/source/
17 PKG_MD5SUM:=7a82c69a71105da185cb4dd7c57b01f7
19 include $(INCLUDE_DIR)/package.mk
21 define Package/imapfilter
24 DEPENDS:=+liblua +libopenssl +libpcre
25 TITLE:=IMAP server based email filtering
26 URL:=http://imapfilter.hellug.gr/
29 define Package/imapfilter/description
30 IMAPFilter is a mail filtering utility. It connects to remote mail
31 servers using the Internet Message Access Protocol (IMAP), sends
32 searching queries to the server and processes mailboxes based on the
33 results. It can be used to delete, copy, move, flag, etc. messages
34 residing in mailboxes at the same or different mail servers. The 4rev1
35 and 4 versions of the IMAP protocol are supported.
37 IMAPFilter uses the Lua programming language as a configuration and
41 define Build/Configure
42 (cd $(PKG_BUILD_DIR); \
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 $(TARGET_CONFIGURE_OPTS) \
51 INCDIRS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
52 LIBDIRS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
53 MYCFLAGS="$(TARGET_CFLAGS)" \
57 define Package/imapfilter/conffiles
58 /etc/imapfilter/config.lua
61 define Package/imapfilter/install
62 $(INSTALL_DIR) $(1)/usr/bin
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/imapfilter $(1)/usr/bin/
64 $(INSTALL_DIR) $(1)/etc/imapfilter
65 $(INSTALL_CONF) $(PKG_BUILD_DIR)/sample.config.lua $(1)/etc/imapfilter/config.lua
66 $(INSTALL_DIR) $(1)/usr/share/imapfilter
67 $(INSTALL_DATA) $(PKG_BUILD_DIR)/{account,auxiliary,common,mailbox,message,options,regex,set}.lua $(1)/usr/share/imapfilter/
70 $(eval $(call BuildPackage,imapfilter))