updated on Tue Jan 10 00:10:07 UTC 2012
[aur-mirror.git] / jfsw / PKGBUILD
blob48d893df6a124b823cabd60d3dbd2d95e75aefc7
1 # Contributor: pzykopilz <pzykopilz.at.w.eb.de>
2 # based on jfduke from rabyte <rabyte*at*gmail*dot*com>
3 pkgname=jfsw
4 pkgver=20051009
5 pkgrel=1
6 pkgdesc='An enhanced port of "Shadow Warrior"'
7 url="http://jonof.edgenetwork.org/?p=jfsw"
8 license=("GPL" 'custom:"build"')
9 depends=('sdl_mixer' 'gtk2')
10 makedepends=('nasm')
11 install=('jfsw.install')
12 source=(http://www.arcades3d.com/linux/${pkgname}_src_$pkgver.tar.bz2 \
13         http://www.arcades3d.com/linux/jfbuild_src_$pkgver.tar.bz2 \
14         http://www.mephisto.ma.cx/mephisto/patches/${pkgname}_src_$pkgver.patch \
15         http://www.mephisto.ma.cx/mephisto/patches/jfbuild_src_$pkgver.patch \
16         jfsw.png jfsw.desktop)
17 md5sums=('a0698bedecaefac9980081129f11ffcf' 'c9acb21dd1c3033a608581731b6fbc52' 'ee00f1bbec1a9054a0d8b81143a4ff94' 'b5db75643dd9034749f0a8766354c03b' 'c2675582d89ff9523d4d571daccffeb6' 'a046a35ce77c91206477db00c8783536')
19 build() {
20   cd $startdir/src
21   patch -Np0 < jfbuild_src_$pkgver.patch
22   patch -Np0 < ${pkgname}_src_$pkgver.patch
23   
24   # fix compiler flags
25   sed -i -e 's|pentium|i686|g' -e 's|-O1|-O2|g' \
26     {jfbuild_src_$pkgver,${pkgname}_src_$pkgver}/Makefile
28   ln -sf jfbuild_src_$pkgver build    
29   cd ${pkgname}_src_$pkgver
31   # fix filename and paths
32   sed -i 's|SW.RTS|sw.rts|g' source/config.c
33   sed -i 's|games/||g' source/{astub,game}.c
35   make || return 1
36   mkdir -p $startdir/pkg/usr/share/{applications,pixmaps,$pkgname}
37   install -m755 -D sw $startdir/pkg/usr/bin/$pkgname
38   install -m755 -D build $startdir/pkg/usr/bin/$pkgname-build
39   install -m644 -D build.cfg $startdir/pkg/usr/share/$pkgname
40   install -m644 -D ../$pkgname.png $startdir/pkg/usr/share/pixmaps
41   install -m644 -D ../$pkgname.desktop $startdir/pkg/usr/share/applications
42   install -m644 -D ../jfbuild_src_$pkgver/buildlic.txt \
43     $startdir/pkg/usr/share/licenses/custom/build/buildlic.txt