diff options
author | Daniel Bermond | 2018-02-12 13:58:06 -0200 |
---|---|---|
committer | Daniel Bermond | 2018-02-12 13:58:06 -0200 |
commit | d846ec1aad1ec04a18c16eb0720dff500b672dcc (patch) | |
tree | 89ec4ed2e8708bf4d01597e8286e575d85f2d693 | |
download | aur-d846ec1aad1ec04a18c16eb0720dff500b672dcc.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 56 |
2 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cafeca4fb97c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = python2-vmaf + pkgdesc = Perceptual video quality assessment algorithm based on multi-method fusion (python2 implementation) + pkgver = 1.3.1 + pkgrel = 1 + url = https://github.com/netflix/vmaf/ + arch = any + license = APACHE + makedepends = python2 + makedepends = python2-setuptools + depends = python2 + depends = python2-numpy + depends = python2-scipy + depends = python2-matplotlib + depends = python2-pandas + depends = python2-scikit-learn + depends = python2-h5py + depends = libsvm + conflicts = python2-vmaf-git + source = vmaf-1.3.1.tar.gz::https://github.com/Netflix/vmaf/archive/v1.3.1.tar.gz + sha256sums = c0c84f0f02cff6ac23b3bcc07199532ccbf04a18d8802385b35b89d26bb07287 + +pkgname = python2-vmaf + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..fa181ddbca7d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Daniel Bermond < yahoo-com: danielbermond > + +pkgname=python2-vmaf +_srcname=vmaf +pkgver=1.3.1 +pkgrel=1 +pkgdesc='Perceptual video quality assessment algorithm based on multi-method fusion (python2 implementation)' +arch=('any') +url='https://github.com/netflix/vmaf/' +license=('APACHE') +depends=( + # official repositories: + 'python2' 'python2-numpy' 'python2-scipy' 'python2-matplotlib' + 'python2-pandas' 'python2-scikit-learn' 'python2-h5py' + # AUR: + 'libsvm' +) +makedepends=('python2' 'python2-setuptools') +conflicts=('python2-vmaf-git') +source=("${_srcname}-${pkgver}.tar.gz"::"https://github.com/Netflix/${_srcname}/archive/v${pkgver}.tar.gz") +sha256sums=('c0c84f0f02cff6ac23b3bcc07199532ccbf04a18d8802385b35b89d26bb07287') + +build() { + msg2 'Building for Python2...' + cd "${_srcname}-${pkgver}/python" + python2 setup.py build +} + +# waiting for upstream to finish python3 support +# https://github.com/Netflix/vmaf/issues/128 + +package() { + cd "${_srcname}-${pkgver}/python" + + python2 setup.py install --root="$pkgdir" --optimize='1' + + # vmaf python2 executables and additional modules + cd script + for _script in * + do + _filemode="$(stat -c %a "$_script")" + + if [ "$_filemode" = '644' ] + then + install -D -m"$_filemode" "$_script" "${pkgdir}/usr/lib/python2.7/site-packages/${_srcname}/${_script}" + else + install -D -m"$_filemode" "$_script" "${pkgdir}/usr/bin/${_script}" + fi + done + + # fix shebang on python2 scripts + for _script in "$pkgdir"/usr/bin/* + do + sed -i '1s/python/python2/' "$_script" + done +} |