]>
Commit | Line | Data |
---|---|---|
deef52dc JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with bootstrap | |
4 | # | |
848da209 | 5 | %define snap 20111212 |
1eadea1c | 6 | %define snaph 2245 |
e60005d8 | 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 |
848da209 | 17 | # Source0-md5: 586e5a6e49bef5b026702c327b1edda2 |
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 |
d6b08ec3 JB |
34 | BuildRequires: gpac-devel >= 0.4.5-2 |
35 | Requires: gpac >= 0.4.5-2 | |
deef52dc | 36 | %endif |
65b73f48 JB |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
7cf55bee PS |
39 | # encoder/macroblock.c breaks strict-aliasing rules |
40 | %define specflags -fno-strict-aliasing | |
41 | ||
65b73f48 JB |
42 | %description |
43 | libx264 library for encoding H264 video format. | |
44 | ||
3d6bd83a | 45 | %description -l pl.UTF-8 |
65b73f48 JB |
46 | Biblioteka libx264 do kodowania w formacie obrazu H264. |
47 | ||
48 | %package devel | |
49 | Summary: Header files for x264 library | |
23647862 | 50 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki x264 |
65b73f48 JB |
51 | Group: Development/Libraries |
52 | Requires: %{name} = %{version}-%{release} | |
53 | ||
54 | %description devel | |
55 | Header files for x264 library. | |
56 | ||
3d6bd83a JR |
57 | %description devel -l pl.UTF-8 |
58 | Pliki nagłówkowe biblioteki x264. | |
65b73f48 JB |
59 | |
60 | %package static | |
61 | Summary: Static x264 library | |
23647862 | 62 | Summary(pl.UTF-8): Statyczna biblioteka x264 |
65b73f48 JB |
63 | Group: Development/Libraries |
64 | Requires: %{name}-devel = %{version}-%{release} | |
65 | ||
66 | %description static | |
67 | Static x264 library. | |
68 | ||
3d6bd83a | 69 | %description static -l pl.UTF-8 |
65b73f48 JB |
70 | Statyczna biblioteka x264. |
71 | ||
deef52dc JB |
72 | %package -n x264 |
73 | Summary: x264 CLI decoder | |
74 | Summary(pl.UTF-8): Dekoder x264 działający z linii poleceń | |
75 | Group: Applications/Multimedia | |
76 | Requires: %{name} = %{version}-%{release} | |
77 | ||
78 | %description -n x264 | |
79 | x264 CLI decoder. | |
80 | ||
81 | %description -n x264 -l pl.UTF-8 | |
82 | Dekoder x264 działający z linii poleceń. | |
83 | ||
65b73f48 | 84 | %prep |
aedfa898 | 85 | %setup -q -n x264-snapshot-%{snap}-%{snaph} |
2741dce2 | 86 | %patch0 -p1 |
deef52dc | 87 | %if "%{pld_release}" == "ac" |
3b7e662c | 88 | %patch1 -p1 |
deef52dc | 89 | %endif |
d6b08ec3 | 90 | %patch2 -p1 |
65b73f48 JB |
91 | |
92 | %build | |
704304fd | 93 | CC="%{__cc}" \ |
7cf55bee | 94 | ./configure \ |
219e4f34 PS |
95 | --prefix=%{_prefix} \ |
96 | --exec-prefix=%{_prefix} \ | |
97 | --bindir=%{_bindir} \ | |
98 | --includedir=%{_includedir} \ | |
99 | --libdir=%{_libdir} \ | |
7cf55bee | 100 | --extra-cflags="%{rpmcflags}" \ |
bad36153 | 101 | --enable-pic \ |
c8829b2a JB |
102 | --enable-shared \ |
103 | --enable-static | |
7cf55bee | 104 | |
65b73f48 JB |
105 | %{__make} |
106 | ||
107 | %install | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %{__make} install \ | |
111 | DESTDIR=$RPM_BUILD_ROOT | |
112 | ||
113 | %clean | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %post -p /sbin/ldconfig | |
117 | %postun -p /sbin/ldconfig | |
118 | ||
119 | %files | |
120 | %defattr(644,root,root,755) | |
247a0e4f | 121 | %doc AUTHORS |
848da209 | 122 | %attr(755,root,root) %{_libdir}/libx264.so.120 |
65b73f48 JB |
123 | |
124 | %files devel | |
125 | %defattr(644,root,root,755) | |
126 | %attr(755,root,root) %{_libdir}/libx264.so | |
65b73f48 | 127 | %{_includedir}/x264.h |
ac54585f | 128 | %{_includedir}/x264_config.h |
247a0e4f | 129 | %{_pkgconfigdir}/x264.pc |
65b73f48 JB |
130 | |
131 | %files static | |
132 | %defattr(644,root,root,755) | |
133 | %{_libdir}/libx264.a | |
deef52dc JB |
134 | |
135 | %files -n x264 | |
136 | %defattr(644,root,root,755) | |
137 | %attr(755,root,root) %{_bindir}/x264 |