summaryrefslogtreecommitdiff
path: root/repo/system/pam/pam.xibuild
blob: 366ec3c18c20401960ef510e4eb5b98741f3351a (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
41
42
43
44
45
46
#!/bin/sh

MAKEDEPS="make automake"
DEPS="musl libxcrypt"

PKG_VER=1.5.2
SOURCE=https://github.com/linux-pam/linux-pam/releases/download/v$PKG_VER/Linux-PAM-$PKG_VER.tar.xz
ADDITIONAL="
	system-auth.pamd
	system-account.pamd
	system-password.pamd
	system-session.pamd
	other.pamd
"
DESC="PAM (Pluggable Authentication Modules) library"

prepare () {
    # prevent install of an uneeded systemd file
    sed -e /service_DATA/d \
        -i modules/pam_namespace/Makefile.am &&
    autoreconf

}

build () {
    ./configure --prefix=/usr                        \
            --sbindir=/usr/sbin                  \
            --sysconfdir=/etc                    \
            --libdir=/usr/lib                    \
            --enable-securedir=/usr/lib/security \
            --docdir=/usr/share/doc/Linux-PAM-$PKG_VER &&
    make
}

package () {
    make DESTDIR=$PKG_DEST install
    install -m755 -d $PKG_DEST/etc/pam.d

    cp system-account.pamd $PKG_DEST/etc/pam.d/system-account
    cp system-auth.pamd $PKG_DEST/etc/pam.d/system-auth
    cp system-password.pamd $PKG_DEST/etc/pam.d/system-password
    cp system-session.pamd $PKG_DEST/etc/pam.d/system-session
    cp other.pamd $PKG_DEST/etc/pam.d/other
    [ -d $PKG_DEST/usr/lib/systemd ] && rm -r $PKG_DEST/usr/lib/systemd
    return 0
}