blob: 39de4a066922f7ae5e267f3bc9d663df40f7030c (
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
|
# Maintainer: Alexander Jacocks <alexander@redhat.com>
pkgname="axpbox-git"
pkgver=1.0.0.12.g35bdcd3
pkgrel=1
pkgdesc="AXPbox Alpha emulator"
arch=('i686' 'x86_64')
url="https://github.com/lenticularis39/axpbox"
license=('GPLv2')
depends=('libpcap' 'sdl2' 'openbsd-netcat')
makedepends=('cmake')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=('git+https://github.com/lenticularis39/axpbox.git')
sha512sums=('SKIP')
pkgver() {
cd "${pkgname%-*}"
printf "%s" "$(git describe --long --tags | sed 's/v//; s/-/./g')"
}
build() {
cd "${pkgname%-*}"
cmake -E make_directory build
cd build
cmake .. -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall"
MAKEFLAGS=-j"$(nproc)" cmake --build . --config Release
}
check() {
cd "${pkgname%-*}"
test/run
}
package() {
echo "Entering directory $srcdir/${pkgname%-*}/build."
cd "$srcdir/${pkgname%-*}/build"
install -d "$pkgdir/usr/bin"
install axpbox "$pkgdir/usr/bin/axpbox"
echo "Entering directory $srcdir/${pkgname%-*}."
cd "$srcdir/${pkgname%-*}"
install -d "$pkgdir/usr/share/doc/$pkgname"
install -D -t "$pkgdir/usr/share/doc/$pkgname" *.md
}
|