File x265.spec of Package x265 (Revision 2)
Currently displaying revision 2 , 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
Source1: baselibs.conf
16
BuildRequires: gcc gcc-c++
17
BuildRequires: cmake >= 2.8.8
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}/build/linux"
48
%define FAKE_BUILDDATE %(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
49
sed -i -e "s/0.0/%{soname}.0/g" ../../source/cmake/version.cmake
50
cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_TESTS=ON -G "Unix Makefiles" ../../source
51
cmake -DCMAKE_INSTALL_PREFIX=/usr ../../source
52
53
%build
54
#./make-Makefiles.bash
55
make %{?_smp_mflags}
56
57
%install
58
%makeinstall
59
%ifarch x86_64
60
mv "%{buildroot}/usr/lib" "%{buildroot}%{_libdir}"
61
%endif
62
63
echo "%{libname}" > %{_sourcedir}/baselibs.conf
64
65
%clean
66
%{?buildroot:%__rm -rf "%{buildroot}"}
67
68
%post -n %{libsoname} -p /sbin/ldconfig
69
%postun -n %{libsoname} -p /sbin/ldconfig
70
71
%files -n %{libsoname}
72
%defattr(0644,root,root)
73
%{_libdir}/%{libname}.so.%{soname}*
74
75
%files
76
%defattr(0644,root,root)
77
%{_bindir}/%{name}
78
79
%files -n %{libname}-devel
80
%defattr(0644,root,root)
81
%{_includedir}/%{name}.h
82
%{_includedir}/%{name}_config.h
83
%{_libdir}/pkgconfig/%{name}.pc
84
%{_libdir}/%{libname}.so
85
%{_libdir}/%{libname}.a
86
87
%changelog
88