updated on Mon Jan 16 16:00:41 UTC 2012
[aur-mirror.git] / csmith / PKGBUILD
blob0172e7b93b74a365e184d6ae92b532147200e8cf
1 # Maintainer: spider-mario <spidermario@free.fr>
2 pkgname=csmith
3 pkgver=2.0.0
4 pkgrel=3
5 pkgdesc="Tool for stress-testing compilers, static analyzers, and other tools that process C code"
6 arch=('i686' 'x86_64')
7 url="http://embed.cs.utah.edu/csmith/"
8 license=('custom:BSD')
9 depends=('perl')
10 source=(csmith.sh http://embed.cs.utah.edu/csmith/$pkgname-$pkgver.tar.gz)
11 md5sums=('75128bd5310cbc1c139b696da3b8e4d8'
12          'ab0bee5da4d1c2b55c32789b716846cb')
14 build() {
15   cd "$srcdir/$pkgname-$pkgver"
16   ./configure --prefix=/usr
17   make
20 check() {
21   cd "$srcdir/$pkgname-$pkgver"
22   make -k check
25 package() {
26   cd "$srcdir/$pkgname-$pkgver"
28   make DESTDIR="$pkgdir/" install
30   install runtime/safe_math{,_macros,_macros_notmp}.h "$pkgdir/usr/include/$pkgname-$pkgver/"
31   rm "$pkgdir/usr/include/$pkgname-$pkgver/"safe_math{,_macros,_macros_notmp}.m4
33   sed --expression=s/gcc-4.0/gcc/g scripts/compiler_test.in > "$pkgdir/usr/bin/compiler_test.in"
35   install --directory "$pkgdir/opt/"
36   pushd "$pkgdir/opt/"
37     cp --recursive "$srcdir/$pkgname-$pkgver/" "$pkgdir/opt/$pkgname"
38   popd
40   install --directory "$pkgdir/etc/profile.d/"
41   install ../../csmith.sh "$pkgdir/etc/profile.d/"
43   install --directory "$pkgdir/usr/share/licenses/$pkgname/"
44   install COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
47 # vim:set ts=2 sw=2 et: