summaryrefslogtreecommitdiff
path: root/core/bzip2/MAKEPKG
blob: 96e8179e4a30561a7eff3065d98c130016a4be9e (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
#!/bin/mkpkg
# description: Block-sorting file compressor
# url: https://sourceware.org/bzip2

# license: bzip2-1.0.6

name=bzip2
version=1.0.8
release=1
source=(https://sourceware.org/pub/bzip2/bzip2-$version.tar.gz)
depends=()
makedeps=()

sha256sums=(
    "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
)

build() {
    cd bzip2-$version

    # Build shared library
    make -f Makefile-libbz2_so CC=clang
    make CC=clang

    # Install
    make PREFIX=$PKG/ install

    # Install shared library
    install -m 755 libbz2.so.$version $PKG/lib/
    ln -s libbz2.so.$version $PKG/lib/libbz2.so.1.0
    ln -s libbz2.so.$version $PKG/lib/libbz2.so

    # Move headers to /include
    mv $PKG/include/* $PKG/include/ 2>/dev/null || true

    # Remove static library
    rm -f $PKG/lib/libbz2.a

    # Remove man dir if wrong location
    rm -rf $PKG/man
    mkdir -p $PKG/usr/share/man/man1
    install -m 644 bzip2.1 $PKG/usr/share/man/man1/
    ln -s bzip2.1 $PKG/usr/share/man/man1/bunzip2.1
    ln -s bzip2.1 $PKG/usr/share/man/man1/bzcat.1
}

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

# vim: filetype=sh