summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fe80977e21978eb118c56f71c5b2c1760b318d4e (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
# Maintainer: xiretza <xiretza+aur@gmail.com>
_pkgname=sandsifter
pkgname="${_pkgname}-git"
pkgver=r53.4ae3e6e
pkgrel=1
pkgdesc="The x86 processor fuzzer"
arch=("i686" "x86_64")
url="https://github.com/rigred/${_pkgname}"
license=('BSD')
groups=()
depends=(python2-capstone)
makedepends=('git')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${_pkgname}::git+${url}")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/${_pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/${_pkgname}"
	# TODO: get it to build with -m32
	#rm -f injector
	#make CFLAGS="-m32"
	#mv injector{,_32}
	make CFLAGS="-no-pie"
	#mv injector{,_64}
}

package() {
	cd "$srcdir/${_pkgname}"
	install -Dm 644 -t "${pkgdir}/opt/${_pkgname}" mutator.py
	install -Dm 655 -t "${pkgdir}/opt/${_pkgname}" sifter-summarize.py
	cp -r disas gui pyutil "${pkgdir}/opt/${_pkgname}/"

	install -Dm 655 -t "${pkgdir}/usr/bin" sifter-injector
	install -Dm 655 -t "${pkgdir}/usr/bin/" sifter.py
	ln -s "/opt/${_pkgname}/sifter-summarize.py" "${pkgdir}/usr/bin/"

	install -Dm 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}