- binary build, based on chromium-browser.spec
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 22 Sep 2009 23:20:44 +0000 (23:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    chromium-browser-bin.spec -> 1.1
    chromium-browser.desktop -> 1.1
    find-lang.sh -> 1.1

chromium-browser-bin.spec [new file with mode: 0644]
chromium-browser.desktop [new file with mode: 0644]
find-lang.sh [new file with mode: 0755]

diff --git a/chromium-browser-bin.spec b/chromium-browser-bin.spec
new file mode 100644 (file)
index 0000000..a17a439
--- /dev/null
@@ -0,0 +1,92 @@
+%define                svnver  26865
+%define                rel             0.1
+Summary:       A WebKit powered web browser
+Name:          chromium-browser-bin
+Version:       4.0.212.0
+Release:       0.%{svnver}.%{rel}
+License:       BSD, LGPL v2+ (ffmpeg)
+Group:         X11/Applications/Networking
+Source0:       http://build.chromium.org/buildbot/snapshots/chromium-rel-linux-64/%{svnver}/chrome-linux.zip
+# NoSource0-md5:       e071fd30aa2de0eec10bcf5e16ca917b
+NoSource:      0
+Source2:       chromium-browser.sh
+Source3:       chromium-browser.desktop
+Source4:       find-lang.sh
+Requires:      browser-plugins >= 2.0
+Requires:      nspr
+Requires:      nss
+Provides:      wwwbrowser
+ExclusiveArch: %{x8664}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                _enable_debug_packages  0
+%define                find_lang       sh find-lang.sh %{buildroot}
+
+%description
+Chromium is an open-source web browser, powered by WebKit.
+
+%prep
+%setup -qc
+%{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
+
+mv chrome-linux/product_logo_48.png .
+mv chrome-linux/xdg-settings .
+mv chrome-linux/chromium-browser.1 .
+mv chrome-linux/chrome-wrapper .
+mv chrome-linux/{chrome,chromium-browser}
+chmod a+x chrome-linux/lib*.so*
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
+
+install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/chromium-browser
+%{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/chromium-browser
+cp -a chrome-linux/* $RPM_BUILD_ROOT%{_libdir}/%{name}
+cp -a chromium-browser.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/chromium-browser.png
+cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
+
+# nspr symlinks
+for a in libnspr4.so libplc4.so libplds4.so; do
+       ln -s %{_libdir}/$a $RPM_BUILD_ROOT%{_libdir}/%{name}/$a.0d
+done
+# nss symlinks
+for a in libnss3.so libnssutil3.so libsmime3.so libssl3.so; do
+       ln -s %{_libdir}/$a $RPM_BUILD_ROOT%{_libdir}/%{name}/$a.1d
+done
+
+# find locales
+%find_lang %{name}.lang
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/chromium-browser
+%{_mandir}/man1/chromium-browser.1*
+%{_pixmapsdir}/chromium-browser.png
+%{_desktopdir}/*.desktop
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/chrome.pak
+%dir %{_libdir}/%{name}/locales
+%{_libdir}/%{name}/resources
+%{_libdir}/%{name}/themes
+%attr(755,root,root) %{_libdir}/%{name}/chromium-browser
+# These unique permissions are intentional and necessary for the sandboxing
+%attr(4555,root,root) %{_libdir}/%{name}/chrome_sandbox
+
+# ffmpeg libs
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libavcodec.so.52
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libavformat.so.52
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libavutil.so.50
+
+# nspr/nss symlinks
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libnspr4.so.0d
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libplc4.so.0d
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libplds4.so.0d
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libnss3.so.1d
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libnssutil3.so.1d
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libsmime3.so.1d
+%attr(755,root,root) %{_libdir}/chromium-browser-bin/libssl3.so.1d
diff --git a/chromium-browser.desktop b/chromium-browser.desktop
new file mode 100644 (file)
index 0000000..fa80ef1
--- /dev/null
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Chromium
+Exec=chromium-browser %U
+Icon=chromium-browser
+Type=Application
+Terminal=false
+Categories=Application;Network;WebBrowser;
+MimeType=text/html;text/xml;application/xhtml_xml;
diff --git a/find-lang.sh b/find-lang.sh
new file mode 100755 (executable)
index 0000000..d24727a
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+PROG=${0##*/}
+if [ $# = 2 ]; then
+       # for using same syntax as rpm own find-lang
+       RPM_BUILD_ROOT=$1
+       shift
+fi
+dir=$RPM_BUILD_ROOT@localedir@/locales
+langfile=$1
+tmp=$(mktemp) || exit 1
+rc=0
+
+find $dir -name '*.pak' > $tmp
+
+echo '%defattr(644,root,root,755)' > $langfile
+while read file; do
+       lang=${file##*/}
+       lang=${lang%.pak}
+       case "$lang" in
+       zh-TW)
+               lang=zh_TW
+       ;;
+       zh-CN)
+               lang=zh_CN
+       ;;
+       en-US|en-GB)
+               lang=en
+       ;;
+       pt-BR)
+               lang=pt_BR
+       ;;
+       pt-PT)
+               lang=pt
+       ;;
+       es-419)
+               lang=es
+       ;;
+       *-*)
+               echo >&2 "ERROR: Need mapping for $lang!"
+               rc=1
+       ;;
+       esac
+       echo "%lang($lang) ${file#$RPM_BUILD_ROOT}" >> $langfile
+done < $tmp
+
+if [ "$(egrep -v '(^%defattr|^$)' $langfile | wc -l)" -le 0 ]; then
+       echo >&2 "$PROG: Error: international files not found!"
+       rc=1
+fi
+
+rm -f $tmp
+exit $rc
This page took 0.032864 seconds and 4 git commands to generate.