diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2019-11-10 14:04:09 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2019-11-10 14:04:09 +0100 |
commit | 8f8945adaa2b491144d2ddfdcfc4fc8d4504692c (patch) | |
tree | 967e73e51a29e74dea78f1c6d291ed4f31443f9b /community | |
parent | 1240693f72eacf8b9b61251ade9d3d46a70d018e (diff) | |
download | aports-8f8945adaa2b491144d2ddfdcfc4fc8d4504692c.tar.bz2 aports-8f8945adaa2b491144d2ddfdcfc4fc8d4504692c.tar.xz |
community/opensmtpd-extras: move from testing
Diffstat (limited to 'community')
4 files changed, 161 insertions, 0 deletions
diff --git a/community/opensmtpd-extras/0001-uint8_t-is-defined-in-stdint.h-at-least-on-Linux.patch b/community/opensmtpd-extras/0001-uint8_t-is-defined-in-stdint.h-at-least-on-Linux.patch new file mode 100644 index 0000000000..2adcb7dd42 --- /dev/null +++ b/community/opensmtpd-extras/0001-uint8_t-is-defined-in-stdint.h-at-least-on-Linux.patch @@ -0,0 +1,28 @@ +From 77b38f10b8e45efb4066f199a5123ead35d3df75 Mon Sep 17 00:00:00 2001 +From: Jonas Maurus <jonas-github@maurus.net> +Date: Wed, 2 Nov 2016 11:51:29 +0100 +Subject: [PATCH] uint8_t is defined in stdint.h, at least on Linux + +Signed-off-by: Jonas Maurus <jonas-github@maurus.net> + +Patch-Source: https://github.com/OpenSMTPD/OpenSMTPD-extras/commit/77b38f10b8e45efb4066f199a5123ead35d3df75 +--- + api/rfc2822.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/api/rfc2822.h b/api/rfc2822.h +index 30b878b..0c35830 100644 +--- a/api/rfc2822.h ++++ b/api/rfc2822.h +@@ -19,6 +19,8 @@ + #ifndef _RFC2822_H_ + #define _RFC2822_H_ + ++#include <stdint.h> ++ + #define RFC2822_MAX_LINE_SIZE 4096 + + struct rfc2822_line { +-- +2.18.0 + diff --git a/community/opensmtpd-extras/0002-wrap-stdint.h-in-autoconf-variables.patch b/community/opensmtpd-extras/0002-wrap-stdint.h-in-autoconf-variables.patch new file mode 100644 index 0000000000..c173626d51 --- /dev/null +++ b/community/opensmtpd-extras/0002-wrap-stdint.h-in-autoconf-variables.patch @@ -0,0 +1,29 @@ +From b517268af8b467ed2937bd2ee0b47c07347c89b2 Mon Sep 17 00:00:00 2001 +From: Jonas Maurus <jonas-github@maurus.net> +Date: Wed, 2 Nov 2016 22:50:35 +0100 +Subject: [PATCH] wrap stdint.h in autoconf variables + +Signed-off-by: Jonas Maurus <jonas-github@maurus.net> + +Patch-Source: https://github.com/OpenSMTPD/OpenSMTPD-extras/commit/b517268af8b467ed2937bd2ee0b47c07347c89b2 +--- + api/rfc2822.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/api/rfc2822.h b/api/rfc2822.h +index 0c35830..8bb0a8b 100644 +--- a/api/rfc2822.h ++++ b/api/rfc2822.h +@@ -19,7 +19,9 @@ + #ifndef _RFC2822_H_ + #define _RFC2822_H_ + ++#ifdef HAVE_STDINT_H + #include <stdint.h> ++#endif + + #define RFC2822_MAX_LINE_SIZE 4096 + +-- +2.18.0 + diff --git a/community/opensmtpd-extras/APKBUILD b/community/opensmtpd-extras/APKBUILD new file mode 100644 index 0000000000..bf74f16179 --- /dev/null +++ b/community/opensmtpd-extras/APKBUILD @@ -0,0 +1,85 @@ +# Contributor: Shiz <hi@shiz.me> +# Maintainer: Shiz <hi@shiz.me> +pkgname=opensmtpd-extras +_pkgname=OpenSMTPD-extras +pkgver=6.6.0 +pkgrel=0 +pkgdesc="OpenSMTPD addons" +url="https://opensmtpd.org/" +arch="all" +license="ISC" +makedepends=" + autoconf + automake + hiredis-dev + libevent-dev + libtool + mariadb-connector-c-dev + postgresql-dev + sqlite-dev + " +subpackages="$pkgname-doc" +source="https://github.com/OpenSMTPD/$_pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz + 0001-uint8_t-is-defined-in-stdint.h-at-least-on-Linux.patch + 0002-wrap-stdint.h-in-autoconf-variables.patch + remove-decls.patch + " +builddir="$srcdir/$_pkgname-$pkgver" +options="!check" # upstream does not provide tests + +_extras=" + table-ldap + table-mysql + table-passwd + table-postgres + table-redis + table-socketmap + table-sqlite + table-stub + " +for _extra in $_extras; do + subpackages="$subpackages opensmtpd-$_extra:_package_extra" + depends="$depends opensmtpd-$_extra" +done + +prepare() { + default_prepare + ./bootstrap +} + +build() { + local with_extras + local extra; for extra in $_extras; do + with_extras="$with_extras --with-$extra" + done + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc/smtpd \ + --mandir=/usr/share/man \ + --libexecdir=/usr/lib \ + --with-pie \ + --with-mantype=man \ + $with_extras + + # the Redis table expects <hiredis.h> without subdirectory, so indulge it + make REDIS_CPPFLAGS='-I /usr/include/hiredis' +} + +package() { + make DESTDIR="$pkgdir" install +} + +_package_extra() { + local name="${subpkgname#opensmtpd-}" + pkgdesc="OpenSMTPD $name addon" + depends="" + + mkdir -p "$subpkgdir"/usr/lib/opensmtpd + mv "$pkgdir"/usr/lib/opensmtpd/$name "$subpkgdir"/usr/lib/opensmtpd/ +} + +sha512sums="0c2f89449f51df243d8933a228f7685c8262376a1c95632517c02066c7be6155ddeae71ce364d953d3571cad4a46cfdbfbb11010ee778d82f6185b49d1336003 opensmtpd-extras-6.6.0.tar.gz +2e12845233437bef691ef92a2b4ffcc307b7cd72ec61b2063604034e28266550940ed432ef66a871fe82030df68b01cdd50ac97a255bf7724ab62a43d45ca4e5 0001-uint8_t-is-defined-in-stdint.h-at-least-on-Linux.patch +df6f52669e1df3d2b134fa8ec99795b0cef3f6aa38ccb5f85def240370b487988d6576fb769dee7d3eba30cfb291298b1c5a22433f4e6243307c589a7bbdb538 0002-wrap-stdint.h-in-autoconf-variables.patch +36efd3b6cf75728cc8b75b3d9d6bf464d1e949ccfbe6151ed53dbba0f9ee1e50eb61afcca05af302ab359bc9ea1136e7750a15e5f5b824899141298d3060782a remove-decls.patch" diff --git a/community/opensmtpd-extras/remove-decls.patch b/community/opensmtpd-extras/remove-decls.patch new file mode 100644 index 0000000000..5332573e90 --- /dev/null +++ b/community/opensmtpd-extras/remove-decls.patch @@ -0,0 +1,19 @@ +__BEGIN_DECLS / __END_DECLS are a glibc-only wrapper mechanism to make +C declarations work in C++ code. As musl does not support these and the +OpenSMTPD codebase is solely C anyway, simply remove them. + +--- a/extras/tables/table-ldap/ber.h ++++ b/extras/tables/table-ldap/ber.h +@@ -75,7 +75,6 @@ + size_t bo_n; + }; + +-__BEGIN_DECLS + struct ber_element *ber_get_element(unsigned long); + void ber_set_header(struct ber_element *, int, + unsigned long); +@@ -123,4 +122,3 @@ + void ber_set_application(struct ber *, + unsigned long (*)(struct ber_element *)); + void ber_free(struct ber *); +-__END_DECLS |