File x265.spec of Package x265 (Revision 79b9c710ad75e2b27580ce84933ea3c6)

Currently displaying revision 79b9c710ad75e2b27580ce84933ea3c6 , Show latest

92
 
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
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 -p1
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
cmake  -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_TESTS=ON -G "Unix Makefiles" ../../source
54
cmake -DCMAKE_INSTALL_PREFIX=/usr ../../source
55
56
%build
57
#./make-Makefiles.bash
58
make %{?_smp_mflags}
59
60
%install
61
%makeinstall
62
%ifarch x86_64
63
  mv "%{buildroot}/usr/lib" "%{buildroot}%{_libdir}"
64
%endif
65
66
rm -f %{buildroot}%{_libdir}/%{libname}.a
67
68
echo "%{libname}-%{soname}" > %{_sourcedir}/baselibs.conf
69
70
%clean
71
%{?buildroot:%__rm -rf "%{buildroot}"}
72
73
%post -n %{libsoname} -p /sbin/ldconfig
74
%postun -n %{libsoname} -p /sbin/ldconfig
75
76
%files -n %{libsoname}
77
%defattr(0644,root,root)
78
%{_libdir}/%{libname}.so.%{soname}*
79
80
%files 
81
%defattr(0755,root,root)
82
%{_bindir}/%{name}
83
84
%files -n %{libname}-devel
85
%defattr(0644,root,root)
86
%{_includedir}/%{name}.h
87
%{_includedir}/%{name}_config.h
88
%{_libdir}/pkgconfig/%{name}.pc
89
%{_libdir}/%{libname}.so
90
91
%changelog
92