aboutsummaryrefslogtreecommitdiffstats
path: root/main/p7zip/APKBUILD
blob: dc5c00dd59d562967aea9e5a6ad249b82b4073d8 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=p7zip
pkgver=9.38.1
pkgrel=1
pkgdesc="A command-line port of the 7zip compression utility"
url="http://p7zip.sourceforge.net"
arch="all"
license="LGPL2+"
subpackages="$pkgname-doc"
depends=
makedepends="bash"
#install=p7zip.install
source="http://downloads.sourceforge.net/sourceforge/$pkgname/${pkgname}_${pkgver}_src_all.tar.bz2
		p7zip-cc-cxx.patch
                CVE-2016-9296.patch"

builddir="$srcdir"/${pkgname}_${pkgver}
build() {
	cd "$builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	sed -i "s|usr/local|usr|g" makefile
	make all3 OPTFLAGS="${CXXFLAGS}" || return 1
}

package() {
	cd "$builddir"
	make install DEST_HOME="$pkgdir"/usr DEST_MAN="$pkgdir"/usr/share/man \
		DEST_SHARE_DOC="http://www.bugaco.com/7zip"

	sed -i "s|"$pkgdir"/usr|/usr|g" "$pkgdir"/usr/bin/7z
	sed -i "s|"$pkgdir"/usr|/usr|g" "$pkgdir"/usr/bin/7za
	sed -i "s|"$pkgdir"/usr|/usr|g" "$pkgdir"/usr/bin/7zr
#	install -m755 -D contrib/VirtualFileSystemForMidnightCommander/u7z "$pkgdir"/usr/share/mc/extfs/u7z
}

md5sums="6cba8402ccab2370d3b70c5e28b3d651  p7zip_9.38.1_src_all.tar.bz2
57dbabbbf7cafc1322ad7ae354fdabab  p7zip-cc-cxx.patch
7d4da958f4df3a20afaec28b63fb19cc  CVE-2016-9296.patch"
sha256sums="fd5019109c9a1bf34ad3257d37a6853eae8151ff50345f0a3ffba7d8c5fdb995  p7zip_9.38.1_src_all.tar.bz2
c19a51d433ba2025953a36a8a86030254c9e33d00aad834a2b33e4426e99979b  p7zip-cc-cxx.patch
5a245b332ccdd690dbbdf02b05d5d8b21b35eb628c9fc41e6c6253d0bbf7ab0a  CVE-2016-9296.patch"
sha512sums="f524ffae54e0d9563a509cc4b243e830d882a925e682eb2e15e2d19cb72c947fddecd72c8507d6c1538b997b240b0827046fc2fb4f5e3f7d49840257c92b9c04  p7zip_9.38.1_src_all.tar.bz2
10fad26c7a044ef9750ce7084a5094fc9c70dfb27a7d75f1e66f716f52293d6274e376b7507c513abcd35ad9103433a6abe0eb304ae96593f90eb846b6aa934e  p7zip-cc-cxx.patch
8e4756202ad6581f38fb0a8a9fd689f86ad2ffc54a151e70d8580158c49eab3ae2e0480826b9d8f841ff3b92ef8297a4f68fa487dc5ad04743b61aa389cf1fd3  CVE-2016-9296.patch"