1 # Contributor: Artyom Smirnov <smirnoffjr@gmail.com>
2 # Contributor: tuxce <tuxce.net@gmail.com>
4 pkgname=google-gears-svn
7 pkgdesc="Open source project that enables more powerful web applications, by adding new features to web browsers."
9 url="http://code.google.com/p/gears/"
11 depends=( 'xulrunner>=1.9.2' 'xulrunner<=1.9.3' 'firefox>=3.6' 'gcc-libs')
12 makedepends=('subversion' 'zip')
13 source=('arch64-r3423.patch')
14 md5sums=('9ff5ee95ca241ff20ba5126dff0ce521')
16 _svntrunk=http://gears.googlecode.com/svn/trunk
22 if [ -d ${_svnmod}/.svn ]; then
24 # Too boring copy +600MB just cleanup it by hand :)
25 msg "Cleanuping source tree from previous building..."
27 msg "Updating source tree..."
30 svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod}
32 msg "SVN checkout done or server timeout"
34 cd "${srcdir}/${_svnmod}"
36 patch -p0 < ${srcdir}/arch64-r3423.patch || return 1
39 msg "Starting make..."
40 make BROWSER=FF36 || return 1
41 make installers BROWSER=FF36 || return 1
43 _ext_guid=`sed -n '60 s|.*<em:id>\({.*}\)</em:id>.*|\1|p'\
44 "${srcdir}/${_svnmod}/gears/base/firefox/install.rdf.m4"`
45 [ $CARCH = "i686" ] && _CARCH=i386 || _CARCH=x86_64
46 _ext_ver=`sed -n 's|.*PRODUCT_VERSION_STRING_ASCII.*"\(.*\)".*|\1|p'\
47 "${srcdir}/${_svnmod}/gears/bin-opt/linux-${_CARCH}/common/genfiles/product_constants.h"`
48 _ext_dir="${pkgdir}/usr/lib/firefox-3.6/extensions/${_ext_guid}"
49 install -d ${_ext_dir}
51 #msg "Extension version ${_ext_ver}"
52 #msg "Extension will be installed with GUID ${_ext_guid}"
53 [ $CARCH = "x86_64" ] &&
54 bsdtar -xf "${srcdir}/${_svnmod}/gears/bin-opt/installers/gears-linux-${CARCH}-opt-${_ext_ver}.xpi"\
56 bsdtar -xf "${srcdir}/${_svnmod}/gears/bin-opt/installers/gears-linux-opt-${_ext_ver}.xpi"\
60 find "${pkgdir}" -type d -exec chmod 755 -- '{}' \;
61 find "${pkgdir}" -type f -exec chmod 644 -- '{}' \;
62 find "${pkgdir}" -name '*.so*' -exec chmod 755 -- '{}' \;
63 find "${pkgdir}" -name '.svn'|xargs rm -rf
66 # vim:set ts=2 sw=2 et: