blob: 38b6bb4eb6574fa3efe725b7f5d2636d702ca8bd (
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
|
# Maintainer: Boris-Chengbiao Zhou <bobo1239@web.de>
pkgname=modex-git
pkgver=r5.e6319f5
pkgrel=1
arch=(x86_64)
pkgdesc="A model extractor for the Spin model checker"
url="http://spinroot.com/modex"
license=(custom)
depends=(glibc sh)
makedepends=(git)
source=(git+https://github.com/nimble-code/Modex.git)
sha512sums=(SKIP)
pkgver() {
cd Modex
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd Modex
# Enable -O3 and full RELRO
sed -i 's/CFLAGS = -g/CFLAGS = -O3 -Wl,-z,now/' Src/makefile
# Use CFLAGS when building final binary
sed -i 's/$(CC) -o modex/$(CC) $(CFLAGS) -o modex/' Src/makefile
# Adjust path for defaults.lut
sed -i 's/"\/usr\/local\/modex\/defaults.lut"/"\/usr\/share\/modex\/defaults.lut"/' Src/xtract.c
}
build() {
cd Modex
make
}
package() {
install -Dm755 "$srcdir/Modex/Src/modex" "$pkgdir/usr/bin/modex"
install -Dm755 "$srcdir/Modex/Scripts/verify" "$pkgdir/usr/bin/verify"
install -Dm644 "$srcdir/Modex/Src/defaults.lut" "$pkgdir/usr/share/modex/defaults.lut"
install -Dm644 "$startdir/LICENSE" "$pkgdir/usr/share/licenses/modex-git/LICENSE"
}
|