aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-08 02:20:43 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-03-08 02:28:44 +0100
commit4a0227454b525917233700cd00a301571332bda5 (patch)
treec3a8ad65b1d09d88bb443ddf74f4447531daf6d0
parent2fc8f658e0323f005e5257da457c1a5c151a0ff7 (diff)
downloadaports-4a0227454b525917233700cd00a301571332bda5.tar.bz2
aports-4a0227454b525917233700cd00a301571332bda5.tar.xz
testing/upx: improve and fix abuild, add -doc subpkg
-rw-r--r--testing/upx/APKBUILD38
1 files changed, 22 insertions, 16 deletions
diff --git a/testing/upx/APKBUILD b/testing/upx/APKBUILD
index 729a690b2f..26f69b0404 100644
--- a/testing/upx/APKBUILD
+++ b/testing/upx/APKBUILD
@@ -1,32 +1,38 @@
-#-*-mode: Shell-script; coding: utf-8;-*-
# Maintainer: Mitch Tishmack <mitch.tishmack@gmail.com>
+# TODO: unbundle lzma-sdk
pkgname=upx
pkgver=3.93
-pkgrel=0
-pkgdesc="UPX - the Ultimate Packer for eXecutables"
+pkgrel=1
+pkgdesc="The Ultimate Packer for eXecutables"
url="https://upx.github.io"
arch="all !ppc64le"
-license="gpl"
-depends="zlib ucl"
-makedepends="$depends zlib-dev bash"
-source="
- https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}-src.tar.xz
- 0001-rm-broken-whitespace-check.patch
-"
+license="GPL2 public-domain"
+# perl-dev is used to generate man pages
+makedepends="bash perl-dev ucl-dev zlib-dev"
+subpackages="$pkgname-doc"
+source="https://github.com/upx/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver-src.tar.xz
+ 0001-rm-broken-whitespace-check.patch"
builddir="$srcdir/$pkgname-$pkgver-src"
+prepare() {
+ default_prepare || return 1
+
+ cd "$builddir"
+ sed -i 's/ -O2/ /' src/Makefile
+}
+
build() {
cd "$builddir"
- make UPX_LZMA_VERSION=0x465 UPX_LZMADIR="${srcdir}" all || return 1
+
+ make UPX_LZMADIR="$srcdir" all || return 1
}
package() {
cd "$builddir"
- install -Dm0755 src/upx.out "${pkgdir}/usr/bin/upx" || return 1
+
+ install -D -m 0755 src/upx.out "$pkgdir"/usr/bin/upx || return 1
+ install -D -m 0644 doc/upx.1 "$pkgdir"/usr/share/man/man1/upx.1
}
-md5sums="d8da85311492a5f9e3a1fecc979f879b upx-3.93-src.tar.xz
-1025aa041780c577d60c3dc8495c66c9 0001-rm-broken-whitespace-check.patch"
-sha256sums="893f1cf1580c8f0048a4d328474cb81d1a9bf9844410d2fd99f518ca41141007 upx-3.93-src.tar.xz
-427e30ecf5cd689ccbb07ee55422f9d48d4957211777c7091ba9de28e7c1e28b 0001-rm-broken-whitespace-check.patch"
+
sha512sums="41c18c11601c78043a9ae22d87e73c173971b19b62207e7bf058e29a452456d802bf89931324afd3a9848018d1ef2007e0915b41cfb8a97a44d3cebb559cefad upx-3.93-src.tar.xz
a41dd8b8e9e884c78c410a49b4486963f6dd90759ba49eb05123e81b8e4fbe3d23af2ba5c2acf64218b7edeec7df0793b4030d1375c167a183a4d70d21addf50 0001-rm-broken-whitespace-check.patch"