archrelease: copy trunk to extra-x86_64
[arch-packages.git] / zita-resampler / trunk / PKGBUILD
blobb5c28acf26e28362c27064218fb8eeb8308a097c
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: speps <speps at aur dot archlinux dot org>
3 # Contributor: Philipp Überbacher <murks at lavabit dot com>
5 pkgname=zita-resampler
6 pkgver=1.8.0
7 pkgrel=1
8 pkgdesc="A C++ library for resampling audio signals"
9 url="https://kokkinizita.linuxaudio.org/linuxaudio/"
10 arch=('x86_64')
11 license=('GPL3')
12 depends=('gcc-libs' 'glibc')
13 makedepends=('libsndfile')
14 optdepends=('libsndfile: for zresample and zretune')
15 provides=('libzita-resampler.so')
16 source=("https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pkgname}-${pkgver}.tar.bz2")
17 sha512sums=('adf1f465ac09104be5a02c1cf0f052a44b4c1a448312f3aca016a889e98cfcdebfded38f60300ad85d18ae03eadca7e8e95efb2875267bc36435ccfac881a8e7')
18 b2sums=('1ba5d255fff9c66e18e6177bc7e48a4710fdf54f58c07f162f8c8801f4f449b22dea9922645e7e33b70e07739c2b381176714e704f9840305f194f3c23d66de2')
20 prepare() {
21   cd "${pkgname}-${pkgver}"
22   # FS#36248 - strip march=native
23   sed -e '/native/d' \
24       -i {source,apps}/Makefile
25   # removing local call to ldconfig
26   sed -e 's/ldconfig/& -N $(DESTDIR)\/$(LIBDIR)/' \
27       -i source/Makefile
28   # fix use of BINDIR without preceeding DESTDIR
29   # fix use of MANDIR without preceeding DESTDIR
30   sed -e 's/\ $(BINDIR)/\ $(DESTDIR)$(BINDIR)/' \
31       -e 's/\ $(MANDIR)/\ $(DESTDIR)$(MANDIR)/' \
32       -i apps/Makefile
35 build() {
36   cd "${pkgname}-${pkgver}"
37   # libs
38   make -C source
39   # create lib link for building apps
40   ln -sv "lib${pkgname}.so.${pkgver}" "source/lib${pkgname}.so"
41   # apps
42   make LDFLAGS+=" -L../source" CXXFLAGS+=" -I../source" -C apps
43   # cleanup link
44   rm -rv "source/lib${pkgname}.so"
47 package() {
48   cd "${pkgname}-${pkgver}"
49   make -C source DESTDIR="$pkgdir/" PREFIX=/usr SUFFIX="" install
50   make -C apps DESTDIR="$pkgdir/" PREFIX=/usr install
51   # docs
52   install -vDm 644 {AUTHORS,README} docs/* \
53     -t "${pkgdir}/usr/share/doc/${pkgname}"