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