PKGBUILDs/bento4/default/PKGBUILD

54 lines
1.7 KiB
Bash
Raw Normal View History

2015-11-28 01:09:28 +01:00
# Maintainer: Martchus <youremail@domain.com>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
2015-11-28 01:09:28 +01:00
pkgname=bento4
2016-02-22 18:34:09 +01:00
pkgver=1.4.3.607
_pkgverstr=1.4.3-607
2015-11-28 01:09:28 +01:00
pkgrel=1
pkgdesc="Bento4 is a C++ class library and tools designed to read and write ISO-MP4 files."
arch=('i686' 'x86_64')
2016-02-22 18:34:09 +01:00
url="https://www.bento4.com/"
2015-11-28 01:09:28 +01:00
license=('GPL')
2016-02-22 18:34:09 +01:00
makedepends=('cmake')
2015-11-28 01:09:28 +01:00
optdepends=('python')
2016-02-22 18:34:09 +01:00
source=("https://github.com/axiomatic-systems/Bento4/archive/v${_pkgverstr}.tar.gz")
md5sums=('9c5ebea9e0cef667c214d7df38d00b4e')
2015-11-28 01:09:28 +01:00
_config="Release"
if [ $CARCH == "i686" ]; then
2015-12-24 16:50:30 +01:00
_arch="x86"
2015-11-28 01:09:28 +01:00
else
2015-12-24 16:50:30 +01:00
_arch=$CARCH
2015-11-28 01:09:28 +01:00
fi
build() {
2016-02-22 18:34:09 +01:00
cd "${srcdir}/Bento4-${_pkgverstr}/Build/Targets/$_arch-unknown-linux/"
2015-12-24 16:50:30 +01:00
sed -i "6s/.*/AP4_BUILD_CONFIG = $_config/" ../../Makefiles/Bootstrap.mak
2016-02-22 18:34:09 +01:00
make sdk AP4_BUILD_CONFIG=$_config
# make shared library manually
cd "${srcdir}/Bento4-${_pkgverstr}/Build/Targets/$_arch-unknown-linux/$_config/SDK/lib"
mkdir shared
cd shared
ar x ../libAP4.a
g++ -shared -Wl,-soname,libAP4.so.$pkgver -o libAP4.so.$pkgver *.o
2015-11-28 01:09:28 +01:00
}
package() {
2016-02-22 18:34:09 +01:00
cd "${srcdir}/Bento4-${_pkgverstr}/Build/Targets/$_arch-unknown-linux/$_config/SDK"
mkdir -p "$pkgdir/usr/bin/"
mkdir -p "$pkgdir/usr/lib/"
mkdir -p "$pkgdir/usr/include/$pkgname/"
2015-12-24 16:50:30 +01:00
pushd ./bin
for file in *; do
# prefix binaries with "bento4-" to avoid conflicts
install -m755 -D "./$file" "$pkgdir/usr/bin/bento4-$file"
done
popd
2016-02-22 18:34:09 +01:00
install -m644 -D ./lib/*.a "$pkgdir/usr/lib/" # static lib is usually removed anyways
install -m644 -D ./lib/shared/*.so.* "$pkgdir/usr/lib/"
install -m644 -D ./include/*.h "$pkgdir/usr/include/$pkgname/"
cd "$pkgdir/usr/lib/"
ln -s libAP4.so.$pkgver libAP4.so
}