]> git.pld-linux.org Git - packages/libx264.git/blame - libx264.spec
nasm required by x86 only
[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)
c010e225 6
b841a03e 7%ifnarch %{ix86} %{x8664}
c010e225
ER
8%undefine with_asm
9%endif
460a5dbe 10
e3dd7f14 11%define rel 1
e391f7cc 12%define snap 20191217
1eadea1c 13%define snaph 2245
65b73f48 14Summary: H264 encoder library
23647862 15Summary(pl.UTF-8): Biblioteka kodująca H264
65b73f48 16Name: libx264
bb560be3 17Version: 0.1.3
4663db6e 18Release: 1.%{snap}_%{snaph}.%{rel}
76f3f357 19License: GPL v2+
65b73f48 20Group: Libraries
deef52dc 21# still no releases, use snapshots
e391f7cc
JB
22# for further changes see: https://code.videolan.org/videolan/x264/
23Source0: https://download.videolan.org/videolan/x264/snapshots/x264-snapshot-%{snap}-%{snaph}.tar.bz2
24# Source0-md5: 6d6b7b49518ddfd42c4e3577b5242b31
2741dce2 25Patch0: %{name}-alpha.patch
deef52dc 26Patch1: altivec-no-vand.patch
d6b08ec3 27Patch2: %{name}-gpac.patch
cb936077 28Patch3: x32.patch
f33b600a 29URL: http://www.videolan.org/developers/x264.html
019accbe 30%ifarch %{ix86} %{x8664}
e3dd7f14 31%{?with_asm:BuildRequires: nasm >= 2.13}
019accbe 32%endif
bad36153 33BuildRequires: pkgconfig
deef52dc
JB
34%if %{without bootstrap}
35# which version exactly???
36# for full x264 CLI utility functionality it wants:
37# libswscale >= 0.9.0 (in pkgconfig file)
38# libav{format,codec,util} from ffmpeg >= r21854
8723c613 39BuildRequires: ffmpeg-devel >= 0.7.1
e391f7cc 40BuildRequires: ffms2-devel >= 2.21
deef52dc 41# gpac >= 2007-06-21
e391f7cc
JB
42%{!?with_lsmash:BuildRequires: gpac-devel >= 0.5.0-3}
43%{?with_lsmash:BuildRequires: l-smash-devel >= 1.5}
deef52dc 44%endif
65b73f48
JB
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
7cf55bee
PS
47# encoder/macroblock.c breaks strict-aliasing rules
48%define specflags -fno-strict-aliasing
49
65b73f48
JB
50%description
51libx264 library for encoding H264 video format.
52
3d6bd83a 53%description -l pl.UTF-8
65b73f48
JB
54Biblioteka libx264 do kodowania w formacie obrazu H264.
55
56%package devel
57Summary: Header files for x264 library
23647862 58Summary(pl.UTF-8): Pliki nagłówkowe biblioteki x264
65b73f48
JB
59Group: Development/Libraries
60Requires: %{name} = %{version}-%{release}
61
62%description devel
63Header files for x264 library.
64
3d6bd83a
JR
65%description devel -l pl.UTF-8
66Pliki nagłówkowe biblioteki x264.
65b73f48
JB
67
68%package static
69Summary: Static x264 library
23647862 70Summary(pl.UTF-8): Statyczna biblioteka x264
65b73f48
JB
71Group: Development/Libraries
72Requires: %{name}-devel = %{version}-%{release}
73
74%description static
75Static x264 library.
76
3d6bd83a 77%description static -l pl.UTF-8
65b73f48
JB
78Statyczna biblioteka x264.
79
deef52dc
JB
80%package -n x264
81Summary: x264 CLI decoder
82Summary(pl.UTF-8): Dekoder x264 działający z linii poleceń
83Group: Applications/Multimedia
84Requires: %{name} = %{version}-%{release}
c6f8df1a 85%if %{without bootstrap}
e391f7cc
JB
86Requires: ffms2 >= 2.21
87%if %{with lsmash}
88Requires: l-smash >= 1.5
89%else
c6f8df1a
JB
90Requires: gpac >= 0.5.0-3
91%endif
e391f7cc 92%endif
deef52dc
JB
93
94%description -n x264
95x264 CLI decoder.
96
97%description -n x264 -l pl.UTF-8
98Dekoder x264 działający z linii poleceń.
99
65b73f48 100%prep
aedfa898 101%setup -q -n x264-snapshot-%{snap}-%{snaph}
2741dce2 102%patch0 -p1
deef52dc 103%if "%{pld_release}" == "ac"
3b7e662c 104%patch1 -p1
deef52dc 105%endif
d6b08ec3 106%patch2 -p1
cb936077 107%patch3 -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}" \
c010e225 119 %{!?with_asm:--disable-asm} \
bad36153 120 --enable-pic \
c8829b2a
JB
121 --enable-shared \
122 --enable-static
7cf55bee 123
65b73f48
JB
124%{__make}
125
126%install
127rm -rf $RPM_BUILD_ROOT
128
129%{__make} install \
130 DESTDIR=$RPM_BUILD_ROOT
131
132%clean
133rm -rf $RPM_BUILD_ROOT
134
135%post -p /sbin/ldconfig
136%postun -p /sbin/ldconfig
137
138%files
139%defattr(644,root,root,755)
247a0e4f 140%doc AUTHORS
e3dd7f14 141%attr(755,root,root) %{_libdir}/libx264.so.157
65b73f48
JB
142
143%files devel
144%defattr(644,root,root,755)
145%attr(755,root,root) %{_libdir}/libx264.so
65b73f48 146%{_includedir}/x264.h
ac54585f 147%{_includedir}/x264_config.h
247a0e4f 148%{_pkgconfigdir}/x264.pc
65b73f48
JB
149
150%files static
151%defattr(644,root,root,755)
152%{_libdir}/libx264.a
deef52dc
JB
153
154%files -n x264
155%defattr(644,root,root,755)
156%attr(755,root,root) %{_bindir}/x264
This page took 0.04966 seconds and 4 git commands to generate.