2 # Copyright (C) 2006-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://www.dovecot.org
/releases
/2.2
16 PKG_HASH
:=160b2151e2af359877f69cb2dcdfe1a3f4138ad3766e3b8562b96616e2f6bc2e
17 PKG_LICENSE
:=LGPL-2.1 MIT BSD-3-Clause Unique
18 PKG_LICENSE_FILES
:=COPYING COPYING.LGPL COPYING.MIT
20 PKG_BUILD_DEPENDS
:=libiconv
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/dovecot
30 DEPENDS
:=+DOVECOT_LDAP
:libopenldap
+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
37 define Package
/dovecot
/description
38 Dovecot is a program which provides POP3 and IMAP services.
41 define Package
/dovecot
/config
42 menu
"Select dovecot build options"
43 depends on PACKAGE_dovecot
48 Implements LDAP support in dovecot.
53 Implements SQLite DB support in dovecot.
60 --with-moduledir
=/usr
/lib
/dovecot
/modules \
61 --with-notify
=dnotify \
65 $(if
$(CONFIG_DOVECOT_LDAP
),--with-ldap
=yes
,--with-ldap
=no
) \
66 $(if
$(CONFIG_DOVECOT_SQLITE
),--with-sqlite
=yes
,--with-sqlite
=no
)
70 i_cv_signed_size_t
=no \
71 i_cv_signed_time_t
=no \
72 i_cv_gmtime_max_time_t
=32 \
73 i_cv_mmap_plays_with_write
=yes \
75 i_cv_c99_vsnprintf
=yes \
78 lib_cv___va_copy
=yes \
79 lib_cv_va_val_copy
=yes
81 define Build
/InstallDev
82 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
83 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/dovecot
$(1)/usr
/include/
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/dovecot
$(1)/usr
/lib
/
85 rm -f
$(1)/usr
/lib
/dovecot
/*.la
89 define Package
/dovecot
/install
90 $(INSTALL_DIR
) $(1)/etc
/init.d \
92 $(1)/usr
/share
/doc
/dovecot
/example-config \
93 $(1)/usr
/lib
/dovecot \
96 $(CP
) $(PKG_INSTALL_DIR
)/etc
/dovecot
/* $(1)/etc
/dovecot
/
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/dovecot
/* $(1)/usr
/lib
/dovecot
/
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/dovecot
/example-config
$(1)/usr
/share
/doc
/dovecot
/example-config
99 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/doveconf
$(1)/usr
/bin
/
100 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/* $(1)/usr
/sbin
/
101 $(INSTALL_BIN
) .
/files
/dovecot.init
$(1)/etc
/init.d
/dovecot
102 rm $(1)/usr
/lib
/dovecot
/dovecot-config
103 find
$(1)/usr
/lib
/dovecot
/ -name
"*.a" -o
-name
"*.la" | xargs
rm
106 $(eval
$(call BuildPackage
,dovecot
))