aboutsummaryrefslogtreecommitdiffstats
path: root/community/uncrustify/APKBUILD
blob: 9facaac0d0543c2f0e556d354771d9d1622d01f4 (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
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=uncrustify
pkgver=0.70.1
pkgrel=0
pkgdesc="A source code beautifier"
url="https://github.com/uncrustify/uncrustify"
arch="all"
license="GPL-2.0-or-later"
makedepends="cmake python3"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/uncrustify/uncrustify/archive/uncrustify-$pkgver.tar.gz"
builddir="$srcdir/uncrustify-uncrustify-$pkgver"

build() {
	[ "$CARCH" = "s390x" ] && sed -i '/^12004/d' tests/c-sharp.test
	mkdir -p build
	cd build
	cmake -DCMAKE_INSTALL_PREFIX=/usr ..
	make
}

check() {
	cd "$builddir/build"
	make test
}

package() {
	install -d -m755 "$pkgdir"/usr/share/$pkgname
	install -m644 etc/*.cfg "$pkgdir"/usr/share/$pkgname
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING

	cd build
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

sha512sums="d28f02d5c82e3b398fd0391fe49eb1260a905e525c7c4b513ccea68ffff480d96cd77936267dd7d6870a59903c72578efc0ff85696c877caf1f1c89160c79334  uncrustify-0.70.1.tar.gz"