aboutsummaryrefslogtreecommitdiffstats
path: root/main/p7zip/APKBUILD
blob: 24f1bce2bc49d7927f3aa5eeaca8bcf3ed5631a6 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=p7zip
pkgver=16.02
pkgrel=0
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 yasm nasm"
install=""
source="http://downloads.sourceforge.net/sourceforge/$pkgname/${pkgname}_${pkgver}_src_all.tar.bz2"

_builddir="$srcdir"/${pkgname}_${pkgver}
prepare() {
	local makefile="makefile.linux_any_cpu_gcc_4.X"
	case "$CARCH" in
		x86)    makefile="makefile.linux_x86_asm_gcc_4.X" ;;
		x86_64) makefile="makefile.linux_amd64_asm" ;;
	esac

	cd "$_builddir"
	ln -sf $makefile makefile.machine || return 1

	sed -e "s,g++,${CXX:-g++}," -i makefile.machine
	sed -e "s,gcc,${CC:-gcc}," -i makefile.machine
}

build() {
	cd "$_builddir"
	make all3 OPTFLAGS="${CXXFLAGS}" || return 1
}

package() {
	cd "$_builddir"
	make install DEST_DIR="$pkgdir" DEST_HOME="/usr" \
		DEST_MAN="/usr/share/man" \
		DEST_SHARE_DOC="/usr/share/doc/$pkgname" || return 1

	install -Dm755 contrib/gzip-like_CLI_wrapper_for_7z/$pkgname \
		"$pkgdir"/usr/bin/$pkgname || return 1
	install -Dm644 contrib/gzip-like_CLI_wrapper_for_7z/man1/$pkgname.1 \
		"$pkgdir"/usr/share/man/man1/$pkgname.1 || return 1
}

md5sums="a0128d661cfe7cc8c121e73519c54fbf  p7zip_16.02_src_all.tar.bz2"
sha256sums="5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f  p7zip_16.02_src_all.tar.bz2"
sha512sums="d2c4d53817f96bb4c7683f42045198d4cd509cfc9c3e2cb85c8d9dc4ab6dfa7496449edeac4e300ecf986a9cbbc90bd8f8feef8156895d94617c04e507add55f  p7zip_16.02_src_all.tar.bz2"