summaryrefslogtreecommitdiff
path: root/repo/upx/upx.xibuild
blob: a23e930b18619f8e084054465197a9c698b62949 (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
#!/bin/sh

NAME="upx"
DESC="The Ultimate Packer for eXecutables"

MAKEDEPS=" cmake ninja"

PKG_VER=4.0.2
SOURCE="https://github.com/upx/upx/releases/download/v$PKG_VER/upx-$PKG_VER-src.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DUPX_CONFIG_DISABLE_WERROR=ON \
		-DUPX_CONFIG_DISABLE_SANITIZE=ON \
		-DUPX_CONFIG_DISABLE_GITREV=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$PKG_DEST" cmake --install build
}