aboutsummaryrefslogtreecommitdiffstats
path: root/testing/upx/APKBUILD
blob: 26f69b0404d9584fa7b0e3393cc1ebfafdb0d09b (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
# Maintainer: Mitch Tishmack <mitch.tishmack@gmail.com>
# TODO: unbundle lzma-sdk
pkgname=upx
pkgver=3.93
pkgrel=1
pkgdesc="The Ultimate Packer for eXecutables"
url="https://upx.github.io"
arch="all !ppc64le"
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_LZMADIR="$srcdir" all || return 1
}

package() {
	cd "$builddir"

	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
}

sha512sums="41c18c11601c78043a9ae22d87e73c173971b19b62207e7bf058e29a452456d802bf89931324afd3a9848018d1ef2007e0915b41cfb8a97a44d3cebb559cefad  upx-3.93-src.tar.xz
a41dd8b8e9e884c78c410a49b4486963f6dd90759ba49eb05123e81b8e4fbe3d23af2ba5c2acf64218b7edeec7df0793b4030d1375c167a183a4d70d21addf50  0001-rm-broken-whitespace-check.patch"