summaryrefslogtreecommitdiff
path: root/repo/system/utmps.xibuild
blob: 28b358f47ff1bbd1550761beea9bbbf0efbf351e (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
#!/bin/sh

MAKEDEPS=""
DEPS="skalib"

PKG_VER=0.1.1.0
SOURCE=https://skarnet.org/software/utmps/utmps-0.1.1.0.tar.gz

DESC="Library implementing utmpx.h family of functions"

prepare () {
    sed -i -e "s/@@VERSION@@/0.1.1.0/g" -- /tmp/*.pc 
}

build () {
    ./configure \
            --enable-shared      \
            --libdir=/usr/lib    \
            --with-dynlib=/lib   \
            --libexecdir="/lib/utmps" \
            --with=dynlib=/lib
    make
}

package () {
    make DESTDIR=$PKG_DEST install
    ln -sv utmps/utmpx.h $PKG_DEST/usr/include/utmpx.h

    cat > $PKG_DEST/usr/lib/pkgconfig/utmps.pc << EOF
Name: utmps
Description: A secure implementation of the utmp mechanism.
URL: https://skarnet.org/software/utmps/
Version: @@VERSION@@
Requires.private: skalibs
Libs: -lutmps
Cflags: -I/usr/include/utmps
EOF
}