summaryrefslogtreecommitdiff
path: root/opt/unzip/MAKEPKG
blob: ed3a9588580e3ee532e10b5d85e2dbabaf7d1640 (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
#!/bin/mkpkg
# description: Decompress utility for zip archives
# url: https://infozip.sourceforge.net/UnZip.html

name=unzip
version=6.0
release=1
depends=()
source=(https://downloads.sourceforge.net/sourceforge/infozip/unzip60.tar.gz
        cumulative.patch
        28-cve-2022-0529-and-cve-2022-0530.patch)
sha256sums=(
    "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
    "f4173a8e2a2eea7f537ef8919369c2b6bac43d9ccd05345755ac0d1457c24234"
    "a27efd8c4950fb3d942d602ad7846996e02aafd77a8ad1e26700e42ae6c1cd37"
)

build() {
    cd unzip60

    patch -Np1 -i $SRC/cumulative.patch
    patch -p1 -F3 -i $SRC/28-cve-2022-0529-and-cve-2022-0530.patch

    sed -i 's/-O3//' unix/configure

    make -f unix/Makefile LOCAL_UNZIP="$CFLAGS" unzips
    make -f unix/Makefile \
        prefix=$PKG/usr \
        MANDIR=$PKG/usr/share/man/man1 \
        install

    ln -sf unzip $PKG/usr/bin/zipinfo
}

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

# vim: filetype=sh