]>
Commit | Line | Data |
---|---|---|
83023e43 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with verbose # verbose build (V=1) | |
4 | ||
8ccf6322 ER |
5 | # TODO |
6 | # - https://developers.google.com/speed/pagespeed/psol | |
7 | # - build using system libs: | |
8 | # - gflags | |
9 | # - giflib | |
10 | # - gtest | |
3adda3ff | 11 | # - icu 4.6.1 |
8ccf6322 ER |
12 | # - libharu |
13 | # - libjpeg | |
14 | # - libpng | |
15 | # - libwebp | |
16 | # - optipng | |
17 | # - protobuf | |
18 | # - zlib | |
19 | # . ... | |
20 | Summary: Page Speed native libraries | |
21 | Name: libpagespeed | |
22 | Version: 1.12.16.0 | |
3adda3ff | 23 | Release: 0.3 |
8ccf6322 ER |
24 | License: Apache v2.0 |
25 | Group: Libraries | |
26 | Source0: %{name}-%{version}.tar.xz | |
3adda3ff | 27 | # Source0-md5: 8558c2b583e5858360846299284eb231 |
8ccf6322 ER |
28 | Source1: get-source.sh |
29 | Source2: gclient.conf | |
3adda3ff | 30 | Patch0: system-libs.patch |
8ccf6322 ER |
31 | URL: https://code.google.com/p/page-speed/ |
32 | BuildRequires: libstdc++-devel | |
33 | BuildRequires: rpmbuild(macros) >= 1.268 | |
34 | BuildRequires: tar >= 1:1.22 | |
35 | BuildRequires: xz | |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
37 | ||
38 | %description | |
39 | The Page Speed library, a reusable C++ library that provides the core | |
40 | Page Speed rule logic. | |
41 | ||
42 | %prep | |
43 | %setup -q | |
3adda3ff | 44 | %patch0 -p1 |
8ccf6322 ER |
45 | |
46 | %build | |
6e94d5b9 ER |
47 | test %{_specdir}/%{name}.spec -nt Makefile && %{__rm} -f Makefile |
48 | test -e Makefile || \ | |
8ccf6322 ER |
49 | CC="%{__cc}" \ |
50 | CXX="%{__cxx}" \ | |
51 | %{__python} build/gyp_chromium \ | |
52 | --format=make \ | |
53 | --depth=. \ | |
54 | build/all.gyp \ | |
83023e43 ER |
55 | -Duse_openssl=1 \ |
56 | -Duse_system_icu=0 \ | |
3adda3ff ER |
57 | -Duse_system_libjpeg=0 \ |
58 | -Duse_system_libpng=0 \ | |
83023e43 | 59 | -Duse_system_ssl=1 \ |
3adda3ff | 60 | -Duse_system_zlib=0 \ |
8ccf6322 ER |
61 | %{nil} |
62 | ||
b9ddb6a1 | 63 | %{__make} -r \ |
8ccf6322 ER |
64 | BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \ |
65 | %{?with_verbose:V=1} \ | |
66 | CC="%{__cc}" \ | |
67 | CXX="%{__cxx}" \ | |
68 | CC.host="%{__cc}" \ | |
69 | CXX.host="%{__cxx}" \ | |
70 | LINK.host="%{__cxx}" \ | |
71 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
72 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
73 | %{nil} | |
74 | ||
75 | %install | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir}} | |
78 | ||
79 | cd out/%{!?debug:Release}%{?debug:Debug} | |
80 | ||
81 | for a in *_bin; do | |
82 | install -p $a $RPM_BUILD_ROOT%{_bindir}/${a%_bin} | |
83 | done | |
84 | ||
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %attr(755,root,root) %{_bindir}/minify_css | |
91 | %attr(755,root,root) %{_bindir}/minify_html | |
92 | %attr(755,root,root) %{_bindir}/minify_js | |
93 | %attr(755,root,root) %{_bindir}/optimize_image | |
94 | %attr(755,root,root) %{_bindir}/pagespeed |