From e6646bd43c370a6784fa06e98791b3ca8e257c70 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 10 Jan 2019 13:51:05 +0000 Subject: community/cntlm: move from testing fixes #7351 --- community/cntlm/APKBUILD | 34 ++++++++++++++++++++++++++++++++++ community/cntlm/cntlm.initd | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 community/cntlm/APKBUILD create mode 100644 community/cntlm/cntlm.initd (limited to 'community/cntlm') 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 +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 $? +} -- cgit v1.2.3