File x265.spec of Package x265 (Revision e21b14f98d2d535e536c2c431605eaba)

Currently displaying revision e21b14f98d2d535e536c2c431605eaba , Show latest

92
 
1
# based on the spec file from https://build.opensuse.org/package/view_file/home:Simmphonie/libx265/
2
3
Name:           x265
4
%define soname  95
5
%define libname lib%{name}
6
%define libsoname %{libname}-%{soname}
7
Version:        2.1
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
Patch1:         x265.pkgconfig.patch
16
BuildRequires:  gcc gcc-c++
17
BuildRequires:  cmake >= 2.8.8
18
BuildRequires:  libnuma-devel >= 2.0.9
19
BuildRequires:  pkg-config
20
BuildRequires:  yasm >= 1.2.0
21
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
22
23
%description
24
x265 is a free library for encoding next-generation H265/HEVC video
25
streams.
26
27
%package -n %{libsoname}
28
Summary:        A free H265/HEVC encoder - encoder binary
29
Group:          Productivity/Multimedia/Video/Editors and Convertors
30
31
%description -n %{libsoname}
32
x265 is a free library for encoding next-generation H265/HEVC video
33
streams.
34
35
%package -n %{libname}-devel
36
Summary:        Libraries and include file for the %{libname} encoder
37
Group:          Development/Libraries/C and C++
38
Requires:       %{buildrequires}
39
Requires:       %{libsoname} = %{version}
40
Provides:       %{name}-devel = %{version}
41
Obsoletes:      %{name}-devel < %{version}
42
43
%description -n %{libname}-devel
44
x265 is a free library for encoding next-generation H265/HEVC video
45
streams. 
46
47
%prep
48
%setup -q -n %{name}_%{version}
49
%patch0 -p1
50
%patch1 -p1
51
52
sed -i -e "s/0.0/%{soname}.0/g" source/cmake/version.cmake
53
54
55
%build
56
%if 0%{?suse_version} < 1330
57
cd source
58
%else
59
%define __builddir ./source/build
60
%define __sourcedir ./source
61
%endif
62
%cmake -DENABLE_TESTS=ON
63
make %{?_smp_mflags}
64
65
%install
66
%if 0%{?suse_version} < 1330
67
cd source
68
%endif
69
%cmake_install
70
rm -f %{buildroot}%{_libdir}/%{libname}.a
71
echo "%{libname}-%{soname}" > %{_sourcedir}/baselibs.conf
72
73
%post -n %{libsoname} -p /sbin/ldconfig
74
%postun -n %{libsoname} -p /sbin/ldconfig
75
76
%files -n %{libsoname}
77
%defattr(0644,root,root)
78
%{_libdir}/%{libname}.so.%{soname}*
79
80
%files 
81
%defattr(0755,root,root)
82
%{_bindir}/%{name}
83
84
%files -n %{libname}-devel
85
%defattr(0644,root,root)
86
%{_includedir}/%{name}.h
87
%{_includedir}/%{name}_config.h
88
%{_libdir}/pkgconfig/%{name}.pc
89
%{_libdir}/%{libname}.so
90
91
%changelog
92