summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0cc7a388bbd99b72e945868cc4c5e62ba4a5c387 (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
# Contributor: 458italia <svenskaparadox@gmail.com>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
# Maintainer: aksr <aksr at t-com dot me>
pkgname=nwcc
pkgver=0.8.3
pkgrel=2
pkgdesc='A small C compiler for Unix systems.'
arch=('i686' 'x86_64')
url="http://nwcc.sourceforge.net/"
license=('BSD')
depends=('glibc')
makedepends=('clang')
source=("http://downloads.sourceforge.net/$pkgname/${pkgname}_${pkgver}.tar.gz")
md5sums=('39511d2cb182925273a4493195236eae')
sha1sums=('2ab1825dc1f8bd5258204bab19e8fafad93fef26')
sha256sums=('e64b16c663f2f845d6436342722d29a5e32d03602971de2d521281a18188b065')

prepare() {
	cd ${pkgname}_${pkgver}
	sed 's|lib64/|lib/|g' -i driver.c
	sed 's|-Wall -W -ggdb -g||g' -i configure
	sed '20a#include <time.h>' -i sweeper.c
}

build() {
	cd ${pkgname}_${pkgver}
	CC=clang ./configure --installprefix=/usr --nocross
	make
}

package() {
	cd ${pkgname}_${pkgver}
	mkdir -p "$pkgdir"/usr/{bin,lib}
	install -m755 nwcc{,1} snake "$pkgdir"/usr/bin/
	install -m644 libnwcc.o "$pkgdir"/usr/lib/
	install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}