updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / libtcod-svn / PKGBUILD
blobb2e68f5e5dc4e13a4496a93ebff28bec43cf31ca
1 # Maintainer: Michal Kowalski <kowalski TOD michal TA gmail TOD com>
2 # Contributor: Kevin Whitaker <eyecreate at gmail dot com>
4 pkgname=libtcod-svn
5 _rpkgname=libtcod
6 pkgver=494
7 pkgrel=2
8 pkgdesc="Roguelike graphics/utility library"
9 arch=('i686' 'x86_64')
10 url="http://doryen.eptalys.net/libtcod/"
11 license=('BSD')
12 groups=('ypb')
13 depends=('sdl' 'libpng' 'zlib' 'libgl' 'gcc-libs' 'libx11')
14 makedepends=('cmake' 'subversion' 'upx')
15 conflicts=('libtcod-beta' 'libtcod-hg' 'libtcod')
16 provides=('libtcod')
17 #options=(!strip)
18 source=('png.patch'
19         'cmake.patch')
20 md5sums=('fd3417b535ad0dbf91eeffd42202b81e'
21          '9968e42f7f7e06d333fadb0e134eda00')
23 _svntrunk=http://doryen.eptalys.net/svn-libtcod/trunk
24 _svnmod=libtcod
25 _makedir=cmake/Release
26 _prefix=/usr
28 build() {
29   cd $srcdir  
30   if [ -d $_svnmod/.svn ]; then
31     (cd $_svnmod && svn up -r $pkgver) || return 1
32   else
33     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod || return 1
34   fi
36   rm -fr $_svnmod-build
37   cp -r $_svnmod $_svnmod-build
38   cd $_svnmod-build
40   patch -p0 < ../png.patch
41   patch -p0 < ../cmake.patch
43   mkdir -p $_makedir
44   cd $_makedir
45   cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${_prefix} -G "Unix Makefiles" $srcdir/$_svnmod-build &&
46   make || return 1
49 package() {
50   cd $srcdir/$_svnmod-build/$_makedir
51   make DESTDIR=$pkgdir install || return 1
52 #  strip --strip-unneeded $pkgdir/${_prefix}/lib/${_rpkgname}*.so
53   rm -rf "$pkgdir/${_prefix}/share"
54   install -D -m644 "$srcdir/$_svnmod-build/LIBTCOD-LICENSE.txt" "$pkgdir/usr/share/licenses/${_rpkgname}/LICENSE"
55   install -D -m644 "$srcdir/$_svnmod-build/LIBTCOD-CREDITS.txt" "$pkgdir/usr/share/licenses/${_rpkgname}/CREDITS"