File x265.spec of Package x265 (Revision 4)
Currently displaying revision 4 , Show latest
88
1
# based on the spec file from https://build.opensuse.org/package/view_file/home:Simmphonie/libx265/
2
3
Name: x265
4
%define soname 10
5
%define libname lib%{name}
6
%define libsoname %{libname}-%{soname}
7
%define hgdate 20140324
8
Version: 0.%{soname}hg%{hgdate}
9
Release: 1
10
License: GPL-2.0+
11
Summary: A free h265/HEVC encoder - encoder binary
12
Url: https://bitbucket.org/multicoreware/x265/wiki/Home
13
Group: Productivity/Multimedia/Video/Editors and Convertors
14
Source0: %{name}-hg%{hgdate}.tar.bz2
15
BuildRequires: gcc gcc-c++
16
BuildRequires: cmake >= 2.8.8
17
BuildRequires: pkg-config
18
BuildRequires: yasm >= 1.2.0
19
BuildRoot: %{_tmppath}/%{name}-%{version}-build
20
21
%description
22
x265 is a free library for encoding next-generation H265/HEVC video
23
streams.
24
25
%package -n %{libsoname}
26
Summary: A free H265/HEVC encoder - encoder binary
27
Group: Productivity/Multimedia/Video/Editors and Convertors
28
29
%description -n %{libsoname}
30
x265 is a free library for encoding next-generation H265/HEVC video
31
streams.
32
33
%package -n %{libname}-devel
34
Summary: Libraries and include file for the %{libname} encoder
35
Group: Development/Libraries/C and C++
36
Requires: %{buildrequires}
37
Requires: %{libsoname} = %{version}
38
Provides: %{name}-devel = %{version}
39
Obsoletes: %{name}-devel < %{version}
40
41
%description -n %{libname}-devel
42
x265 is a free library for encoding next-generation H265/HEVC video
43
streams.
44
45
%prep
46
%setup -q -n "%{name}/build/linux"
47
%define FAKE_BUILDDATE %(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
48
sed -i -e "s/0.0/%{soname}.0/g" ../../source/cmake/version.cmake
49
cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_TESTS=ON -G "Unix Makefiles" ../../source
50
cmake -DCMAKE_INSTALL_PREFIX=/usr ../../source
51
52
%build
53
#./make-Makefiles.bash
54
make %{?_smp_mflags}
55
56
%install
57
%makeinstall
58
%ifarch x86_64
59
mv "%{buildroot}/usr/lib" "%{buildroot}%{_libdir}"
60
%endif
61
62
rm -f %{buildroot}%{_libdir}/%{libname}.a
63
64
echo "%{libname}-%{soname}" > %{_sourcedir}/baselibs.conf
65
66
%clean
67
%{?buildroot:%__rm -rf "%{buildroot}"}
68
69
%post -n %{libsoname} -p /sbin/ldconfig
70
%postun -n %{libsoname} -p /sbin/ldconfig
71
72
%files -n %{libsoname}
73
%defattr(0644,root,root)
74
%{_libdir}/%{libname}.so.%{soname}*
75
76
%files
77
%defattr(0755,root,root)
78
%{_bindir}/%{name}
79
80
%files -n %{libname}-devel
81
%defattr(0644,root,root)
82
%{_includedir}/%{name}.h
83
%{_includedir}/%{name}_config.h
84
%{_libdir}/pkgconfig/%{name}.pc
85
%{_libdir}/%{libname}.so
86
87
%changelog
88