File x265.spec of Package x265 (Revision 67c147e5e5571628d0a2c0d8865b52cb)
Currently displaying revision 67c147e5e5571628d0a2c0d8865b52cb , Show latest
95
1
# based on the spec file from https://build.opensuse.org/package/view_file/home:Simmphonie/libx265/
2
3
Name: x265
4
%define soname 32
5
%define libname lib%{name}
6
%define libsoname %{libname}-%{soname}
7
%define hgdate 20140928
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
Patch0: arm.patch
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
cd ../..
49
%patch0
50
cd -
51
%define FAKE_BUILDDATE %(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
52
sed -i -e "s/0.0/%{soname}.0/g" ../../source/cmake/version.cmake
53
54
55
%build
56
export CXXFLAGS="%optflags"
57
export CFLAGS="%optflags"
58
cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_TESTS=ON -G "Unix Makefiles" ../../source
59
cmake -DCMAKE_INSTALL_PREFIX=/usr ../../source
60
#./make-Makefiles.bash
61
make %{?_smp_mflags} VERBOSE=1
62
63
%install
64
%makeinstall
65
%ifarch x86_64
66
mv "%{buildroot}/usr/lib" "%{buildroot}%{_libdir}"
67
%endif
68
69
rm -f %{buildroot}%{_libdir}/%{libname}.a
70
71
echo "%{libname}-%{soname}" > %{_sourcedir}/baselibs.conf
72
73
%clean
74
%{?buildroot:%__rm -rf "%{buildroot}"}
75
76
%post -n %{libsoname} -p /sbin/ldconfig
77
%postun -n %{libsoname} -p /sbin/ldconfig
78
79
%files -n %{libsoname}
80
%defattr(0644,root,root)
81
%{_libdir}/%{libname}.so.%{soname}*
82
83
%files
84
%defattr(0755,root,root)
85
%{_bindir}/%{name}
86
87
%files -n %{libname}-devel
88
%defattr(0644,root,root)
89
%{_includedir}/%{name}.h
90
%{_includedir}/%{name}_config.h
91
%{_libdir}/pkgconfig/%{name}.pc
92
%{_libdir}/%{libname}.so
93
94
%changelog
95