OSDN Git Service

upg
[joborun/jobcore.git] / pam / PKGBUILD
1 #!/usr/bin/bash
2 # JOBoRun               : Jwm OpenBox Obarun RUNit
3 # Maintainer            : Joe Bo Run <joborun@disroot.org>
4 # PkgSource             : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
5 #-----------------------------------------| DESCRIPTION |---------------------------------------
6
7 pkgname=pam
8 pkgver=1.5.2
9 pkgrel=01
10 pkgdesc="PAM (Pluggable Authentication Modules) library - w/o systemd"
11 arch=('x86_64')
12 url="http://linux-pam.org"
13 depends=('glibc' 'libtirpc' 'pambase' 'audit' 'libaudit.so' 'libxcrypt' 'libcrypt.so')
14 makedepends=('flex' 'w3m' 'docbook-xml>=4.4' 'docbook-xsl')
15 provides=('libpam.so' 'libpamc.so' 'libpam_misc.so')
16 backup=(etc/security/{access.conf,faillock.conf,group.conf,limits.conf,namespace.conf,namespace.init,pam_env.conf,time.conf} etc/environment)
17 source=(https://github.com/linux-pam/linux-pam/releases/download/v$pkgver/Linux-PAM-$pkgver.tar.xz{,.asc}
18         $pkgname.tmpfiles)
19
20 options=('!emptydirs')
21
22 build() {
23   cd Linux-PAM-$pkgver
24 # prevent the installation of an unneeded systemd file:
25 #       sed -e /service_DATA/d \
26 #           -i modules/pam_namespace/Makefile.am &&
27 # this is the same as proposed by LFS as removing it
28 # at the end with the post_-install statement at the
29 # end of the PKGBUILD
30 # also disabling systemd options here in ./config 
31 # seems also acceptable
32
33   ./configure \
34     --libdir=/usr/lib \
35     --sbindir=/usr/bin \
36     --disable-db \
37     --disable-systemd
38   make
39 }
40
41 package() {
42   install -Dm 644 $pkgname.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf
43   cd Linux-PAM-$pkgver
44   make DESTDIR="$pkgdir" SCONFIGDIR=/etc/security install
45
46   # set unix_chkpwd uid
47   chmod +s "$pkgdir"/usr/bin/unix_chkpwd
48
49   # remove doc which is not used anymore
50   # FS #40749
51   rm "$pkgdir"/usr/share/doc/Linux-PAM/sag-pam_userdb.html
52 }
53
54 ## added to Arch's PKGBUILD to remove this useless file ##
55
56 post_install() {
57         # Fix unix_chkpwd perms.
58         chmod 4755 ${DESTDIR}/usr/bin/unix_chkpwd
59         rm -r ${DESTDIR}/usr/lib/systemd
60         vlicense COPYING LICENSE
61 }
62
63 #---- license gpg-key sha256sums ----
64
65 license=('GPL2')
66
67 validpgpkeys=(
68         '8C6BFD92EE0F42EDF91A6A736D1A7F052E5924BB' # Thorsten Kukuk
69         '296D6F29A020808E8717A8842DB5BD89A340AEB7' #Dimitry V. Levin <ldv@altlinux.org>
70 )
71
72 sha256sums=(e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d  # Linux-PAM-1.5.2.tar.xz
73         f388f9ea16a3cf541e71d452f024b83e62bf6391bcdca509d7e5027a62c07fd8  # Linux-PAM-1.5.2.tar.xz.asc
74         5631f224e90c4f0459361c2a5b250112e3a91ba849754bb6f67d69d683a2e5ac) #  pam.tmpfiles