updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / darkforces / PKGBUILD
blobe1a2d3a7b128003bb8a0449436da24ace0308b55
1 # Maintainer: Florian Léger <florian6 dot leger at laposte dot net>
3 pkgname=darkforces
4 pkgver=1.0
5 pkgrel=1
6 pkgdesc="FPS set in the Star Wars universe (uses DOSBox, CD-ROM required)"
7 arch=("any")
8 depends=("dosbox" "dos32a" "modfs-git")
9 makedepends=("convmv")
10 license=("custom")
11 url="http://www.lucasarts.com"
12 source=("lib${pkgname}.sh"
13         "${pkgname}.sh"
14         "${pkgname}-config.sh"
15         "${pkgname}.desktop"
16         "${pkgname}-config.desktop"
17         "${pkgname}.png"
18         "01-user.conf"
19         "99-base.conf")
20 md5sums=('cc3b60d184708f90c2328723327a900d'
21          '5a93904ef30db54eff31493120261809'
22          'd98c8342cb29c13bf9a951de1f772497'
23          '008af5c1003d5fbdae67ded60e740079'
24          '8dc304f75e1c3e2bfa3d63f7cfd3aae4'
25          '341b165346b0ed1769fa012b9f8b2d9e'
26          'c1549ac03b636273288afaf4046f3ad0'
27          'c0c9a8d696f4ab3b8d9073c80aa48c48')
28 install="${pkgname}.install"
30 # Change this to the path where your Dark Forces CDROM is mounted
31 : ${CD_DIR:="$HOME/media/Star_Wars__Dark_Forces_(FR).iso/"}
33 package() {
34   local baseDir="${pkgdir}/usr/share/games/${pkgname}/base"
35   # Copy data (case insensitive)
36   cd "${CD_DIR}"
38   local f
39   for f in "./cd.id" "./dark/*.gob" "./dark/*.ini" "./dark/*.cfg" "./dark/*.msg" "./dark/lfd/*.lfd" "./dark/dark.exe" "./dark/imuse.exe"; do
40     find . -maxdepth 3 -iwholename "${f}" -exec install -Dm644 "{}" "${baseDir}/{}" \;
41   done
43   for f in install.exe bootmkr.exe readme.txt; do
44     find . -maxdepth 1 -iname "${f}" -exec install -Dm644 "{}" "${baseDir}/dark/{}" \;
45   done
46   
47   # Fix case
48   cd "${pkgdir}/usr/share/games/${pkgname}"
49   convmv --lower --notest -r *
51   # Use DOS32/A instead of DOS4/GW
52   ln -s "/usr/share/dos32a/dos32a.exe" "${baseDir}/dark/dos4gw.exe"
54   # Tell Dark Forces to look at drive C
55   echo -n "C" > "${baseDir}/dark/drive.cd"
57   # Shell scripts
58   install -Dm644 "${srcdir}/lib${pkgname}.sh" "${pkgdir}/usr/lib/lib${pkgname}.sh"
59   install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
60   install -Dm755 "${srcdir}/${pkgname}-config.sh" "${pkgdir}/usr/bin/${pkgname}-config"
62   # Install .desktop files
63   install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
64   install -Dm644 "${srcdir}/${pkgname}-config.desktop" "${pkgdir}/usr/share/applications/${pkgname}-config.desktop"
66   # Install icon
67   install -Dm644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
68   
69   # Modfs
70   install -Dm644 "${srcdir}/01-user.conf" "${pkgdir}/etc/${pkgname}.d/01-user.conf"
71   install -Dm644 "${srcdir}/99-base.conf" "${pkgdir}/etc/${pkgname}.d/99-base.conf"