]> git.pld-linux.org Git - packages/libx264.git/blame_incremental - libx264.spec
- updated to latest version (last change 20240219; API 164); use API-based versioning...
[packages/libx264.git] / libx264.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_with bootstrap # no ffmpeg/gpac support in x264 utility
4%bcond_without asm # disable asm
5%bcond_without lsmash # lsmash for MP4 (preferred over gpac)
6
7%ifnarch %{ix86} %{x8664} aarch64
8%undefine with_asm
9%endif
10
11%define gitref 12426f5f4906e34d483a07da0debb6d56c6f8434
12%define rel 1
13%define snap 20240220
14%define api_ver 164
15Summary: H264 encoder library
16Summary(pl.UTF-8): Biblioteka kodująca H264
17Name: libx264
18Version: 0.%{api_ver}
19Release: 0.%{snap}.%{rel}
20License: GPL v2+
21Group: Libraries
22# still no releases, use snapshots
23# previously available at https://download.videolan.org/videolan/x264/snapshots/
24# for further changes see: https://code.videolan.org/videolan/x264/
25Source0: https://code.videolan.org/videolan/x264/-/archive/%{gitref}/x264-%{gitref}.tar.bz2
26# Source0-md5: b46bb3b0521e2d5fdefeed345bd42f94
27Patch0: %{name}-alpha.patch
28Patch1: %{name}-gpac.patch
29Patch2: x32.patch
30URL: http://www.videolan.org/developers/x264.html
31%ifarch %{ix86} %{x8664}
32%{?with_asm:BuildRequires: nasm >= 2.13}
33%endif
34BuildRequires: pkgconfig
35BuildRequires: rpmbuild(macros) >= 1.673
36%if %{without bootstrap}
37# which version exactly???
38# for full x264 CLI utility functionality it wants:
39# libswscale >= 0.9.0 (in pkgconfig file)
40# libav{format,codec,util} from ffmpeg >= r21854
41BuildRequires: ffmpeg-devel >= 0.7.1
42BuildRequires: ffms2-devel >= 2.21
43# gpac >= 2007-06-21
44%{!?with_lsmash:BuildRequires: gpac-devel >= 0.8.0}
45%{?with_lsmash:BuildRequires: l-smash-devel >= 1.5}
46%endif
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49# encoder/macroblock.c breaks strict-aliasing rules
50%define specflags -fno-strict-aliasing
51
52%description
53libx264 library for encoding H264 video format.
54
55%description -l pl.UTF-8
56Biblioteka libx264 do kodowania w formacie obrazu H264.
57
58%package devel
59Summary: Header files for x264 library
60Summary(pl.UTF-8): Pliki nagłówkowe biblioteki x264
61Group: Development/Libraries
62Requires: %{name} = %{version}-%{release}
63
64%description devel
65Header files for x264 library.
66
67%description devel -l pl.UTF-8
68Pliki nagłówkowe biblioteki x264.
69
70%package static
71Summary: Static x264 library
72Summary(pl.UTF-8): Statyczna biblioteka x264
73Group: Development/Libraries
74Requires: %{name}-devel = %{version}-%{release}
75
76%description static
77Static x264 library.
78
79%description static -l pl.UTF-8
80Statyczna biblioteka x264.
81
82%package -n x264
83Summary: x264 CLI decoder
84Summary(pl.UTF-8): Dekoder x264 działający z linii poleceń
85Group: Applications/Multimedia
86Requires: %{name} = %{version}-%{release}
87%if %{without bootstrap}
88Requires: ffms2 >= 2.21
89%if %{with lsmash}
90Requires: l-smash >= 1.5
91%else
92Requires: gpac >= 0.8.0
93%endif
94%endif
95
96%description -n x264
97x264 CLI decoder.
98
99%description -n x264 -l pl.UTF-8
100Dekoder x264 działający z linii poleceń.
101
102%prep
103%setup -q -n x264-%{gitref}
104%patch0 -p1
105%patch1 -p1
106%patch2 -p1
107
108%build
109CC="%{__cc}" \
110./configure \
111 --host=%{_target_platform} \
112 --prefix=%{_prefix} \
113 --exec-prefix=%{_prefix} \
114 --bindir=%{_bindir} \
115 --includedir=%{_includedir} \
116 --libdir=%{_libdir} \
117 --extra-cflags="%{rpmcflags}" \
118 %{!?with_asm:--disable-asm} \
119 --enable-pic \
120 --enable-shared \
121 --enable-static
122
123%{__make}
124
125%install
126rm -rf $RPM_BUILD_ROOT
127
128%{__make} install \
129 DESTDIR=$RPM_BUILD_ROOT
130
131%clean
132rm -rf $RPM_BUILD_ROOT
133
134%post -p /sbin/ldconfig
135%postun -p /sbin/ldconfig
136
137%files
138%defattr(644,root,root,755)
139%doc AUTHORS
140%attr(755,root,root) %{_libdir}/libx264.so.%{api_ver}
141
142%files devel
143%defattr(644,root,root,755)
144%attr(755,root,root) %{_libdir}/libx264.so
145%{_includedir}/x264.h
146%{_includedir}/x264_config.h
147%{_pkgconfigdir}/x264.pc
148
149%files static
150%defattr(644,root,root,755)
151%{_libdir}/libx264.a
152
153%files -n x264
154%defattr(644,root,root,755)
155%attr(755,root,root) %{_bindir}/x264
156%{bash_compdir}/x264
This page took 0.031145 seconds and 4 git commands to generate.