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