openwrt-packages/mail/pigeonhole/Makefile

61 lines
1.9 KiB
Makefile
Raw Normal View History

#
# Copyright (C) 2006-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
PKG_NAME:=dovecot-pigeonhole
PKG_VERSION_PLUGIN:=0.5.4
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
PKG_VERSION_DOVECOT:=$(shell make --no-print-directory -C ../dovecot/ val.PKG_VERSION V=s)
PKG_VERSION:=$(PKG_VERSION_DOVECOT)-$(PKG_VERSION_PLUGIN)
dovecot: Fix managesieve-login needs libdovecot-login When trying to use managesieve my MUA complained sieve wasn't supported. On investigation dovecot logs the following could be seen: Aug 16 00:28:44 managesieve-login: Fatal: master: service(managesieve-login): child 1430 returned error 127 Aug 16 00:31:32 managesieve-login: Error: Error loading shared library libdovecot-login.so.0: No such file or directory (needed by /usr/lib/dovecot/managesieve-login) Aug 16 00:31:32 managesieve-login: Error: Error loading shared library libdovecot.so.0: No such file or directory (needed by /usr/lib/dovecot/managesieve-login) Aug 16 00:31:32 managesieve-login: Error: Error relocating /usr/lib/dovecot/managesieve-login: net_ip2addr: symbol not found The issue (verified with readelf on non-working build and build with my fix) is that there is no RPATH information in the pigeonhole binaries (like managesieve-login). The dovecot-config that is 'installed' in the staging dir assumes that plugins will be built on the same host as the installed files. The 'installed' dovecot-config (partial) looks like: LIBDOVECOT='-L/usr/lib/dovecot -ldovecot' LIBDOVECOT_LOGIN='-ldovecot-login -L/home/user/Build/openwrt/openwrt-ath79/staging_dir/target-mips_24kc_musl/usr/lib -lssl -lcrypto' LIBDOVECOT_SQL=-ldovecot-sql LIBDOVECOT_COMPRESS=-ldovecot-compression LIBDOVECOT_LDA=-ldovecot-lda LIBDOVECOT_STORAGE='-ldovecot-storage ' LIBDOVECOT_DSYNC=-ldovecot-dsync LIBDOVECOT_LIBFTS=-ldovecot-fts The solution I used was to modify dovecot-config to add the rpath to DOVECOT_BINARY_LDFLAGS, and to replace references to host directories with staging_dir directories. This results in RPATH being added as it needs to be, and results in a working version of dovecot+pigeonhole. NB: I've also touched package version of pigeonhole as this change in dovecot results in (needed) binary changes for pigeonhole. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-08-16 09:32:50 +02:00
PKG_RELEASE:=4
DOVECOT_VERSION:=2.3
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
PKG_SOURCE:=dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN).tar.gz
PKG_SOURCE_URL:=https://pigeonhole.dovecot.org/releases/$(DOVECOT_VERSION)
PKG_HASH:=547999e67a001abc5e654c7e35653d3fe057fa9a47a24257e39a79c41ef08516
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING COPYING.LGPL
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
PKG_BUILD_DIR:=$(BUILD_DIR)/dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN)
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
define Package/dovecot-pigeonhole
SECTION:=mail
CATEGORY:=Mail
DEPENDS:=+dovecot
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
EXTRA_DEPENDS:=dovecot (>= $(PKG_VERSION_DOVECOT))
TITLE:=Mail filtering facilities for Dovecot
MAINTAINER:=W. Michael Petullo <mike@flyn.org>
URL:=https://wiki2.dovecot.org/Pigeonhole
endef
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
define Package/dovecot-pigeonhole/description
Pigeonhole provides mail filtering facilities for Dovecot using the Sieve
(RFC 5228) language.
endef
CONFIGURE_ARGS += \
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
--with-dovecot=$(STAGING_DIR)/usr/lib/dovecot/
CONFIGURE_VARS += \
LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/dovecot/" \
CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/dovecot/"
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
define Package/dovecot-pigeonhole/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/dovecot/ $(1)/usr/libexec/dovecot/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
$(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
endef
pigeonhole: fix runtime dependency on dovecot's ABI Closes #5062. With ABI_VERSION declaration in dovecot's Makefile introduced in PR #5182, pigeonhole plugin will now be rebuilt on every dovecot upgrade. To announce the rebuilt pigeonhole plugin to opkg, introduce a different model of version numbering. The new version numbering now includes both dovecot and pigeonhole plugin version numbers. Therefore, the rebuilt pigeonhole plugin will be visible to opkg whenever dovecot or pigeonhole plugin version changes. Rename "pigeonhole" to "dovecot-pigeonhole". There are several reasons for renaming the package: 1. pigeonhole is a plugin. There seems to be a convention to name plugins by adding corresponding suffixes to the parent package name, such as lua-*, luci-*, php7-mod-*, perlbase-*, transmission-* etc. 2. When named as "dovecot-pigeonhole", the pigeonhole plugin is displayed right next to dovecot in config manager ("make menuconfig") and is therefore highly visible to anyone who explores the available modules for dovecot. 3. When named as "dovecot-pigeonhole", the package version number consisting of both dovecot and pigeonhole version numbers makes more sense: "dovecot-pigeonhole_2.2.33.2-0.4.20-2" looks more comprehensible than "pigeonhole_2.2.33.2-0.4.20-2", however admittedly both variants look rather ugly. Add ManageSieve to the package. Adding managesieve-login and its libraries increases the size of the package by about 11% from 702061 bytes to 781294 bytes on the bcm53xx platform. As dovecot is unlikely to be used on a low-end LEDE/OpenWrt box, the addition of ~80KB to the package size is not likely to make a noticeable difference but it will add the capability to use pigeonhole plugin for dovecot with systems that talk ManageSieve, such as the RoundCube. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
2017-11-28 08:00:42 +01:00
$(eval $(call BuildPackage,dovecot-pigeonhole))