2016-04-13 23:32:51 +02:00
|
|
|
# Maintainer: Martchus <martchus@gmx.net>
|
2016-03-25 21:43:59 +01:00
|
|
|
|
|
|
|
# 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-04-13 23:32:51 +02:00
|
|
|
pkgver=1.4.3.608
|
|
|
|
_pkgverstr=1.4.3-608
|
2015-11-28 01:09:28 +01:00
|
|
|
pkgrel=1
|
2016-04-13 23:32:51 +02:00
|
|
|
pkgdesc="C++ class library and tools designed to read and write ISO-MP4 files"
|
2015-11-28 01:09:28 +01:00
|
|
|
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")
|
2016-04-13 23:32:51 +02:00
|
|
|
sha256sums=('f3e2ae92eb7b1d09e3ae1bfc02a1ab546207bc11033e9e7d6c7a46db53b9a4ca')
|
2015-11-28 01:09:28 +01:00
|
|
|
_config="Release"
|
2016-04-13 23:32:51 +02:00
|
|
|
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
|
2016-03-25 21:43:59 +01:00
|
|
|
}
|