]> git.pld-linux.org Git - packages/libpagespeed.git/blame - libpagespeed.spec
allow setting use_system_xxx via gyp flags
[packages/libpagespeed.git] / libpagespeed.spec
CommitLineData
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# . ...
20Summary: Page Speed native libraries
21Name: libpagespeed
22Version: 1.12.16.0
3adda3ff 23Release: 0.3
8ccf6322
ER
24License: Apache v2.0
25Group: Libraries
26Source0: %{name}-%{version}.tar.xz
3adda3ff 27# Source0-md5: 8558c2b583e5858360846299284eb231
8ccf6322
ER
28Source1: get-source.sh
29Source2: gclient.conf
3adda3ff 30Patch0: system-libs.patch
8ccf6322
ER
31URL: https://code.google.com/p/page-speed/
32BuildRequires: libstdc++-devel
33BuildRequires: rpmbuild(macros) >= 1.268
34BuildRequires: tar >= 1:1.22
35BuildRequires: xz
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39The Page Speed library, a reusable C++ library that provides the core
40Page Speed rule logic.
41
42%prep
43%setup -q
3adda3ff 44%patch0 -p1
8ccf6322
ER
45
46%build
6e94d5b9
ER
47test %{_specdir}/%{name}.spec -nt Makefile && %{__rm} -f Makefile
48test -e Makefile || \
8ccf6322
ER
49CC="%{__cc}" \
50CXX="%{__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
76rm -rf $RPM_BUILD_ROOT
77install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir}}
78
79cd out/%{!?debug:Release}%{?debug:Debug}
80
81for a in *_bin; do
82 install -p $a $RPM_BUILD_ROOT%{_bindir}/${a%_bin}
83done
84
85%clean
86rm -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
This page took 0.059916 seconds and 4 git commands to generate.