Upgrade imapfilter to 2.0.10 (#769
[packages.git] / mail / imapfilter / Makefile
1
2 # Copyright (C) 2006-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:=imapfilter
12 PKG_VERSION:=2.0.10
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://imapfilter.hellug.gr/source/
17 PKG_MD5SUM:=7a82c69a71105da185cb4dd7c57b01f7
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/imapfilter
22   SECTION:=mail
23   CATEGORY:=Mail
24   DEPENDS:=+liblua +libopenssl +libpcre
25   TITLE:=IMAP server based email filtering
26   URL:=http://imapfilter.hellug.gr/
27 endef
28
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.
36
37         IMAPFilter uses the Lua programming language as a configuration and
38         extension language.
39 endef
40
41 define Build/Configure
42         (cd $(PKG_BUILD_DIR); \
43                 ./configure \
44                         -d /usr \
45         );
46 endef
47
48 define Build/Compile
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)"
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))