updated on Thu Jan 26 12:02:26 UTC 2012
[aur-mirror.git] / redeclipse-svn / PKGBUILD
blobb901ac097b74836cdd6619e1f20c47b13073dcc8
1 # Maintainer: Martin Erik Werner ("arand") <martinerikwerner@mail.com>
3 pkgname=redeclipse-svn
4 pkgver=3547
5 pkgrel=1
6 pkgdesc="A single-player and multi-player first-person ego-shooter, built as a total conversion of Cube Engine 2, "
7 arch=('i686' 'x86_64')
8 url="http://redeclipse.net"
9 license=('custom' 'ZLIB' 'MIT' 'CC-BY-SA')
10 depends=('hicolor-icon-theme' 'sdl_image' 'libgl' 'sdl_mixer')
11 makedepends=('subversion' 'imagemagick' 'gzip' 'mesa')
13 _svntrunk=https://redeclipse.svn.sourceforge.net/svnroot/redeclipse
14 _svnmod=redeclipse
16 build() {
17         cd "$srcdir"
19         # update/checkout svn
20         if [ -d "$_svnmod"/.svn ]; then
21                 msg "Updating existing SVN checkout"
22                 (cd "$_svnmod" && svn up -r "$pkgver")
23         else
24                 msg "New checkout from SVN"
25                 svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
26         fi
28         msg "SVN export to clean build directory"
30         rm -rf "$srcdir/$pkgname"
31         svn export "$srcdir/$_svnmod" "$srcdir/$pkgname"
33         msg "Starting make"
35         # build in exported directory
36         cd "$srcdir/$pkgname/src"
37         make client server
40 package() {
41         cd "$srcdir/$pkgname"
42         make -C src DESTDIR="$pkgdir" prefix=/usr redeclipse=redeclipse-svn \
43                 system-install
45         msg "Adapting scripts, manpages and desktop file"
47         sed -e 's#\(RE_OPTIONS=".*\)-r\(.*"\)#\1-h$HOME/.redeclipse-svn/\2#' \
48                 -i "$pkgdir/usr/bin/redeclipse-svn" \
49                 -i "$pkgdir/usr/bin/redeclipse-svn-server"
51         zcat "$pkgdir/usr/share/man/man6/redeclipse-svn.6.gz" | \
52                 sed -e 's#REDECLIPSE#REDECLIPSE-SVN#' | \
53                 gzip -9 -c \
54                 > "$pkgdir/usr/share/man/man6/redeclipse-svn.6.gz.tmp" && \
55                 mv "$pkgdir/usr/share/man/man6/redeclipse-svn.6.gz.tmp" \
56                 "$pkgdir/usr/share/man/man6/redeclipse-svn.6.gz"
58         sed -e 's#\(^Name.*$\)#\1\ SVN#' \
59                 -i "$pkgdir/usr/share/applications/redeclipse-svn.desktop"
61         msg "Installing license and trademark info"
62         install -Dm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
63         install -Dm644 trademark.txt "$pkgdir/usr/share/licenses/$pkgname/TRADEMARK"