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