desktop/sumwars/PKGBUILD

75 lines
2.3 KiB
Bash
Raw Normal View History

2011-03-08 07:34:37 +08:00
#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
pkgname=sumwars
2014-07-09 01:12:24 +08:00
pkgver=0.5.8
pkgrel=1
2011-03-08 07:34:37 +08:00
pkgdesc="Summoning Wars is a role-playing game, featuring both a single-player and a multiplayer mode for about 2 to 8 players."
2014-07-09 01:12:24 +08:00
arch=('x86_64')
2011-03-08 07:34:37 +08:00
url="http://sumwars.org/"
2014-07-09 01:12:24 +08:00
license=('GPL3' 'CCPL-by-sa')
depends=('cegui-0.8' 'freealut' 'libogg' 'libvorbis' 'lua' 'ogre' 'ois' 'openal' 'poco' 'boost-libs' 'enet' 'physfs')
2012-03-07 19:00:46 +08:00
categories=('games')
2014-07-09 01:12:24 +08:00
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgver}/${pkgname}-${pkgver}-src.tar.bz2")
sha256sums=('2f432d5f84708447507f6686b847b8538de373cd951f5842cfec5a09aba0aabf')
2011-03-08 07:34:37 +08:00
2014-07-09 01:12:24 +08:00
prepare() {
cd ${pkgname}-${pkgver}
2013-02-17 06:05:34 +08:00
2014-07-09 01:12:24 +08:00
sed \
-e "s#/games/#/bin/#g" \
-e "s#icons/hicolor/128x128/${pkgname}.png#/pixmaps/${pkgname}.png#" \
-i "packaging/${pkgname}.desktop"
}
build() {
cd ${pkgname}-${pkgver}
2013-02-17 06:05:34 +08:00
mkdir -p build && cd build
2011-03-08 07:34:37 +08:00
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
..
make
}
package() {
2014-07-09 01:12:24 +08:00
cd ${pkgname}-${pkgver}
2011-03-08 07:34:37 +08:00
#make install is broken
2014-07-09 01:12:24 +08:00
#make DESTDIR="${pkgdir}" install
2011-03-08 07:34:37 +08:00
2013-02-17 06:05:34 +08:00
# Executable.
2014-07-09 01:12:24 +08:00
install -Dm755 build/${pkgname} "${pkgdir}/usr/share/${pkgname}/${pkgname}"
2013-02-17 06:05:34 +08:00
# Credits.
2014-07-09 01:12:24 +08:00
install -Dm644 AUTHORS "${pkgdir}/usr/share/doc/${pkgname}/authors.txt"
# License
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
2011-03-08 07:34:37 +08:00
2013-02-17 06:05:34 +08:00
# Savegames.
2014-07-09 01:12:24 +08:00
install -dm775 "${pkgdir}/usr/share/${pkgname}/save"
chown :games "${pkgdir}/usr/share/${pkgname}/save"
2011-03-08 07:34:37 +08:00
2013-02-17 06:05:34 +08:00
# Desktop Integration.
2014-07-09 01:12:24 +08:00
install -Dm644 share/icon/SumWarsIcon_128x128.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
install -Dm755 packaging/${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
cp -r share/* "${pkgdir}/usr/share/${pkgname}"
2013-02-17 06:05:34 +08:00
2014-07-09 01:12:24 +08:00
for _filename in CEGUI Ogre ${pkgname}; do
touch "${pkgdir}/usr/share/${pkgname}/${_filename}.log"
chmod 777 "${pkgdir}/usr/share/${pkgname}/${_filename}.log"
2011-03-08 07:34:37 +08:00
done
2014-07-09 01:12:24 +08:00
2011-03-08 07:34:37 +08:00
# Execution script.
2014-07-09 01:12:24 +08:00
install -dm755 "${pkgdir}/usr/bin"
echo "#!/bin/bash" > "${pkgdir}/usr/bin/${pkgname}"
echo "cd /usr/share/${pkgname}" >> "${pkgdir}/usr/bin/${pkgname}"
echo "./${pkgname}" >> "${pkgdir}/usr/bin/${pkgname}"
chmod 775 "${pkgdir}/usr/bin/${pkgname}"
2011-03-08 07:34:37 +08:00
}