updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / doom3-darkmod / PKGBUILD
blob243999b1832586155abbf832f1fb51aacf32f4a5
1 # Maintainer: PedsXing <pedsxing at gmx dot net>
2 # Contributer: Hiroe <ashadocat at gmail dot com>
4 pkgname=doom3-darkmod
5 pkgver=1.07
6 pkgrel=1
7 pkgdesc="DOOM III mod based on the Thief series by Looking Glass Studios"
8 arch=('i686' 'x86_64')
9 url="http://www.thedarkmod.com/"
10 license=('CCPL')
12 [ "$CARCH" == i686   ] && depends=('doom3' 'glew' 'libpng' 'libjpeg-turbo')
13 [ "$CARCH" == i686   ] && makedepends=('p7zip' 'scons')
15 [ "$CARCH" == x86_64 ] && depends=('doom3' 'lib32-glew' 'lib32-libpng' 'lib32-libjpeg-turbo')
16 [ "$CARCH" == x86_64 ] && makedepends=('p7zip' 'scons' 'binutils-multilib' 'gcc-multilib' 'libtool-multilib')
18 install="$pkgname".install
19 source=(http://www.bloodgate.com/mirrors/tdm/pub/thedarkmod."$pkgver".src.7z
20         patch.diff
21         doom3-darkmod
22         "$pkgname".desktop
23         "$pkgname".png)
25 build() {
26   # Obtain data
27   cd "$srcdir"
28   7z x -y thedarkmod."$pkgver".src.7z
30   cd thedarkmod."$pkgver".src
31   patch -p0 <"$srcdir"/patch.diff
33   cd tdm_update
34   scons
36   cd "$startdir"
37   [ ! -e darkmod ] && mkdir darkmod
38   cd darkmod
39   kill -9 `pidof tdm_update.linux` || true
40   cp "$srcdir"/thedarkmod."$pkgver".src/tdm_update/tdm_update.linux .
41   chmod 755 ./tdm_update.linux
42   ./tdm_update.linux || true
43   if [ -e _tdm_update.linux ] ;then
44     mv _tdm_update.linux tdm_update.linux
45     chmod 755 tdm_update.linux
46     ./tdm_update.linux || true
47   fi
48   mv tdm_update.log "$srcdir"
49   rm -f crc_info.txt tdmlauncher.log tdm_mirrors.txt tdm_version_info.txt
51   cd "$srcdir"
52   ln -fs "$startdir"/darkmod darkmod
53   cd thedarkmod."$pkgver".src
54   scons BUILD="release" BUILD_GAMEPAK="1"
55   kill -9 `pidof tdm_update.linux` || true
58 package() {
59   cd "$srcdir"/darkmod
61   # Create destination directories
62   install -m755 -d "$pkgdir"/opt/doom3/darkmod/
63   install -m755 -d "$pkgdir"/usr/bin/
64   install -m755 -d "$pkgdir"/usr/share/{applications,icons,licenses/"$pkgname"}
66   # Install: game folder
67   cp -r * "$pkgdir"/opt/doom3/darkmod/
68   find "$pkgdir"/opt/doom3/darkmod/ -type d -exec chmod 755 {} \;
69   find "$pkgdir"/opt/doom3/darkmod/ -type f -exec chmod 644 {} \;
70   chmod 755 "$pkgdir"/opt/doom3/darkmod/tdmlauncher.linux
71   install -m644 "$srcdir"/thedarkmod."$pkgver".src/tdm_game02.pk4 "$pkgdir"/opt/doom3/darkmod/
72   install -m755 "$srcdir"/doom3-darkmod "$pkgdir"/usr/bin/
74   # license
75   install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/"$pkgname"/license.txt
77   # desktop file, icon
78   install -Dm644 "$srcdir"/"$pkgname".png "$pkgdir"/usr/share/icons/
79   install -Dm644 "$srcdir"/"$pkgname".desktop "$pkgdir"/usr/share/applications/
82 md5sums=('da8ff991181a0aa2fc6260ffe631a192'
83          'b176039ddfe0861e180f38fcc6053519'
84          'dda9bbec61a79bd2511451a1ab2ba872'
85          '02d3ab8c0f402c717d266f514a2502a9'
86          '5309e528ce22f28ecc0e9781e43379e0')