aboutsummaryrefslogtreecommitdiffstats
path: root/community/cntlm
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-01-10 13:51:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-01-10 13:51:05 +0000
commite6646bd43c370a6784fa06e98791b3ca8e257c70 (patch)
tree7d82db59ca69b1228ebb044e56e5eef1991dd5bb /community/cntlm
parent1b6ff67ec4274f631651fefa3b8970a15b80143d (diff)
downloadaports-e6646bd43c370a6784fa06e98791b3ca8e257c70.tar.bz2
aports-e6646bd43c370a6784fa06e98791b3ca8e257c70.tar.xz
community/cntlm: move from testing
fixes #7351
Diffstat (limited to 'community/cntlm')
-rw-r--r--community/cntlm/APKBUILD34
-rw-r--r--community/cntlm/cntlm.initd39
2 files changed, 73 insertions, 0 deletions
diff --git a/community/cntlm/APKBUILD b/community/cntlm/APKBUILD
new file mode 100644
index 0000000000..c4457c564d
--- /dev/null
+++ b/community/cntlm/APKBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=cntlm
+pkgver=0.92.3
+pkgrel=3
+pkgdesc="NTLM Session Response / NTLMv2 authenticating HTTP proxy"
+url="http://cntlm.sourceforge.net/"
+arch="all"
+license="GPL-2.0-or-later"
+depends=""
+makedepends=""
+install=""
+subpackages="$pkgname-doc $pkgname-openrc"
+source="https://downloads.sourceforge.net/project/cntlm/cntlm/cntlm%20$pkgver/cntlm-$pkgver.tar.gz
+ cntlm.initd
+ "
+builddir="$srcdir"/cntlm-$pkgver
+build() {
+ cd "$builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+sha512sums="64f97524f1c807dd3bad3f6c1cffb9d3315c720b086336b7379c8c6380c7c483a9c810b40e7e5ea463387476cd718a8e5fcbc1c7103d7128dfc72a8607e6fd39 cntlm-0.92.3.tar.gz
+64df05631a92a92a90cbd5170d1c5215972f0e52c1b7522fc20795de7062e403159ad95c7a50d40bbc721a596dd5e707f12384613defc683c66c82f97dabe271 cntlm.initd"
diff --git a/community/cntlm/cntlm.initd b/community/cntlm/cntlm.initd
new file mode 100644
index 0000000000..86490eaee0
--- /dev/null
+++ b/community/cntlm/cntlm.initd
@@ -0,0 +1,39 @@
+#!/sbin/openrc-run
+
+description="Authenticating HTTP accelerator for NTLM secured proxies"
+
+depend() {
+ need localmount net
+ use dns logger
+ after bootmisc firewall
+}
+
+checkconfig() {
+ CNTLM_INSTANCE=${SVCNAME#*.}
+ if [ -n "${CNTLM_INSTANCE}" -a "${SVCNAME}" != "cntlm" ]; then
+ CNTLM_CONF="/etc/cntlm.d/${CNTLM_INSTANCE}.conf"
+ CNTLM_PID="/run/cntlm.${CNTLM_INSTANCE}.pid"
+ else
+ CNTLM_CONF="/etc/cntlm.conf"
+ CNTLM_PID="/run/cntlm.pid"
+ fi
+ if [ ! -e ${CNTLM_CONF} ]; then
+ eerror "You will need an ${CNTLM_CONF} first"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/cntlm --pidfile "${CNTLM_PID}" \
+ -- -c "${CNTLM_CONF}" -P "${CNTLM_PID}"
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/sbin/cntlm --pidfile "${CNTLM_PID}"
+ eend $?
+}