aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-03-02 20:57:48 +0100
committerJakub Jirutka <jakub@jirutka.cz>2020-03-02 21:01:05 +0100
commita37a0cbcb0cd448e30b4f1b775daa856ee06b1bb (patch)
treec6d9a6aed68c78635b619c478463522acf0519ec
parentc325c4cf49fc80b50d1eac10a708571fe54dd4a0 (diff)
downloadaports-a37a0cbcb0cd448e30b4f1b775daa856ee06b1bb.tar.gz
aports-a37a0cbcb0cd448e30b4f1b775daa856ee06b1bb.tar.bz2
aports-a37a0cbcb0cd448e30b4f1b775daa856ee06b1bb.tar.xz
main/openvpn-auth-ldap: move plugin so to /usr/lib/openvpn/plugins
Where the plugins are supposed to be installed...
-rw-r--r--main/openvpn-auth-ldap/APKBUILD8
-rw-r--r--main/openvpn-auth-ldap/fix-make-install.patch13
-rw-r--r--main/openvpn-auth-ldap/openvpn-auth-ldap.post-upgrade14
3 files changed, 32 insertions, 3 deletions
diff --git a/main/openvpn-auth-ldap/APKBUILD b/main/openvpn-auth-ldap/APKBUILD
index 62a78c3404..d59e77aa1e 100644
--- a/main/openvpn-auth-ldap/APKBUILD
+++ b/main/openvpn-auth-ldap/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openvpn-auth-ldap
pkgver=2.0.4
-pkgrel=2
+pkgrel=3
pkgdesc="LDAP authentication and authorization plugin for OpenVPN 2.x"
url="https://github.com/threerings/openvpn-auth-ldap/"
arch="all"
@@ -9,8 +9,10 @@ license="BSD-3-Clause"
depends="openvpn"
makedepends="automake autoconf re2c openldap-dev openvpn-dev gcc-objc"
pkggroups="openvpn"
+install="$pkgname.post-upgrade"
source="https://github.com/threerings/openvpn-auth-ldap/archive/auth-ldap-$pkgver.tar.gz
default-config.patch
+ fix-make-install.patch
"
builddir="$srcdir/$pkgname-auth-ldap-$pkgver"
@@ -42,11 +44,11 @@ check() {
}
package() {
- mkdir -p "$pkgdir"/usr/lib
make DESTDIR="$pkgdir" install
install -D -m 640 -g openvpn auth-ldap.conf "$pkgdir"/etc/openvpn/auth-ldap.conf
}
sha512sums="ffa1f1617acd3f4e96d3abea7e5611d8b8406c92ff1298ac0520f2d42f188116904187d3ca8c0ae88e0bcc6449ec4c8494a18770a4635c1ee7301baaaddfa12e auth-ldap-2.0.4.tar.gz
-7d33287dde5ef338797d395f6e254d6e3116cbc274f89fc44b0de7f624d51c23c5734229279023c5b818d1ce7313f761770ee2f60c1975713feefdf03f040374 default-config.patch"
+7d33287dde5ef338797d395f6e254d6e3116cbc274f89fc44b0de7f624d51c23c5734229279023c5b818d1ce7313f761770ee2f60c1975713feefdf03f040374 default-config.patch
+e6f826558a8542e3372c23692b9006ae5978110cd599ccde4756ace6bedd0c6a249738b00ba29e7121727246e001154f7aeb3804864fbc935e0acbb17b7d2a27 fix-make-install.patch"
diff --git a/main/openvpn-auth-ldap/fix-make-install.patch b/main/openvpn-auth-ldap/fix-make-install.patch
new file mode 100644
index 0000000000..e40ef03791
--- /dev/null
+++ b/main/openvpn-auth-ldap/fix-make-install.patch
@@ -0,0 +1,13 @@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -51,8 +51,8 @@
+ $(OBJC_LIBS) \
+ $(FLEX_LIBS)
+
+-INSTALL_LIB= $(INSTALL) -m 755
+-PLUGIN_INSTALL_DIR= $(DESTDIR)$(libdir)
++INSTALL_LIB= $(INSTALL) -m 755 -D
++PLUGIN_INSTALL_DIR= $(DESTDIR)$(libdir)/openvpn/plugins
+
+ all:: $(PLUGIN_FILE) $(AUTH_LIB) testplugin
+
diff --git a/main/openvpn-auth-ldap/openvpn-auth-ldap.post-upgrade b/main/openvpn-auth-ldap/openvpn-auth-ldap.post-upgrade
new file mode 100644
index 0000000000..8056c772b3
--- /dev/null
+++ b/main/openvpn-auth-ldap/openvpn-auth-ldap.post-upgrade
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+ver_new="$1"
+ver_old="$2"
+
+if [ "$(apk version -t "$ver_old" "2.0.4-r3")" = '<' ]; then
+ cat >&2 <<-EOF
+ *
+ * openvpn-auth-ldap.so was moved to /usr/lib/openvpn/plugins/!
+ *
+ EOF
+fi
+
+exit 0