Projects
Extra
vivaldi
vivaldi.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File vivaldi.spec of Package vivaldi (Revision 14)
Currently displaying revision
14
,
Show latest
# # spec file for package vivaldi # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so$ %global __requires_exclude ^.*(ffmpeg|widevinecdm).*$ %if 0%{?suse_version} == 1320 %{!?is_opensuse:%global is_opensuse 1} %endif %if 0%{?packman_bs} %define pepper_flash_lib %(rpm -ql chromium-pepper-flash | grep "flashplayer.so") %define pepper_flash_ver %(grep -ao -m1 "LNX [,0-9]\+" %{pepper_flash_lib} | sed 's/[^0-9]\+//;s/,/./g') %if 0%{?is_opensuse} %define codecs_dir %(rpm -ql chromium-ffmpeg | grep -m1 "\.so" | xargs dirname) %define codecs_ver %(rpm -q --qf '%{VERSION}' chromium-ffmpeg | awk 'BEGIN{FS="."}{print $1 * 1000000 + $2 * 1000 + $3}') %endif %endif Name: vivaldi Version: 1.4.589.41 Release: 0 Summary: Powerful and Personal Web Browser License: SUSE-Freeware Group: Productivity/Networking/Web/Browsers Url: https://vivaldi.com/ Source0: https://downloads.vivaldi.com/stable/%{name}-stable-%{version}-1.i386.rpm Source1: https://downloads.vivaldi.com/stable/%{name}-stable-%{version}-1.x86_64.rpm Source2: vivaldi.config.in # PATCH-FIX-OPENSUSE run.patch avvissu@yandex.by -- Change the startup script Patch0: vivaldi-1.4.589.41_run.patch BuildRequires: build BuildRequires: chrpath BuildRequires: fdupes BuildRequires: hicolor-icon-theme BuildRequires: update-desktop-files Recommends: chromium-pepper-flash Recommends: chromium-plugin-widevinecdm Suggests: chromium-ffmpeg Provides: vivaldi-stable = %{version} Obsoletes: vivaldi-stable < %{version} ExclusiveArch: %ix86 x86_64 %if 0%{?packman_bs} BuildRequires: chromium-pepper-flash %if 0%{?is_opensuse} BuildRequires: chromium-ffmpeg %ifarch x86_64 BuildRequires: chromium-plugin-widevinecdm %endif %endif %endif %ifarch %ix86 # Not enough memory for rpmlint BuildRequires: -rpmlint-Factory %endif %description Vivaldi browser is made with power users in mind by people who love the Web. %prep %setup -q -c -T %ifarch %ix86 unrpm -q %{SOURCE0} %else unrpm -q %{SOURCE1} %endif %patch0 -p1 cp %{SOURCE2} . for file in opt/%{name}/%{name} %{name}.config.in; do sed -e 's|@LIBDIR@|%{_libdir}|g' \ -e 's|@VIVALDI_CONFIG@|%{_sysconfdir}/default/%{name}|g' \ -e 's|@VIVALDI_FLAGS@|--disable-setuid-sandbox|g' \ -e 's|@VIVALDI_SANDBOX_FILE@|%{name}-sandbox|g' \ %{?codecs_dir:-e '/CODECS_DIR\=/s|\(\"\).*\(\"\)|\1%{codecs_dir}\2|'} \ %{?codecs_ver:-e '/CODECS_VERSION\=/s|\(\"\).*\(\"\)|\1%{codecs_ver}\2|'} \ %{?pepper_flash_lib:-e '/PEPPER_PATH\=/s|\(\"\).*\(\"\)|\1%{pepper_flash_lib}\2|'} \ -i $file done find . -name \*.desktop | while read file; do dir=$(dirname $file) sed -i '/Exec\|Binaries/s/\(=\).*[a-z]/\1%{name}/' $file echo $file | grep -w %{name}.desktop || mv $file $dir/%{name}.desktop done %build # Nothing to build. %install install -d \ %{buildroot}%{_bindir} \ %{buildroot}%{_libdir} \ %{buildroot}%{_datadir} cp -a usr %{buildroot} cp -a {opt/,%{buildroot}%{_libdir}/}%{name} install -Dm0644 %{name}.config.in %{buildroot}%{_sysconfdir}/default/%{name} pushd %{buildroot} # Create a new symlink find .%{_bindir} -type l -delete -print if ! ls .%{_bindir}/%{name} &> /dev/null; then ln -s %{_libdir}/%{name}/%{name} .%{_bindir}/%{name} fi # Remove the setuid on sandbox if [ -u .%{_libdir}/%{name}/%{name}-sandbox ]; then chmod u-s .%{_libdir}/%{name}/%{name}-sandbox fi # Use system libraries find . -type l -name \*widevinecdm*so -delete -print find . | xargs file | grep ELF | grep object | cut -f 1 -d : | \ xargs chrpath --delete &> /dev/null rpm -ql chromium-plugin-widevinecdm | grep "\.so" | while read so; do link=$(basename $so) ln -sf $so .%{_libdir}/%{name}/$link done # Install icon files pushd .%{_libdir}/%{name} find . -maxdepth 1 -type f -name \*.png | while read icon; do size=$(echo $icon | sed 's/[^0-9]//g') install -Dm0644 \ $icon ../../share/icons/hicolor/${size}x${size}/apps/%{name}.png done popd popd # Get a list of files filelist=$PWD/%{name}.lst pushd %{buildroot} find ./ | while read list; do file=$(echo $list | sed 's/[^/]//') dir=$(dirname $file) if echo $dir | grep "%{name}\|xfce4"; then grep -wqs "\%dir\ $dir" $filelist || echo "%dir $dir" >> $filelist fi [ -d "$list" ] || echo $file >> $filelist done popd # Create COPYING strings \ $(find . -type f -name "en-US.pak") \ | sed -n '/^.h.*Vivaldi/,/.\/body./p' \ | sed 's/.\/ol.$/\n/;s/<[^>]*>//g' \ | fold -s > COPYING %suse_update_desktop_file %{name} %fdupes %{buildroot}%{_libdir} %pre if [ "$1" -eq 1 ] ; then grep ^flags /proc/cpuinfo | grep -qs sse2 if [ $? -ne 0 ]; then echo "This computer cannot run %{name} because its hardware is no longer \ supported." 1>&2; exit 1 fi fi %post %icon_theme_cache_post %desktop_database_post %postun %icon_theme_cache_postun %desktop_database_postun %files -f %{name}.lst %defattr(-,root,root,0755) %doc COPYING %attr(755,root,root) %{_libdir}/%{name}/%{name}-sandbox %config %{_sysconfdir}/default/%{name} %changelog
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.