File x265.spec of Package x265 (Revision 7c266c26259e4692942d9feafc1503db)

Currently displaying revision 7c266c26259e4692942d9feafc1503db , Show latest

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