]>
Commit | Line | Data |
---|---|---|
deef52dc JB |
1 | # |
2 | # Conditional build: | |
be9a44e2 | 3 | %bcond_with bootstrap # no ffmpeg/gpac support in x264 utility |
deef52dc | 4 | # |
748e5138 | 5 | %define snap 20140328 |
1eadea1c | 6 | %define snaph 2245 |
7d6d3959 | 7 | %define rel 1 |
65b73f48 | 8 | Summary: H264 encoder library |
23647862 | 9 | Summary(pl.UTF-8): Biblioteka kodująca H264 |
65b73f48 | 10 | Name: libx264 |
bb560be3 | 11 | Version: 0.1.3 |
4663db6e | 12 | Release: 1.%{snap}_%{snaph}.%{rel} |
76f3f357 | 13 | License: GPL v2+ |
65b73f48 | 14 | Group: Libraries |
deef52dc | 15 | # still no releases, use snapshots |
aedfa898 | 16 | Source0: ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-%{snap}-%{snaph}.tar.bz2 |
748e5138 | 17 | # Source0-md5: a71261477a692089b462a8fa387ba56b |
2741dce2 | 18 | Patch0: %{name}-alpha.patch |
deef52dc | 19 | Patch1: altivec-no-vand.patch |
d6b08ec3 | 20 | Patch2: %{name}-gpac.patch |
f33b600a | 21 | URL: http://www.videolan.org/developers/x264.html |
bad36153 KK |
22 | BuildRequires: pkgconfig |
23 | %ifarch %{ix86} %{x8664} | |
f33b600a | 24 | BuildRequires: yasm >= 0.6.0 |
aedfa898 | 25 | %endif |
deef52dc JB |
26 | %if %{without bootstrap} |
27 | # which version exactly??? | |
28 | # for full x264 CLI utility functionality it wants: | |
29 | # libswscale >= 0.9.0 (in pkgconfig file) | |
30 | # libav{format,codec,util} from ffmpeg >= r21854 | |
8723c613 | 31 | BuildRequires: ffmpeg-devel >= 0.7.1 |
848da209 | 32 | BuildRequires: ffmpegsource-devel >= 2.16 |
deef52dc | 33 | # gpac >= 2007-06-21 |
199c0c26 | 34 | BuildRequires: gpac-devel >= 0.5.0-3 |
deef52dc | 35 | %endif |
65b73f48 JB |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
7cf55bee PS |
38 | # encoder/macroblock.c breaks strict-aliasing rules |
39 | %define specflags -fno-strict-aliasing | |
40 | ||
65b73f48 JB |
41 | %description |
42 | libx264 library for encoding H264 video format. | |
43 | ||
3d6bd83a | 44 | %description -l pl.UTF-8 |
65b73f48 JB |
45 | Biblioteka libx264 do kodowania w formacie obrazu H264. |
46 | ||
47 | %package devel | |
48 | Summary: Header files for x264 library | |
23647862 | 49 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki x264 |
65b73f48 JB |
50 | Group: Development/Libraries |
51 | Requires: %{name} = %{version}-%{release} | |
52 | ||
53 | %description devel | |
54 | Header files for x264 library. | |
55 | ||
3d6bd83a JR |
56 | %description devel -l pl.UTF-8 |
57 | Pliki nagłówkowe biblioteki x264. | |
65b73f48 JB |
58 | |
59 | %package static | |
60 | Summary: Static x264 library | |
23647862 | 61 | Summary(pl.UTF-8): Statyczna biblioteka x264 |
65b73f48 JB |
62 | Group: Development/Libraries |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | Static x264 library. | |
67 | ||
3d6bd83a | 68 | %description static -l pl.UTF-8 |
65b73f48 JB |
69 | Statyczna biblioteka x264. |
70 | ||
deef52dc JB |
71 | %package -n x264 |
72 | Summary: x264 CLI decoder | |
73 | Summary(pl.UTF-8): Dekoder x264 działający z linii poleceń | |
74 | Group: Applications/Multimedia | |
75 | Requires: %{name} = %{version}-%{release} | |
c6f8df1a JB |
76 | %if %{without bootstrap} |
77 | Requires: gpac >= 0.5.0-3 | |
78 | %endif | |
deef52dc JB |
79 | |
80 | %description -n x264 | |
81 | x264 CLI decoder. | |
82 | ||
83 | %description -n x264 -l pl.UTF-8 | |
84 | Dekoder x264 działający z linii poleceń. | |
85 | ||
65b73f48 | 86 | %prep |
aedfa898 | 87 | %setup -q -n x264-snapshot-%{snap}-%{snaph} |
2741dce2 | 88 | %patch0 -p1 |
deef52dc | 89 | %if "%{pld_release}" == "ac" |
3b7e662c | 90 | %patch1 -p1 |
deef52dc | 91 | %endif |
d6b08ec3 | 92 | %patch2 -p1 |
65b73f48 JB |
93 | |
94 | %build | |
704304fd | 95 | CC="%{__cc}" \ |
7cf55bee | 96 | ./configure \ |
219e4f34 PS |
97 | --prefix=%{_prefix} \ |
98 | --exec-prefix=%{_prefix} \ | |
99 | --bindir=%{_bindir} \ | |
100 | --includedir=%{_includedir} \ | |
101 | --libdir=%{_libdir} \ | |
7cf55bee | 102 | --extra-cflags="%{rpmcflags}" \ |
bad36153 | 103 | --enable-pic \ |
c8829b2a JB |
104 | --enable-shared \ |
105 | --enable-static | |
7cf55bee | 106 | |
65b73f48 JB |
107 | %{__make} |
108 | ||
109 | %install | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %{__make} install \ | |
113 | DESTDIR=$RPM_BUILD_ROOT | |
114 | ||
115 | %clean | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
118 | %post -p /sbin/ldconfig | |
119 | %postun -p /sbin/ldconfig | |
120 | ||
121 | %files | |
122 | %defattr(644,root,root,755) | |
247a0e4f | 123 | %doc AUTHORS |
748e5138 | 124 | %attr(755,root,root) %{_libdir}/libx264.so.142 |
65b73f48 JB |
125 | |
126 | %files devel | |
127 | %defattr(644,root,root,755) | |
128 | %attr(755,root,root) %{_libdir}/libx264.so | |
65b73f48 | 129 | %{_includedir}/x264.h |
ac54585f | 130 | %{_includedir}/x264_config.h |
247a0e4f | 131 | %{_pkgconfigdir}/x264.pc |
65b73f48 JB |
132 | |
133 | %files static | |
134 | %defattr(644,root,root,755) | |
135 | %{_libdir}/libx264.a | |
deef52dc JB |
136 | |
137 | %files -n x264 | |
138 | %defattr(644,root,root,755) | |
139 | %attr(755,root,root) %{_bindir}/x264 |