File x265.spec of Package x265 (Revision 5409f7c86f0dfc98be8db09ea4ba5bf8)

Currently displaying revision 5409f7c86f0dfc98be8db09ea4ba5bf8 , Show latest

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