dovecot: update to 2.2.33.1
[feed/packages.git] / mail / dovecot / Makefile
1 #
2 # Copyright (C) 2006-2014 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:=dovecot
11 PKG_VERSION:=2.2.33.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2
16 PKG_HASH:=e4d9a182408100dce70e05dad1f8a703252a497aeb25706642286d84a118890b
17 PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
18 PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
19
20 PKG_BUILD_DEPENDS:=libiconv
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/dovecot
28 SECTION:=mail
29 CATEGORY:=Mail
30 DEPENDS:=+DOVECOT_LDAP:libopenldap +DOVECOT_MYSQL:libmysqlclient +DOVECOT_PGSQL:libpq +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap
31 TITLE:=An IMAP and POP3 daemon
32 MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
33 URL:=http://www.dovecot.org/
34 USERID:=dovecot=59:dovecot=59
35 endef
36
37 define Package/dovecot/description
38 Dovecot is a program which provides POP3 and IMAP services.
39 endef
40
41 define Package/dovecot/config
42 menu "Select dovecot build options"
43 depends on PACKAGE_dovecot
44 config DOVECOT_LDAP
45 bool "LDAP support"
46 default n
47 help
48 Implements LDAP support in dovecot.
49 config DOVECOT_MYSQL
50 bool "MYSQL support"
51 default n
52 help
53 Implements MYSQL support in dovecot.
54 config DOVECOT_PGSQL
55 bool "PostgreSQL support"
56 default n
57 help
58 Implements PostgreSQL support in dovecot.
59 config DOVECOT_SQLITE
60 bool "SQLite support"
61 default n
62 help
63 Implements SQLite DB support in dovecot.
64 endmenu
65 endef
66
67 CONFIGURE_ARGS += \
68 --without-gssapi \
69 --without-pam \
70 --with-moduledir=/usr/lib/dovecot/modules \
71 --with-notify=dnotify \
72 --without-lzma \
73 --without-lz4 \
74 --with-icu=no \
75 $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
76 $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
77 $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
78 $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no)
79
80 CONFIGURE_VARS += \
81 RPCGEN= \
82 i_cv_signed_size_t=no \
83 i_cv_signed_time_t=no \
84 i_cv_gmtime_max_time_t=32 \
85 i_cv_mmap_plays_with_write=yes \
86 i_cv_fd_passing=yes \
87 i_cv_c99_vsnprintf=yes \
88 lib_cv_va_copy=yes \
89 lib_cv_va_copy=yes \
90 lib_cv___va_copy=yes \
91 lib_cv_va_val_copy=yes
92
93 define Build/InstallDev
94 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
95 $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
97 rm -f $(1)/usr/lib/dovecot/*.la
98 endef
99
100
101 define Package/dovecot/install
102 $(INSTALL_DIR) $(1)/etc/init.d \
103 $(1)/etc/dovecot \
104 $(1)/usr/share/doc/dovecot/example-config \
105 $(1)/usr/lib/dovecot \
106 $(1)/usr/bin \
107 $(1)/usr/sbin
108 $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
109 $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
110 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/example-config
111 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
112 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
113 $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
114 rm $(1)/usr/lib/dovecot/dovecot-config
115 find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
116 endef
117
118 $(eval $(call BuildPackage,dovecot))