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
# Contributor: Alain Kalker <a.c.kalker at gmail dot com>

pkgname=seed7
pkgver="05_20130203"
pkgrel=2
pkgdesc="An extensible, general purpose programming language."
arch=('i686' 'x86_64')
url="http://seed7.sourceforge.net"
license=('GPL2' 'LGPL')
depends=('ncurses' 'libx11')
source=("http://sourceforge.net/projects/${pkgname}/files/${pkgname}/${pkgname}_${pkgver}/${pkgname}_${pkgver}.tgz")
md5sums=('6cdb7bdae1e049e2de73d02b7302314e')

build() {
  cd ${srcdir}/${pkgname}/src
	export S7_LIB_DIR=/usr/lib/${pkgname} SEED7_LIBRARY=/usr/share/${pkgname}/lib
	make depend
	make -j4
	make s7c
}

check() {
  cd ${srcdir}/${pkgname}/src
	make test
}

package() {
  cd ${srcdir}/${pkgname}
	install -dm755 ${pkgdir}/usr/bin
	install -m755 bin/{s7,s7c} ${pkgdir}/usr/bin
	install -dm755 ${pkgdir}/usr/share/doc/${pkgname}
	install -m755 doc/* ${pkgdir}/usr/share/doc/${pkgname}
	install -dm755 ${pkgdir}/usr/lib/${pkgname}
	install -m644 bin/*.a ${pkgdir}/usr/lib/${pkgname}
	install -dm755 ${pkgdir}/usr/share/man/man1
	mv ${pkgdir}/usr/share/doc/${pkgname}/*.1 ${pkgdir}/usr/share/man/man1
	install -dm755 ${pkgdir}/usr/share/${pkgname}
	cp -dr --no-preserve=ownership prg lib ${pkgdir}/usr/share/${pkgname}
	rm ${pkgdir}/usr/share/${pkgname}/prg/{s7,s7c}
}