# Maintainer: Jesus E. pkgname=zita-resampler pkgver=1.8.0 _debver=1.8.0 _debrel=2 pkgrel=1 pkgdesc="A C++ library for resampling audio signals" url="https://kokkinizita.linuxaudio.org/linuxaudio/" arch=('i686' 'x86_64') license=('GPL-3') depends=('gcc-libs' 'glibc') makedepends=('libsndfile' 'libvorbis' 'flac' 'quilt') optdepends=('libsndfile: for zresample and zretune') source=("https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pkgname}-${pkgver}.tar.bz2" "https://deb.debian.org/debian/pool/main/z/zita-resampler/zita-resampler_$_debver-$_debrel.debian.tar.xz") sha512sums=('adf1f465ac09104be5a02c1cf0f052a44b4c1a448312f3aca016a889e98cfcdebfded38f60300ad85d18ae03eadca7e8e95efb2875267bc36435ccfac881a8e7' '9a51562ef3aa8a9b70ce1aeebb26b9b4a4dd3051fcaf30c3f5b99ebc2ed93eefde1a4eab2f38106c57d49cf271d0543852a564ab0478f10cdfcec7a9bb490127') prepare() { cd "${pkgname}-${pkgver}" if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . quilt push -av fi # FS#36248 - strip march=native sed -e '/native/d' \ -i {source,apps}/Makefile # removing local call to ldconfig sed -e 's/ldconfig/& -N $(DESTDIR)\/$(LIBDIR)/' \ -i source/Makefile # fix use of BINDIR without preceeding DESTDIR # fix use of MANDIR without preceeding DESTDIR sed -e 's/\ $(BINDIR)/\ $(DESTDIR)$(BINDIR)/' \ -e 's/\ $(MANDIR)/\ $(DESTDIR)$(MANDIR)/' \ -i apps/Makefile } build() { cd "${pkgname}-${pkgver}" # libs make -C source # create lib link for building apps ln -sv "lib${pkgname}.so.${pkgver}" "source/lib${pkgname}.so" # apps make LDFLAGS+=" -L../source" CXXFLAGS+=" -I../source" -C apps # cleanup link rm -rv "source/lib${pkgname}.so" } package() { cd "${pkgname}-${pkgver}" make -C source DESTDIR="$pkgdir/" PREFIX=/usr SUFFIX="" install make -C apps DESTDIR="$pkgdir/" PREFIX=/usr install # docs install -vDm 644 {AUTHORS,README} docs/* \ -t "${pkgdir}/usr/share/doc/${pkgname}" # license install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}" }