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 46)
Currently displaying revision
46
,
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%{?packman_bs} %define pepper_flash_lib %(rpm -ql --whatprovides chromium-pepper-flash | grep 'flashplayer.so') %define ffmpeg_lib %(rpm -ql --whatprovides chromium-ffmpeg-extra | grep 'ffmpeg.so') %endif Name: vivaldi Version: 1.14.1077.60 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 launcher.patch avvissu@yandex.by -- Change the startup script Patch0: vivaldi-1.14.1077.41_launcher.patch BuildRequires: build BuildRequires: build-mkbaselibs BuildRequires: chrpath BuildRequires: fdupes BuildRequires: hicolor-icon-theme BuildRequires: update-desktop-files Recommends: chromium-ffmpeg-extra Recommends: chromium-pepper-flash Recommends: chromium-plugin-widevinecdm Conflicts: vivaldi-stable ExclusiveArch: %ix86 x86_64 %if 0%{?packman_bs} BuildRequires: chromium-ffmpeg-extra BuildRequires: chromium-pepper-flash %endif %ifarch x86_64 BuildRequires: chromium-plugin-widevinecdm %endif # Not enough memory for rpmlint #!BuildIgnore: rpmlint-Factory #!BuildIgnore: rpmlint-mini %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 -p0 cp %{SOURCE2} . FFMPEG_PATH="%{ffmpeg_lib}" PEPPER_PATH="%{pepper_flash_lib}" for file in opt/%{name}/%{name} %{name}.config.in; do sed -e 's|@LIBDIR@|%{_libdir}|g' \ -e 's|@PKG_FFMPEG@|chromium-ffmpeg-extra|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' \ ${FFMPEG_PATH:+-e '/FFMPEG_LIB\=/s|\(\"\).*\(\"\)|\1%{ffmpeg_lib}\2|'} \ ${PEPPER_PATH:+-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 -xqs "\%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
.