Created
September 19, 2021 23:53
-
-
Save Aerocatia/605872e3bde529a372809816c560a84e to your computer and use it in GitHub Desktop.
mingw-w64-libsamplerate-0.2.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id: PKGBUILD 278874 2016-10-17 09:20:23Z arojas $ | |
# Maintainer: Eric Bélanger <[email protected]> | |
_pkgname=libsamplerate | |
pkgname=mingw-w64-libsamplerate | |
pkgver=0.2.2 | |
pkgrel=1 | |
pkgdesc="Secret Rabbit Code - aka Sample Rate Converter for audio (mingw-w64)" | |
arch=('any') | |
url="https://libsndfile.github.io/libsamplerate/index.html" | |
license=('BSD') | |
depends=('mingw-w64-libsndfile') | |
makedepends=('mingw-w64-cmake') | |
options=('!strip' '!buildflags' '!staticlibs') | |
source=("https://github.com/libsndfile/$_pkgname/releases/download/$pkgver/$_pkgname-$pkgver.tar.xz") | |
b2sums=('71b1e8a1644a94fff019abc6bf98c557df84994293f1e9bc651ad3ad3f0afeb24f54b8c75fc26e5202ae7c3a3e34e783fd1be7f7c6fdefe9eac9a5dfe7100b91') | |
validpgpkeys=('73571E85C19F4281D8C97AA86CA41A7743B8D6C8') | |
_architectures="i686-w64-mingw32 x86_64-w64-mingw32" | |
prepare() { | |
cd ${_pkgname}-${pkgver} | |
for patch in ../*.patch; do | |
if [ ! -f "$patch" ]; then | |
break; | |
else | |
patch -p1 -i "$patch" | |
fi | |
done | |
} | |
build() { | |
cd ${_pkgname}-${pkgver} | |
for _arch in ${_architectures}; do | |
mkdir build-${_arch} && pushd build-${_arch} | |
mkdir shared && pushd shared | |
${_arch}-cmake ../.. | |
make | |
popd | |
mkdir static && pushd static | |
${_arch}-cmake ../.. -DBUILD_SHARED_LIBS=OFF | |
make | |
popd | |
popd | |
done | |
} | |
package() { | |
cd ${_pkgname}-${pkgver} | |
for _arch in ${_architectures}; do | |
pushd build-${_arch} | |
pushd static | |
make DESTDIR="${pkgdir}" install | |
popd | |
pushd shared | |
make DESTDIR="${pkgdir}" install | |
popd | |
rm -r "${pkgdir}"/usr/${_arch}/share | |
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll | |
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a | |
popd | |
done | |
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment