1 # Maintainer: Anton Bazhenov <anton.bazhenov at gmail>
6 pkgdesc="Strategy game similar to Warcraft and Dune II"
8 url="http://happypenguin.org/show?Craft"
10 depends=('libx11' 'gcc-libs')
11 source=("http://www.ibiblio.org/pub/linux/games/strategy/craftcc35.tar.Z"
15 md5sums=('e55d412d330f28798d10d13ab28596c0'
16 '27b587f927a4d2159398148736389181'
17 '28a9404c791d0efa63a594500118937c'
18 '72c195d88008549f85000f2a5836ba87')
23 # A few tricky substitutions
24 mv getline.h xgetline.h
25 sed -i 's/getline/xgetline/g' *.h *.hc
26 sed -i 's/xgetline_/getline_/g' *.h *.hc
28 # Fix game speed on modern computers
29 sed -i 's/min_cycle_time 50/min_cycle_time 2000/g' craft.hc
32 patch -p0 -i "${pkgname}.patch"
40 mkdir -p "${pkgdir}/opt/${pkgname}"
41 cp -rf buttons/ "${pkgdir}/opt/${pkgname}/"
42 cp -rf hcraft/ "${pkgdir}/opt/${pkgname}/"
44 # Set file permissions
45 find "${pkgdir}/opt/${pkgname}" -type d -exec chmod 755 '{}' \;
46 find "${pkgdir}/opt/${pkgname}" -type f -exec chmod 644 '{}' \;
47 chmod 755 "${pkgdir}/opt/${pkgname}/hcraft/edit/cmedit"
50 install -Dm755 "${pkgname}" "${pkgdir}/opt/${pkgname}/${pkgname}"
51 install -Dm644 ".windefaults.params" "${pkgdir}/opt/${pkgname}/.windefaults.params"
53 # Install launcher and license file
54 install -Dm755 "../${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
55 install -Dm644 "../COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
58 mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
59 cp -rf html/* "${pkgdir}/usr/share/doc/${pkgname}/"
60 find "${pkgdir}/usr/share/doc/${pkgname}" -type f -exec chmod 644 '{}' \;