Projects
Essentials
x265
x265.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File x265.spec of Package x265
# # spec file for package x265 # # Copyright (c) 2024 Packman Team <packman@links2linux.de> # Copyright (c) 2014 Torsten Gruner <t.gruner@katodev.de> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.links2linux.org/ # %define sover 209 %define libname lib%{name} %define libsoname %{libname}-%{sover} %define uver 3_6 Name: x265 Version: 3.6 Release: 0 Summary: A free h265/HEVC encoder - encoder binary License: GPL-2.0-or-later Group: Productivity/Multimedia/Video/Editors and Convertors URL: https://bitbucket.org/multicoreware/x265_git Source0: https://bitbucket.org/multicoreware/x265_git/downloads/%{name}_%{version}.tar.gz Patch1: x265.pkgconfig.patch Patch3: 0001-Fix-arm-flags.patch Patch4: 0004-Do-not-build-with-assembly-support-on-arm.patch BuildRequires: cmake %if 0%{?suse_version} > 1500 BuildRequires: gcc-c++ %else %if 0%{?sle_version} > 150500 BuildRequires: gcc13 BuildRequires: gcc13-c++ %else BuildRequires: gcc10 BuildRequires: gcc10-c++ %endif %endif BuildRequires: nasm >= 2.13 BuildRequires: pkgconfig %ifarch x86_64 BuildRequires: libnuma-devel >= 2.0.9 %endif %description x265 is a free library for encoding next-generation H265/HEVC video streams. %package -n %{libsoname} Summary: A free H265/HEVC encoder - encoder binary Group: Productivity/Multimedia/Video/Editors and Convertors %description -n %{libsoname} x265 is a free library for encoding next-generation H265/HEVC video streams. %package -n libhdr10plus-%{uver} Summary: A free HDR10+ library Group: Productivity/Multimedia/Video/Editors and Convertors %description -n libhdr10plus-%{uver} A free library supporting HDR10+. %package -n %{libname}-devel Summary: Libraries and include file for the %{libname} encoder Group: Development/Libraries/C and C++ Requires: %{libsoname} = %{version}-%{release} Requires: libhdr10plus-%{uver} = %{version}-%{release} Provides: %{name}-devel = %{version} Obsoletes: %{name}-devel < %{version} %description -n %{libname}-devel x265 is a free library for encoding next-generation H265/HEVC video streams. %prep %autosetup -p1 -n %{name}_%{version} %build test -x "$(type -p gcc)" && CC="$_" test -x "$(type -p g++)" && CXX="$_" test -x "$(type -p gcc-10)" && CC="$_" test -x "$(type -p g++-10)" && CXX="$_" test -x "$(type -p gcc-13)" && CC="$_" test -x "$(type -p g++-13)" && CXX="$_" export CC="$(readlink -f ${CC})" export CXX="$(readlink -f ${CXX})" CFLAGS='%optflags -Wno-misleading-indentation -Wno-unused-parameter -Wno-unused-variable' CXXFLAGS='%optflags -Wno-misleading-indentation -Wno-unused-parameter -Wno-unused-variable' # set the version by hand sed -i~ "/^include(Version)/d" source/CMakeLists.txt diff -u "$_"~ "$_" && exit 1 # force version number in the soname sed -i~ 's/hdr10plus-shared PROPERTIES OUTPUT_NAME hdr10plus/hdr10plus-shared PROPERTIES OUTPUT_NAME hdr10plus-%{version}/' \ source/CMakeLists.txt diff -u "$_"~ "$_" && exit 1 SOURCE_DIR="$PWD"/source COMMON_FLAGS="-DENABLE_TESTS=OFF -DENABLE_PIC=ON -Wno-dev" HIGH_BIT_DEPTH_FLAGS="-DENABLE_CLI=OFF -DENABLE_SHARED=OFF -DEXPORT_C_API=OFF -DHIGH_BIT_DEPTH=ON" %define __sourcedir ./source # Build 10bit depth version of the library %define __builddir ./source/build-10bit %cmake $COMMON_FLAGS $HIGH_BIT_DEPTH_FLAGS \ %ifarch i586 -DENABLE_ASSEMBLY=OFF %endif make %{?_smp_mflags} cd ../.. # Build 12bit depth version of the library %define __builddir ./source/build-12bit %cmake $COMMON_FLAGS $HIGH_BIT_DEPTH_FLAGS -DMAIN12=ON \ %ifarch i586 -DENABLE_ASSEMBLY=OFF %endif make %{?_smp_mflags} cd ../.. mv source/build-10bit/libx265.a source/build-10bit/libx265_main10.a mv source/build-12bit/libx265.a source/build-12bit/libx265_main12.a # Build general version of the library linking in the 10/12bit depth versions %define __builddir ./source/build %cmake $COMMON_FLAGS \ -DENABLE_SHARED=ON \ -DX265_LATEST_TAG="%{sover}.0" \ -DX265_VERSION="%{version}" \ -DENABLE_HDR10_PLUS=ON \ -DENABLE_CLI=ON \ -DLINKED_10BIT=ON \ -DLINKED_12BIT=ON \ -DEXTRA_LINK_FLAGS="-L$SOURCE_DIR/build-10bit -L$SOURCE_DIR/build-12bit" \ -DEXTRA_LIB="x265_main10.a;x265_main12.a" make %{?_smp_mflags} cd ../../ %install %cmake_install find %{buildroot} -type f -name "*.a" -delete -print0 %check %post -n %{libsoname} -p /sbin/ldconfig %postun -n %{libsoname} -p /sbin/ldconfig %post -n libhdr10plus-%{uver} -p /sbin/ldconfig %postun -n libhdr10plus-%{uver} -p /sbin/ldconfig %files -n %{libsoname} %{_libdir}/%{libname}.so.%{sover}* %files -n libhdr10plus-%{uver} %{_libdir}/libhdr10plus-%{version}.so %files %{_bindir}/%{name} %files -n %{libname}-devel %license COPYING %doc readme.rst %{_includedir}/%{name}.h %{_includedir}/%{name}_config.h %{_includedir}/hdr10plus.h %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/%{libname}.so %changelog
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.