[packages/libpagespeed] new, version 1.12.16.0
glen
glen at pld-linux.org
Thu Mar 7 23:08:50 CET 2013
commit 8ccf6322311fdaeb1e2d3a5551ea247eacbf9f1d
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Mar 8 00:05:21 2013 +0200
new, version 1.12.16.0
build binaries, for now
gclient.conf | 10 ++++++
get-source.sh | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
libpagespeed.spec | 81 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 191 insertions(+)
---
diff --git a/libpagespeed.spec b/libpagespeed.spec
new file mode 100644
index 0000000..6eab35c
--- /dev/null
+++ b/libpagespeed.spec
@@ -0,0 +1,81 @@
+# TODO
+# - https://developers.google.com/speed/pagespeed/psol
+# - build using system libs:
+# - gflags
+# - giflib
+# - gtest
+# - icu
+# - libharu
+# - libjpeg
+# - libpng
+# - libwebp
+# - optipng
+# - protobuf
+# - zlib
+# . ...
+Summary: Page Speed native libraries
+Name: libpagespeed
+Version: 1.12.16.0
+Release: 0.1
+License: Apache v2.0
+Group: Libraries
+Source0: %{name}-%{version}.tar.xz
+# Source0-md5: 59922b57b304392a9364bb659ffc7d2c
+Source1: get-source.sh
+Source2: gclient.conf
+URL: https://code.google.com/p/page-speed/
+BuildRequires: libstdc++-devel
+BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The Page Speed library, a reusable C++ library that provides the core
+Page Speed rule logic.
+
+%prep
+%setup -q
+
+%build
+# re-gen makefiles
+CC="%{__cc}" \
+CXX="%{__cxx}" \
+%{__python} build/gyp_chromium \
+ --format=make \
+ --depth=. \
+ build/all.gyp \
+ %{nil}
+
+%{__make} \
+ BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
+ %{?with_verbose:V=1} \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
+ CC.host="%{__cc}" \
+ CXX.host="%{__cxx}" \
+ LINK.host="%{__cxx}" \
+ CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+ CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
+ %{nil}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir}}
+
+cd out/%{!?debug:Release}%{?debug:Debug}
+
+for a in *_bin; do
+ install -p $a $RPM_BUILD_ROOT%{_bindir}/${a%_bin}
+done
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/minify_css
+%attr(755,root,root) %{_bindir}/minify_html
+%attr(755,root,root) %{_bindir}/minify_js
+%attr(755,root,root) %{_bindir}/optimize_image
+%attr(755,root,root) %{_bindir}/pagespeed
diff --git a/gclient.conf b/gclient.conf
new file mode 100644
index 0000000..1d18405
--- /dev/null
+++ b/gclient.conf
@@ -0,0 +1,10 @@
+solutions = [
+ { "name" : "src",
+ "url" : "http://page-speed.googlecode.com/svn/lib/trunk/src",
+ "deps_file" : "DEPS",
+ "managed" : True,
+ "custom_deps" : {
+ },
+ "safesync_url": "",
+ },
+]
diff --git a/get-source.sh b/get-source.sh
new file mode 100755
index 0000000..722a173
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,100 @@
+#!/bin/sh
+# Usage:
+# ./get-source.sh
+# Author: Elan Ruusamäe <glen at pld-linux.org>
+#
+# https://code.google.com/p/page-speed/wiki/HowToBuildNativeLibraries
+
+package=libpagespeed
+baseurl=http://page-speed.googlecode.com/svn/lib
+# leave empty to use latest tag, or "trunk" for trunk
+version=
+spec=$package.spec
+force=0
+
+# abort on errors
+set -e
+# work in package dir
+dir=$(dirname "$0")
+cd "$dir"
+
+if [[ "$1" = *force ]]; then
+ force=1
+ shift
+fi
+
+if [ "$1" ]; then
+ version=$1
+fi
+
+if [ -z "$version" ]; then
+ echo "Looking for latest version..."
+ version=$(svn ls $baseurl/tags/ | sort -V | tail -n1)
+ version=${version%/}
+ version=${version#lib-}
+
+ if [ -z "$version" ]; then
+ echo >&2 "Couldn't detect version from svn"
+ exit 1
+ fi
+fi
+
+if [ "$version" = "trunk" ]; then
+ echo "Using trunk"
+ svnurl=$baseurl/trunk/src
+ version=$(date +%Y%m%d)
+else
+ echo "Version: $version"
+ svnurl=$baseurl/tags/lib-$version/src
+fi
+
+release_dir=$package-$version
+tarball=$release_dir.tar.xz
+
+if [ -f $tarball -a $force != 1 ]; then
+ echo "Tarball $tarball already exists"
+ exit 0
+fi
+
+# gclient needs python 2.6
+if python -c "import sys; sys.exit(sys.version[:3] > '2.6')"; then
+ echo >&2 "Need python >= 2.6 for gclient"
+ exit 1
+fi
+
+# http://www.chromium.org/developers/how-tos/install-depot-tools
+test -d depot_tools || {
+ # could also checkout:
+ # svn co http://src.chromium.org/svn/trunk/tools/depot_tools
+ wget -c https://src.chromium.org/svn/trunk/tools/depot_tools.zip
+ unzip -qq depot_tools.zip
+ chmod a+x depot_tools/gclient depot_tools/update_depot_tools
+}
+
+topdir=${PWD:-($pwd)}
+gclient=$topdir/gclient.conf
+install -d $package
+cd $package
+
+if [ ! -f $gclient ]; then
+ # create initial config that can be later modified
+ ../depot_tools/gclient config $svnurl --gclientfile=$gclient
+fi
+
+cp -p $gclient .gclient
+
+# emulate gclient config, preserving our deps
+sed -i -re '/"url"/ s,"http[^"]+","'$svnurl'",' .gclient
+
+../depot_tools/gclient sync --nohooks -v
+
+# Populate the LASTCHANGE file template as we will not include VCS info in tarball
+(cd src && svnversion > LASTCHANGE.in)
+cd ..
+
+cp -al $package/src $release_dir
+XZ_OPT=-e9 tar -caf $tarball --exclude-vcs $release_dir
+rm -rf $release_dir
+
+../md5 $spec
+../dropin $tarball &
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libpagespeed.git/commitdiff/8ccf6322311fdaeb1e2d3a5551ea247eacbf9f1d
More information about the pld-cvs-commit
mailing list