Merge pull request #402 from jow-/issue-382
[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.13
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2
16 PKG_MD5SUM:=a3eb1c0b1822c4f2b0fe9247776baa71
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 +libopenssl +librt +zlib +libbz2 +libcap
31 TITLE:=An IMAP and POP3 daemon
32 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
33 URL:=http://www.dovecot.org/
34 endef
35
36 define Package/dovecot/description
37 Dovecot is a program which provides POP3 and IMAP services.
38 endef
39
40 define Package/dovecot/config
41 menu "Select dovecot build options"
42 depends on PACKAGE_dovecot
43 config DOVECOT_LDAP
44 bool "LDAP support"
45 default n
46 help
47 Implements LDAP support in dovecot.
48 endmenu
49 endef
50
51 CONFIGURE_ARGS += \
52 --without-gssapi \
53 --without-pam \
54 --with-moduledir=/usr/lib/dovecot/modules \
55 --with-notify=dnotify \
56 --without-lzma \
57 --without-lz4
58
59 ifneq ($(strip $(CONFIG_DOVECOT_LDAP)),)
60 CONFIGURE_ARGS+= \
61 --with-ldap=yes
62 else
63 CONFIGURE_ARGS+= \
64 --with-ldap=no
65 endif
66
67 CONFIGURE_VARS += \
68 RPCGEN= \
69 i_cv_signed_size_t=no \
70 i_cv_signed_time_t=no \
71 i_cv_gmtime_max_time_t=32 \
72 i_cv_mmap_plays_with_write=yes \
73 i_cv_fd_passing=yes \
74 i_cv_c99_vsnprintf=yes \
75 lib_cv_va_copy=yes \
76 lib_cv_va_copy=yes \
77 lib_cv___va_copy=yes \
78 lib_cv_va_val_copy=yes
79
80 define Package/dovecot/install
81 $(INSTALL_DIR) $(1)/etc/init.d \
82 $(1)/etc/dovecot \
83 $(1)/usr/share/doc/dovecot/example-config \
84 $(1)/usr/lib/dovecot \
85 $(1)/usr/bin \
86 $(1)/usr/sbin
87 $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
89 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/example-config
90 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
91 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
92 $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
93 rm $(1)/usr/lib/dovecot/dovecot-config
94 find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
95 endef
96
97 $(eval $(call BuildPackage,dovecot))