aboutsummaryrefslogblamecommitdiffstats
path: root/community/ssh-ldap-pubkey/APKBUILD
blob: 3456957015931dcadbe6a617d9af58324819388d (plain) (tree)
1
2
3
4
5


                                               
            
        


































                                                                                            
                                                                                                                                                                          
                                                                                                                                                  
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ssh-ldap-pubkey
pkgver=1.3.0
pkgrel=0
pkgdesc="Utility to manage SSH public keys stored in LDAP"
url="https://github.com/jirutka/ssh-ldap-pubkey"
arch="noarch"
license="MIT"
depends="python3 py3-pyldap py3-docopt"
makedepends="python3-dev"
install="$pkgname.post-install"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jirutka/$pkgname/archive/v$pkgver.tar.gz
	ldap.conf.patch"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare || return 1

	sed -i 's|/etc/ldap.conf|/etc/ssh-ldap-pubkey.conf|g' bin/ssh-ldap-pubkey
}

build() {
	cd "$builddir"
	python3 setup.py build
}

package() {
	cd "$builddir"

	python3 setup.py install --prefix=/usr --root="$pkgdir" || return 1

	install -m 644 -D etc/ldap.conf \
		"$pkgdir"/etc/ssh-ldap-pubkey.conf || return 1

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	cp README.md etc/openssh-lpk.schema "$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="0c675b0bf68ccecdabda5f4f559772fd0d34151794c2a3855e063befffe9777ceb79e99b5649f15e5bd0c4ea40c22f734d1748a8053d49bffea58077b72efe16  ssh-ldap-pubkey-1.3.0.tar.gz
5b96dd8b1150eb62db7d33d1eee5ed9b28ebaf487c6a8cab6ba1d66d14496c2fdb1c73c1c0959ccd99ea53359b8d82861b7416dc0351bfa22ccfe59b5f530564  ldap.conf.patch"