summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 09a1c1597f2e1af0321fd3a95bd0456b941dfd78 (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
29
30
31
# Maintainer: dryes <joswiseman@cock.li>
pkgname='pyrescene-hg'
pkgver=606
pkgrel=1
pkgdesc='pyReScene is a port of ReScene .NET to the Python programming language.'
url='https://bitbucket.org/Gfy/pyrescene'
arch=('any')
license=('MIT' 'GPL' 'Custom')
depends=('python2' 'chromaprint' 'python2-numpy' 'unrar')
makedepends=('mercurial' 'git')
source=('hg+https://bitbucket.org/Gfy/pyrescene/' 'git://github.com/d2yes/rarlinux.git')
md5sums=('SKIP' 'SKIP')

pkgver() {
  cd "${srcdir}/${pkgname%-hg}"
  hg identify -n
}

package() {
  cd "${srcdir}/${pkgname%-hg}"

  cp 'rescene/srr.py' 'rescene/srr.py~'
  sed -i -r 's|(dest=\"rar_executable_dir\",)|\1 default=\"/opt/rarlinux\",|' 'rescene/srr.py'
  python2 'setup.py' install --root="${pkgdir}"
  mv 'rescene/srr.py~' 'rescene/srr.py'

  mkdir -p "${pkgdir}/opt/rarlinux"
  python2 'bin/preprardir.py' "${srcdir}/rarlinux" "${pkgdir}/opt/rarlinux"

  install -D -m755 "awescript/awescript.py" "${pkgdir}/usr/bin/awescript"
}