author | David Runge
<dvzrv@archlinux.org> 2019-11-23 22:04:46 UTC |
committer | David Runge
<dvzrv@archlinux.org> 2019-11-23 22:04:46 UTC |
parent | c8fa667a7c50058856adbb06921fe74b34d41b2a |
PKGBUILD | +21 | -55 |
diff --git a/PKGBUILD b/PKGBUILD index 29b7eed..40fddbf 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,104 +1,70 @@ -# Maintainer: David Runge <dave@sleepmap.de> +# Maintainer: David Runge <dvzrv@archlinux.org> # Contributor: Ray Rashif <schiv@archlinux.org> # Contributor: Tobias Kieslich tobias [funnychar] archlinux org pkgbase=aubio -pkgname=('aubio' 'python-aubio' 'python2-aubio') +pkgname=('aubio' 'python-aubio') pkgver=0.4.9 -pkgrel=5 +pkgrel=6 pkgdesc="A tool for extracting annotations from audio signals" arch=('x86_64') url="https://aubio.org/" license=('GPL3') makedepends=('doxygen' 'ffmpeg' 'fftw' 'jack' 'python-numpy' -'python-setuptools' 'python-sphinx' 'python2-numpy' 'python2-setuptools' -'txt2man' 'waf') -checkdepends=('python-pytest' 'python2-pytest') +'python-setuptools' 'python-sphinx' 'txt2man' 'waf') +checkdepends=('python-pytest') source=("https://${pkgbase}.org/pub/${pkgbase}-${pkgver}.tar.bz2") sha512sums=('0cb81bb4b15051db3f3f4d160d500af56fdfb237e0a74e3f366f53c2870030aa0a7cee8469a611a9694c36b8866d3d42ffb48241c999de08f3fee43e6d903130') prepare() { - cp -av "${pkgbase}-${pkgver}" "${pkgname[2]}-${pkgver}" - ( - cd "${pkgname}-${pkgver}" - rm -rv waflib - ) - ( - cd "${pkgname[2]}-${pkgver}" - # python2 shebang - sed -e '1s/python/&2/' \ - -i "python/lib/${pkgbase}/"{__init__,cmd,cut}.py \ - -i "python/tests/"*.py - # console_scripts names - sed -e 's/aubio =/aubio2 =/g' \ - -e 's/aubiocut/&2/' \ - -i setup.py - ) + cd "${pkgname}-${pkgver}" + rm -rv waflib } build() { cd "${pkgbase}-${pkgver}" waf configure --prefix=/usr \ - --alltests \ - --enable-fftw3 \ - --libdir=/usr/lib + --alltests \ + --enable-fftw3 \ + --libdir=/usr/lib waf build python setup.py build - cd ../"${pkgname[2]}-${pkgver}" - python2 setup.py build } check() { local _py3_ver=$(python3 -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))") - local _py2_ver=$(python2 -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))") - local PYTHON2_PATH="${srcdir}/${pkgname[2]}-${pkgver}/build/lib.linux-$CARCH-${_py2_ver}/:${PYTHONPATH}" local PYTHON3_PATH="${srcdir}/${pkgbase}-${pkgver}/build/lib.linux-$CARCH-${_py3_ver}/:${PYTHONPATH}" cd "${pkgbase}-${pkgver}" PYTHONPATH="${PYTHON3_PATH}" \ LD_LIBRARY_PATH="${PWD}/build/src" \ py.test python/tests - - cd ../"${pkgname[2]}-${pkgver}" - PYTHONPATH="${PYTHON2_PATH}" \ - LD_LIBRARY_PATH="${PWD}/build/src" \ - py.test2 python/tests } package_aubio() { pkgdesc="A tool for extracting annotations from audio signals" - depends=('ffmpeg' 'fftw') + depends=('fftw' 'glibc' 'libavcodec.so' 'libavformat.so' 'libavutil.so' + 'libswresample.so' 'libjack.so' 'libsamplerate' 'libsndfile') optdepends=('python2-aubio: Python 2.x interface' 'python-aubio: Python 3.x interface') + provides=('libaubio.so') groups=('pro-audio') cd "${pkgname}-${pkgver}" waf --destdir="${pkgdir}" install # move doc, as waf configure doesn't honor the htmldir and docdir settings mv -v "${pkgdir}/usr/share/doc/lib${pkgname}-doc" \ "${pkgdir}/usr/share/doc/${pkgname}" - install -t "${pkgdir}/usr/share/doc/${pkgname}/" \ - -vDm 644 {AUTHORS,ChangeLog,README.md} + install -vDm 644 {AUTHORS,ChangeLog,README.md} \ + -t "${pkgdir}/usr/share/doc/${pkgname}/" } package_python-aubio() { - pkgdesc="Python 3.x bindings for aubio." - depends=('aubio' 'python-numpy' 'python-setuptools') + pkgdesc="Python 3.x bindings for aubio" + depends=('glibc' 'libaubio.so' 'python-numpy' 'python-setuptools') cd "${pkgbase}-${pkgver}" python setup.py install --skip-build \ - --optimize=1 \ - --root="${pkgdir}" - install -t "${pkgdir}/usr/share/doc/${pkgname}/" \ - -vDm 644 {AUTHORS,ChangeLog,README.md} -} - -package_python2-aubio() { - pkgdesc="Python 2.x bindings for aubio." - depends=('aubio' 'python2-numpy' 'python2-setuptools') - cd "${pkgname}-${pkgver}" - python2 setup.py install --skip-build \ - --optimize=1 \ - --root="${pkgdir}" - install -t "${pkgdir}/usr/share/doc/${pkgname}/" \ - -vDm 644 {AUTHORS,ChangeLog,README.md} + --optimize=1 \ + --root="${pkgdir}" + install -vDm 644 {AUTHORS,ChangeLog,README.md} \ + -t "${pkgdir}/usr/share/doc/${pkgname}/" } - # vim:set ts=2 sw=2 et: