You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
3.7 KiB

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