updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / python-webqq-svn / PKGBUILD
blobbaa6f940d941f7d99088ada730ead5ae2534bbef
1 # Maintainer: cuihao <cuihao dot leo at gmail dot com>
3 pkgname=python-webqq-svn
4 _pkgname=pywebqq
5 pkgver=15
6 pkgrel=1
7 pkgdesc="A WebQQ client based on python-webkit."
8 url="http://code.google.com/p/python-webqq/"
9 license=('Apache')
10 arch=('any')
11 depends=('python-keybinder' 'python-notify' 'pywebkitgtk')
12 makedepends=('svn')
13 conflicts=('python-webqq', 'pywebqq')
15 source=('pywebqq.desktop')
16 md5sums=('72591fb99f6437f6ebfb223790d77ece')
18 _svnmod="python-webqq"
19 _svntrunk="http://python-webqq.googlecode.com/svn/trunk/python-webqq"
21 build() {
22     cd ${srcdir}
23     msg "Connecting to the SVN server...."
24   
25     if [ -d "${_svnmod}/.svn" ]; then
26         cd "${_svnmod}" && svn up -r "${pkgver}"
27         cd ${srcdir}
28     else
29         svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod}
30     fi
31       
32     msg "SVN checkout done or server timeout"
33     
34     rm -rf "${_svnmod}-build"
35     cp -rf "${_svnmod}/src" "${_svnmod}-build"
36     cd "${_svnmod}-build"
37     
38     # Arch默认使用python3,修改为使用python2执行
39     sed -i "1s/python/python2/" *.py
41     mkdir -p "${pkgdir}/usr/share/${_pkgname}"
42     cp ./* "${pkgdir}/usr/share/${_pkgname}"
43     
44     mkdir "${pkgdir}/usr/bin"
45     ln -s "../share/${_pkgname}/pywebqq.py" "${pkgdir}/usr/bin/${_pkgname}"
46     
47     # 菜单项
48     mkdir "${pkgdir}/usr/share/applications/"
49     install -D -m644 ${srcdir}/pywebqq.desktop "${pkgdir}/usr/share/applications/"