summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb050723d34a78176f85abfb3ac4cf80d6c7b425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Maintainer: dryes <joswiseman@cock.li>
pkgname='rescepy-git'
pkgver=47
pkgrel=1
pkgdesc='automated srr (rescene) verification and reconstruction.'
url='https://github.com/dryes/rescepy'
arch=('any')
license=('MIT')
depends=('cfv' 'python2' 'pyrescene-hg' 'unrar')
makedepends=('git')
source=('git://github.com/dryes/rescepy.git')
md5sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  echo $(git rev-list --count master)
}

package() {
  cp -r "${srcdir}/rescepy" "${srcdir}/rescepy-build"
  for _d in $(find "${srcdir}/rescepy-build/" -type d -name '.git'); do
    rm -rf "${_d}"
  done
  mkdir -p "${pkgdir}/usr/"{bin,share}
  mv "${srcdir}/rescepy-build" "${pkgdir}/usr/share/rescepy"
  echo -e "#!/bin/bash\n\npython2 /usr/share/rescepy/resce.py \$@" >> "${pkgdir}/usr/bin/rescepy"
  chmod +x "${pkgdir}/usr/bin/rescepy" "${pkgdir}/usr/share/rescepy/resce.py"
}