File x265.spec of Package x265 (Revision 12)

Currently displaying revision 12 , Show latest

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