summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 661028486cc59582485cfd370b0d50202e3a2473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: boltgolt <boltgolt@gmail.com>
# Maintainer: Kelley McChesney <kelley@kelleymcchesney.us>
# Maintainer: Andrey Kolchenko <andrey@kolchenko.me>
pkgname=pam-python
pkgver=1.0.8
pkgrel=3
pkgdesc='Python for PAM'
arch=('x86_64')
url='http://pam-python.sourceforge.net/'
license=('GNU Affero General Public License')
depends=(
	'pam'
	'python2'
)
makedepends=(
	'python-sphinx'
	'make'
)
source=(
  "https://downloads.sourceforge.net/project/pam-python/pam-python-${pkgver}-1/pam-python-${pkgver}.tar.gz"
)
sha256sums=('fc69d7717db0509111500a81053487fa7684e1be3b7d0ae2b51970b6fdc918f6')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i'' 's|LIBDIR ?= /lib/security|LIBDIR ?= /usr/lib/security|g' src/Makefile
  sed -n '/^License/,/^--$/p' README.txt | grep -v -e '^License' -e '^-\+' > LICENSE
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  PREFIX=/usr make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  PREFIX=/usr make DESTDIR="${pkgdir}" install
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}