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