updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / qsanguosha-git / PKGBUILD
blobd36d793a82cff8fd3e6391c9756cc709374ea14f
1 # Author: Moligaloo <Moligaloo@gmail.com>
2 # Maintainer: Yangtse <yangtsesu@gmail.com> 
3 # Contributor: Vehiclee <>
4 # Contributor: Iven Day <ivenvd@gmail.com>
5 # Contributor: abf <zouxiaomingabf@gmail.com>
7 pkgname=qsanguosha-git
8 pkgver=20120107
9 pkgrel=1
10 pkgdesc="An open source online version of the famous board game Sanguosha"
11 arch=('i686' 'x86_64')
12 url="https://github.com/Moligaloo/QSanguosha"
13 license=('GPL2')
14 depends=('qt' 'phonon' 'plib' 'lua')
15 makedepends=('gcc' 'make' 'git' 'swig')
16 source=('qsanguosha' 'qsanguosha.desktop' 'sgs.png')
17 conflicts=(qsanguosha)
18 provides=(qsanguosha)
19 install=qsanguosha.install
20 options=(!strip)
21 md5sums=('49ccb51ea1ba979f8c8b469b122f69d6'
22          'c8180a5a852ea23f194f49e60e2b0b02'
23          'c727b12c3a46b56fd0151eae5ef4c6c5')
25 _gitroot=https://github.com/Moligaloo/QSanguosha.git
26 _gitname=QSanguosha
28 build() {
29     cd ${srcdir}
30     if [ -d ${_gitname} ]; then
31                 cd ${_gitname} && git pull origin
32         msg "The local files are updated."
33     else
34                 git clone ${_gitroot}
35                 cd ${_gitname}
36     fi
37     msg "GIT checkout done or server timeout"
38     msg "Starting make..."
40         cd ${srcdir}/${_gitname}/swig
41         swig -c++ -lua sanguosha.i
42         cd ${srcdir}/${_gitname}
43         qmake QSanguosha.pro
44         make
45         lrelease QSanguosha.pro
46         mkdir -p ${pkgdir}/opt/qsanguosha
47         cp -R {lib,font,doc,audio,diy,etc,extension-doc,QSanguosha,qt_zh_CN.qm,backdrop,image,lang,scenarios,lua,sanguosha.lua,sanguosha.qm,sanguosha.qss} ${pkgdir}/opt/qsanguosha/
48         install -D -m755 ${srcdir}/qsanguosha "${pkgdir}/usr/bin/qsanguosha"
49         install -D -m644 ${srcdir}/qsanguosha.desktop "${pkgdir}/usr/share/applications/qsanguosha.desktop"
50         install -D -m644 ${srcdir}/sgs.png "${pkgdir}/usr/share/pixmaps/QSanguosha.png"
51         
52         # Set Ownership to root:games
53         chown -R root:games "${pkgdir}/opt/qsanguosha"
54         chmod -R g+rw "${pkgdir}/opt/qsanguosha"