summaryrefslogtreecommitdiff
path: root/opt/nspr/MAKEPKG
blob: f45c0c4db7e9905c00a210910eefa72e3ce9352d (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
47
48
49
50
51
52
53
54
55
56
#!/bin/mkpkg
# description: Netscape Portable Runtime library
# url: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR

name=nspr
version=4.40
release=1
depends=()
source=(https://ftp.mozilla.org/pub/nspr/releases/v$version/src/$name-$version.tar.gz
        nspr.pc.in)
sha256sums=(
    "c0c1884c627f3db7a783f7c7314c695226b2043696791d15519e7e0578c19bdc"
    "57a655d034221760ce10278d2050bbe040b1db55be3db6e3a30f04a570877b71"
)

build() {
    cd $name-$version/nspr

    ./configure \
        --prefix=/usr \
        --libdir=/usr/lib \
        --includedir=/usr/include/nspr \
        --enable-optimize="$CFLAGS" \
        --enable-64bit \
        --disable-debug

    make
    make DESTDIR=$PKG install

    NSPR_LIBS=$(./config/nspr-config --libs)
    NSPR_CFLAGS=$(./config/nspr-config --cflags)
    NSPR_VERSION=$(./config/nspr-config --version)

    install -d $PKG/usr/lib/pkgconfig

    sed $SRC/nspr.pc.in \
        -e "s,@libdir@,/usr/lib," \
        -e "s,@prefix@,/usr," \
        -e "s,@exec_prefix@,/usr/bin," \
        -e "s,@includedir@,/usr/include/nspr," \
        -e "s,@NSPR_VERSION@,$NSPR_VERSION," \
        -e "s,@FULL_NSPR_LIBS@,$NSPR_LIBS," \
        -e "s,@FULL_NSPR_CFLAGS@,$NSPR_CFLAGS," \
        > $PKG/usr/lib/pkgconfig/nspr.pc

    rm -f $PKG/usr/bin/compile-et.pl
    rm -f $PKG/usr/bin/prerr.properties
    rm -rf $PKG/usr/include/nspr/md
}

signify() {
    untrusted comment: public key
    RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}

# vim: filetype=sh