PKGBUILDs/bento4/default/PKGBUILD

48 lines
1.7 KiB
Bash
Raw Normal View History

2016-04-13 23:32:51 +02:00
# Maintainer: Martchus <martchus@gmx.net>
# 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
2024-02-05 13:29:57 +01:00
pkgver=1.6.0.641
_pkgverstr=1-6-0-641
2015-11-28 01:09:28 +01:00
pkgrel=1
2018-08-23 22:14:20 +02:00
pkgdesc='C++ class library and tools designed to read and write ISO-MP4 files'
2020-04-05 19:31:16 +02:00
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
2018-08-23 22:14:20 +02: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')
2020-03-26 20:59:19 +01:00
source=("http://zebulon.bok.net/Bento4/source/Bento4-SRC-${_pkgverstr}.zip")
2024-02-05 13:29:57 +01:00
sha256sums=('8258faf0de7253f2aac016018f33d4a04c16d9060735e14ec8711f84aaedf0c8')
2015-11-28 01:09:28 +01:00
build() {
2020-03-26 20:59:19 +01:00
cd "${srcdir}"
2018-08-23 22:14:20 +02:00
sed -i "s/ STATIC / SHARED /" CMakeLists.txt
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_SKIP_BUILD_RPATH=ON
cmake --build .
2015-11-28 01:09:28 +01:00
}
package() {
2020-03-26 20:59:19 +01:00
cd "${srcdir}"
2018-08-23 22:14:20 +02:00
# install manually (there's no install target)
mkdir -p "${pkgdir}/usr/"{bin,lib,lib/bento4}
find -iname '*.so' -exec cp --target-directory="${pkgdir}/usr/lib" {} \;
find -maxdepth 1 -executable -type f -exec cp --target-directory="${pkgdir}/usr/bin" {} \;
find Source/Python/utils -iname '*.py' -exec cp --target-directory="${pkgdir}/usr/lib/bento4" {} \;
for file in mp4dash mp4dashclone mp4hls; do
sed -e 's!/../utils/!/../lib/bento4/!' "Source/Python/wrappers/$file" > "${pkgdir}/usr/bin/$file"
chmod 755 "${pkgdir}/usr/bin/$file"
done
2018-08-23 22:14:20 +02:00
# prevent conflict with libmp4v2
suffix=-bento4
2018-08-23 22:14:20 +02:00
for conflicting_file in mp4extract mp4info; do
mv "${pkgdir}/usr/bin/$conflicting_file" "${pkgdir}/usr/bin/$conflicting_file$suffix"
find "${pkgdir}/usr/lib/bento4" -iname '*.py' -exec sed -i -e "s#\(Bento4Command(.*\)\b$conflicting_file\b#\1$conflicting_file$suffix#g" {} \;
2015-12-24 16:50:30 +01:00
done
2018-08-23 22:14:20 +02:00
}