1 # Contributor: Slash <demodevil5[at]yahoo[dot]com>
6 pkgdesc="Return to Castle Wolfenstein is a single and multiplayer first person shooter. You need the retail game files to play."
8 url="http://zerowing.idsoftware.com/linux/wolf/"
10 [ "${CARCH}" = "i686" ] && depends=('libgl' 'libxext')
11 [ "${CARCH}" = "x86_64" ] && depends=('lib32-libgl' 'lib32-libxext')
12 optdepends=('xdg-utils: for opening urls'
13 'et-sdl-sound: for sdl/alsa support')
14 install='wolf.install'
15 source=('wolfsp.desktop' 'wolfmp.desktop' \
16 'wolf.launcher' 'wolfsp.launcher' 'wolfmp.launcher' 'wolfded.launcher' \
17 'http://www.slashbunny.com/aur/wolf/libstdc++-libc6.2-2.so.3' \
18 "ftp://ftp.internat.freebsd.org/pub/FreeBSD/distfiles/wolf-linux-${pkgver}.x86.run")
19 md5sums=('dbc81736f44e38496df2dfd6282364e6'
20 'b04b3a8fdb0c288aa00adb2cdb859724'
21 'ba4d698848b548b1b1cab4e121d0b1e3'
22 'dc663542081c157567a743ba24e76735'
23 'ba4d698848b548b1b1cab4e121d0b1e3'
24 '11bcba217cf10252cb980f70f32c6e19'
25 '84824b4081be220646a5804327c28546'
26 '2aa37968aff19d665ed6c001773b2de3')
29 # Create Destination Directories
30 install -d $pkgdir/opt/wolf/ $pkgdir/usr/bin/ $srcdir/wolf/
32 # Set Install Files to Executable
33 chmod +x $srcdir/wolf-linux-${pkgver}.x86.run
35 # Extract Linux Game Files
37 $srcdir/wolf-linux-${pkgver}.x86.run --noexec --tar xf --group=root --owner=root
39 # Move Binaries to Main Directory
40 cp $srcdir/wolf/bin/Linux/x86/{wolf.x86,wolfded.x86,wolfsp.x86} $srcdir/wolf/
42 # Remove Unneeded Files and Directories
43 rm -r $srcdir/wolf/{bin,setup.data,setup.sh,CHANGES~}
45 # Fix Permissions (Owner, Directory, and File Permissions)
46 /bin/chown -R root:root $srcdir/wolf/
47 /bin/chmod 0755 $srcdir/wolf/Docs/PunkBuster
48 /bin/chmod 0644 $srcdir/wolf/{Docs/{PunkBuster/{admins/index.htm,players/index.htm},Update_readme.htm},RTCW-README-1.4.txt}
50 # Move Data to Package Directory
51 mv $srcdir/wolf/ $pkgdir/opt/
53 # Install Launcher Script (Single Player Client)
54 install -D -m 755 $srcdir/wolfsp.launcher \
55 $pkgdir/usr/bin/wolfsp
57 # Install Launcher Script (Multiplayer Client)
58 install -D -m 755 $srcdir/wolf.launcher \
61 # Install Launcher Script (Multiplayer Client)
62 install -D -m 755 $srcdir/wolfmp.launcher \
63 $pkgdir/usr/bin/wolfmp
65 # Install Launcher Script (Multipler Server)
66 install -D -m 755 $srcdir/wolfded.launcher \
67 $pkgdir/usr/bin/wolfded
69 # Install old libstdc++ library needed for Wolf to run
70 install -D -m 644 $srcdir/libstdc++-libc6.2-2.so.3 \
71 $pkgdir/opt/wolf/libstdc++-libc6.2-2.so.3
73 # Install License (Return to Castle Wolfenstein)
74 install -D -m 644 $pkgdir/opt/wolf/Docs/License.txt \
75 $pkgdir/usr/share/licenses/$pkgname/License.txt
77 # Install License (PunkBuster)
78 install -D -m 644 $pkgdir/opt/wolf/pb/PB_EULA.txt \
79 $pkgdir/usr/share/licenses/$pkgname/PB_EULA.txt
81 # Install Desktop File (Single Player)
82 install -D -m 644 $srcdir/wolfsp.desktop \
83 $pkgdir/usr/share/applications/wolfsp.desktop
85 # Install Desktop File (Multi Player)
86 install -D -m 644 $srcdir/wolfmp.desktop \
87 $pkgdir/usr/share/applications/wolfmp.desktop
89 # Install Icon File (Single Player)
90 install -D -m 644 $pkgdir/opt/wolf/WolfSP.xpm \
91 $pkgdir/usr/share/pixmaps/WolfSP.xpm
93 # Install Icon File (Multi Player)
94 install -D -m 644 $pkgdir/opt/wolf/WolfMP.xpm \
95 $pkgdir/usr/share/pixmaps/WolfMP.xpm
97 # Remove Licenses from Data Directory
98 rm $pkgdir/opt/wolf/Docs/License.txt
99 rm $pkgdir/opt/wolf/pb/PB_EULA.txt
101 # Use a more modern way for opening urls
102 rm $pkgdir/opt/wolf/openurl.sh
103 ln -s /usr/bin/xdg-open $pkgdir/opt/wolf/openurl.sh