updated on Wed Jan 25 00:20:47 UTC 2012
[aur-mirror.git] / scru-hg / PKGBUILD
blob3cbc87cb95e71017c24ea6e716d2d3b6fd942bd6
1 # Maintainer: Roberto Gea (Alquimista) <alquimistaotaku@gmail.com>
3 _realname=scru
4 pkgname=${_realname}-hg
5 pkgver=12
6 pkgrel=1
7 pkgdesc="Screenshot Uploader"
8 arch=(any)
9 url="https://bitbucket.org/alquimista"
10 license=("MIT")
11 depends=("python-notify" "scrot" "optipng" "xclip" "plac")
12 makedepends=("mercurial")
13 options=(!emptydirs)
14 provides=(${_realname})
15 conflicts=(${_realname})
17 _hgroot=${url}
18 _hgrepo="${_realname}"
20 echo ${_hgroot} ${_hgrepo}
22 build() {
23     cd "${srcdir}"
24     msg "Connecting to Mercurial server...."
25     if [ -d "${_hgrepo}/.hg" ] ; then
26         cd ${_hgrepo} && hg pull -u
27         msg "The local files are updated."
28     else
29         hg clone ${_hgroot}/${_hgrepo}
30     fi
32     msg "Mercurial checkout done or server timeout"
33     msg "Starting make..."
35     rm -rf "${srcdir}/${_hgrepo}-build"
36     cp -r "${srcdir}/${_hgrepo}" "${srcdir}/${_hgrepo}-build"
37     cd "${srcdir}/${_hgrepo}-build"
39     python2 setup.py build
42 package() {
43   cd "${srcdir}/${_hgrepo}-build"
45   python2 setup.py install --root="${pkgdir}" --optimize=1
47   find "${pkgdir}/" -type f -exec chmod 644 {} \;
48   chmod 755 "${pkgdir}/usr/bin/scru"
49   chmod 755 "${pkgdir}/usr/bin/scru-openbox-pipemenu"
50   find "${pkgdir}/" -type d -exec chmod 755 {} \;