%define gituser axiomatic-systems %define gitname Bento4 %global gitdate 20260513 %global commit add46ffbfb71b6be7fb4af847929f42efe3752ee %global shortcommit %(c=%{commit}; echo ${c:0:7}) # Build source is tarball release=1 or git commit=0 %global build_release 0 %global vers 1.6.0.641 %global srcvers v1.6.0-641 %global rel 0.2 %global distsuffix .1sunshine Name: Bento4 Version: %{vers} Summary: Full-featured MP4 format, MPEG DASH, HLS, CMAF SDK and tools %if 0%{?build_release} > 0 # build from the tarball release Release: %{rel}%{?dist}%{?distsuffix} Source0: https://github.com/%{gituser}/%{gitname}/archive/refs/tags/%{srcvers}.tar.gz %else # build from the git commit snapshot Release: %{rel}.%{gitdate}git%{shortcommit}%{?dist}%{?distsuffix} Source0: https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{gitname}-%{shortcommit}.tar.gz %endif License: Bento4-GPL URL: https://www.bento4.com/ BuildRequires: gcc-c++ BuildRequires: cmake%{?rhel:3} %description Bento4 is a C++ class library and tools designed to read and write ISO-MP4 files. This format is defined in international specifications ISO/IEC 14496-12, 14496-14 and 14496-15. The format is a derivative of the Apple Quicktime file format, so Bento4 can be used to read and write most Quicktime files as well. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig Requires: cmake-filesystem %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %if 0%{?build_release} > 0 %autosetup %else %autosetup -n %{gitname}-%{commit} %endif %build %if 0%{?rhel} && 0%{?rhel} < 8 %global cmake %cmake3 %global cmake_build %cmake3_build %global cmake_install %cmake3_install %global ctest %ctest3 %endif %cmake -DBUILD_SHARED_LIBRARY=ON %cmake_build %install %cmake_install %check %ctest %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license Documents/LICENSE.txt %doc README.md %{_bindir}/aac2mp4 %{_bindir}/avcinfo %{_bindir}/fixaacsampledescription %{_bindir}/hevcinfo %{_bindir}/mp42aac %{_bindir}/mp42avc %{_bindir}/mp42hevc %{_bindir}/mp42hls %{_bindir}/mp42ts %{_bindir}/mp4audioclip %{_bindir}/mp4compact %{_bindir}/mp4dcfpackager %{_bindir}/mp4decrypt %{_bindir}/mp4diff %{_bindir}/mp4dump %{_bindir}/mp4edit %{_bindir}/mp4encrypt %{_bindir}/mp4extract %{_bindir}/mp4fragment %{_bindir}/mp4iframeindex %{_bindir}/mp4info %{_bindir}/mp4mux %{_bindir}/mp4pssh %{_bindir}/mp4rtphintinfo %{_bindir}/mp4split %{_bindir}/mp4tag %{_libdir}/*.so %files devel %license Documents/LICENSE.txt %doc Documents/SDK/Bento4_SDK_documentation.pdf %{_libdir}/pkgconfig/*.pc %{_libdir}/cmake/bento4/ %{_includedir}/bento4/ %changelog * Sat Jun 06 2026 Moritz Barsnick 1.6.0.641-0.2.20260513gitadd46ff.1sunshine - list all packaged binaries explicitly - build library dynamically * Thu Jun 04 2026 Moritz Barsnick 1.6.0.641-0.1.20260513gitadd46ff.1sunshine - initial RPM