Commit 7dab0ff3 authored by Rasmus Thomsen's avatar Rasmus Thomsen Committed by Natanael Copa

main/soxr: add -static subpackages

fixes #10531
parent 10eae134
......@@ -2,34 +2,49 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=soxr
pkgver=0.1.3
pkgrel=0
pkgrel=1
pkgdesc="High quality, one-dimensional sample-rate conversion library"
url="https://sourceforge.net/projects/soxr"
arch="all"
license="LGPL-2.1-or-later"
depends=""
depends_dev="cmake"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc $pkgname-dev"
subpackages="$pkgname-doc $pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.xz::https://sourceforge.net/projects/$pkgname/files/$pkgname-$pkgver-Source.tar.xz/download"
builddir="$srcdir/$pkgname-$pkgver-Source"
build() {
cd "$builddir"
cmake . \
mkdir -p "$builddir"/static "$builddir"/shared
# We can't build the static and shared libs in one go, so build them one by one...
cd "$builddir"/static
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DBUILD_SHARED_LIBS=False \
-DBUILD_TESTS=ON \
..
make
cd "$builddir"/shared
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DBUILD_TESTS=ON
-DBUILD_SHARED_LIBS=True \
-DBUILD_TESTS=ON \
..
make
}
check() {
cd "$builddir"
cd "$builddir"/static
make test
cd "$builddir"/shared
make test
}
package() {
cd "$builddir"
cd "$builddir"/static
make DESTDIR="$pkgdir" install
cd "$builddir"/shared
make DESTDIR="$pkgdir" install
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment