1 # Contributor: Slash <yahoo.com: demodevil5>
2 # Maintainer: Jesse Jaara <gmail.com: jesse.jaara>
4 #### To speed up package creation.
5 #### If you are planning to distribute
6 #### This on some custon repo, you might
7 #### want to use the defaut slow but
8 #### much better xz compression.
14 pkgdesc="Heroes of Newerth is a Real Time Strategy game heavily influcenced by DotA"
15 arch=('i686' 'x86_64')
16 url="http://www.heroesofnewerth.com/"
17 license=('custom:HoN')
18 depends=('libgl' 'libxml2' 'mesa' 'speex' 'curl' 'freetype2')
22 source=('hon.desktop' 'license' "http://dl.heroesofnewerth.com/HoNClient-${pkgver}.sh")
25 ## Thx to messo8080 for reminding uss about the /tmp dir
26 ## On new installs this dir is in ram by default ^^.
28 if `pwd | grep -q "/tmp"`; then
30 "You are trying to build this pkg in /tmp dir.
31 This is not so good idea as /tmp dir is in ram
32 by default. If you know that you have lots of
33 ram (>4G) and swap and want to continue building in
34 the current directory write yes and press ENTER.
35 Otherwice write no and press ENTER.
38 if [ "${answer}" == "no" ]; then
43 # Create Destination Directory
44 mkdir -p "${pkgdir}/opt/"
45 mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
48 sh -c "unzip ${srcdir}/HoNClient-${pkgver}.sh data/* -d \"${pkgdir}/opt/\"; true"
49 mv "${pkgdir}"/opt/{data,hon}
52 cp "${srcdir}/license" "${pkgdir}/usr/share/licenses/${pkgname}/"
54 # Install Desktop Shortcut
55 install -D -m 0644 "${srcdir}/hon.desktop" \
56 "${pkgdir}/usr/share/applications/hon.desktop"
58 # Install Client Launcher
59 mkdir -p "${pkgdir}/usr/bin"
60 ln -s /opt/hon/hon.sh "${pkgdir}/usr/bin/hon"
62 ## Remove un-needed libs
63 ## fmodex and linpng aren't compitable with Arch
64 ## freetype causes segfault on some systems O_o
65 system_libs="libcurl.so.4 libgcc_s.so.1 libspeexdsp.so.1 libspeex.so.1 libstdc++.so.6"
66 if [ "${CARCH}" == 'x86_64' ]; then
68 rm -r "${pkgdir}"/opt/hon/*-x86{,.so}
69 cd "${pkgdir}/opt/hon/libs-x86_64" && rm ${system_libs}
72 rm -r "${pkgdir}"/opt/hon/*-x86_64{,.so}
73 cd "${pkgdir}/opt/hon/libs-x86" && rm ${system_libs}
76 # Set Ownership to root:games
77 chown -R root:games "${pkgdir}/opt/hon"
78 chmod -R g+w "${pkgdir}/opt/hon"
81 md5sums=('d3fa56f17b5eb21d4da01e8d628fbc97'
82 'c00baef7ab9f20a5c9cc398e4bf512dd'
83 '2e23853d956fcba7d7402aab202bdbf8')