1 # Maintainer: SpepS <dreamspepser at yahoo dot it>
6 pkgdesc="SDL Game Engine is a platform independent 2d game programming framework for c/c++ programmers with a focus on easy porting and API calls."
8 url="http://agnosent.com/wolfcms/open-source/sge2d"
10 depends=('sdl_mixer' 'sdl_image')
11 makedepends=('doxygen')
12 source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgname-$pkgver.tar.gz")
13 md5sums=('298d710ea64b05306afcb2e8bb9885a5')
16 cd "$srcdir/$pkgname-$pkgver"
18 # let's build shared libs instead of static
19 sed -e "s|-rs|-shared -Wl -o|" \
20 -e "s|\(CFLAGS=.*\)|\1 -fPIC|" \
21 -e "s|(AR)|(CC) \$(SGELDFLAGS)|" \
22 -e "s|libsge.a|libsge.so|" \
24 find . -name Makefile -exec sed -i "s|\([^ ]*\)/libsge.a|-L\1/ -lsge|g" {} \;
26 # sgestate requires sga object
27 sed -i "s|CC.*OBJSGESTATE)|& \$(OBJSGA)|" tools/Makefile
29 # remove useless -L flag
30 sed -i "s_sdl-config --libs_&|sed 's+-L/usr/lib ++'_" setup.linux
32 # let demos loads data from the right path
33 for _demo in `find demos -mindepth 1 -maxdepth 1 -type d`; do
34 sed -i "s|\".*\(data.d\"\)|\"/usr/share/sge2d/demos/${_demo/*\//}/\1|g" \
43 cd "$srcdir/$pkgname-$pkgver"
46 install -Dm755 libsge.so "$pkgdir/usr/lib/libsge.so.$pkgver"
47 ln -s /usr/lib/libsge.so.$pkgver "$pkgdir/usr/lib/libsge.so.${pkgver%%.*}"
48 ln -s /usr/lib/libsge.so.$pkgver "$pkgdir/usr/lib/libsge.so"
51 install -d "$pkgdir/usr/include/$pkgname"
52 install -Dm644 include/* "$pkgdir/usr/include/$pkgname"
55 install -d "$pkgdir/usr/share/doc/$pkgname"
56 cp -a doc/* "$pkgdir/usr/share/doc/$pkgname"
57 rm "$pkgdir/usr/share/doc/$pkgname/"{Doxyfile,default.Makefile,html/installdox}
60 install -Dm755 tools/sga "$pkgdir/usr/bin/$pkgname-tool-sga"
61 install -Dm755 tools/sgestate "$pkgdir/usr/bin/$pkgname-tool-sgestate"
64 for _demo in `find demos -perm 755 -type f`; do
65 install -Dm755 $_demo "$pkgdir/usr/bin/$pkgname-demo-${_demo/*\//}"
67 for _demo in `find demos -name data.d`; do
68 install -Dm644 $_demo "$pkgdir/usr/share/$pkgname/$_demo"
70 ln -s /usr/share/$pkgname/demos/font "$pkgdir/usr/share/$pkgname/demos/events"
73 install -Dm644 logo/$pkgname.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
76 # vim:set ts=2 sw=2 et: