File x265.spec of Package x265 (Revision fe82c33a2ac53f5759bcf5b9431988ce)

Currently displaying revision fe82c33a2ac53f5759bcf5b9431988ce , Show latest

100
 
1
# based on the spec file from https://build.opensuse.org/package/view_file/home:Simmphonie/libx265/
2
3
Name:           x265
4
%define soname  87
5
%define libname lib%{name}
6
%define libsoname %{libname}-%{soname}
7
Version:        2.0
8
Release:        0
9
License:        GPL-2.0+
10
Summary:        A free h265/HEVC encoder - encoder binary
11
Url:            https://bitbucket.org/multicoreware/x265/wiki/Home
12
Group:          Productivity/Multimedia/Video/Editors and Convertors
13
Source0:        https://bitbucket.org/multicoreware/x265/downloads/%{name}_%{version}.tar.gz
14
Patch0:         arm.patch
15
BuildRequires:  gcc gcc-c++
16
BuildRequires:  cmake >= 2.8.8
17
# for openSUSE 13.1 only libnuma-devel = 2.0.8 is available, but version 2.0.9 or higher is required
18
# build against version 2.0.8 failes with "error: 'numa_bitmask_weight' was not declared in this scope"
19
%if ! ( 0%{?suse_version} == 1310 )
20
%ifarch x86_64
21
BuildRequires:  libnuma-devel >= 2.0.9
22
%endif
23
%endif
24
BuildRequires:  pkg-config
25
BuildRequires:  yasm >= 1.2.0
26
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
27
28
%description
29
x265 is a free library for encoding next-generation H265/HEVC video
30
streams.
31
32
%package -n %{libsoname}
33
Summary:        A free H265/HEVC encoder - encoder binary
34
Group:          Productivity/Multimedia/Video/Editors and Convertors
35
36
%description -n %{libsoname}
37
x265 is a free library for encoding next-generation H265/HEVC video
38
streams.
39
40
%package -n %{libname}-devel
41
Summary:        Libraries and include file for the %{libname} encoder
42
Group:          Development/Libraries/C and C++
43
Requires:       %{buildrequires}
44
Requires:       %{libsoname} = %{version}
45
Provides:       %{name}-devel = %{version}
46
Obsoletes:      %{name}-devel < %{version}
47
48
%description -n %{libname}-devel
49
x265 is a free library for encoding next-generation H265/HEVC video
50
streams. 
51
52
%prep
53
%setup -q -n x265_%{version}
54
%patch0 -p1
55
56
%define FAKE_BUILDDATE %(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
57
sed -i -e "s/0.0/%{soname}.0/g" source/cmake/version.cmake
58
59
60
%build
61
export CXXFLAGS="%{optflags}"
62
export CFLAGS="%{optflags}"
63
64
cd build/linux
65
cmake  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
66
       -DLIB_INSTALL_DIR=%{_lib} \
67
       -DENABLE_TESTS=ON \
68
       -G "Unix Makefiles" \
69
       ../../source
70
71
make %{?_smp_mflags} VERBOSE=1
72
73
%install
74
cd build/linux
75
%makeinstall
76
77
rm -f %{buildroot}%{_libdir}/%{libname}.a
78
79
echo "%{libname}-%{soname}" > %{_sourcedir}/baselibs.conf
80
81
%post -n %{libsoname} -p /sbin/ldconfig
82
%postun -n %{libsoname} -p /sbin/ldconfig
83
84
%files -n %{libsoname}
85
%defattr(0644,root,root)
86
%{_libdir}/%{libname}.so.%{soname}*
87
88
%files 
89
%defattr(0755,root,root)
90
%{_bindir}/%{name}
91
92
%files -n %{libname}-devel
93
%defattr(0644,root,root)
94
%{_includedir}/%{name}.h
95
%{_includedir}/%{name}_config.h
96
%{_libdir}/pkgconfig/%{name}.pc
97
%{_libdir}/%{libname}.so
98
99
%changelog
100