File ungoogled-chromium.spec of Package ungoogled-chromium
#
# spec file for package ungoogled-chromium-portable
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: ungoogled-chromium
Version: 125.0.6422.141
Release: 1%{?dist}
Summary: Ungoogled Chromium Browser
License: BSD-3-Clause
URL: https://github.com/ungoogled-software/ungoogled-chromium
Source0: https://github.com/ungoogled-software/ungoogled-chromium-portablelinux/releases/download/125.0.6422.141-1/ungoogled-chromium_125.0.6422.141-1_linux.tar.xz
Source1: LICENSE
Source2: README.md
Source3: ungoogled-chromium.svg
BuildRequires: hicolor-icon-theme
BuildRequires: desktop-file-utils
BuildRequires: rsvg-convert
BuildRequires: fdupes
%description
Ungoogled Chromium is a Google Chromium variant for removing Google integration and enhancing privacy, control, and transparency. This package provides a portable version of the browser.
%prep
%setup -q -n %{name}_%{version}-1_linux
%check
%build
%install
mkdir -p %{buildroot}%{_prefix}/lib/ungoogled-chromium
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/applications
cp %{SOURCE1} %{_builddir}/%{name}_%{version}-1_linux
cp %{SOURCE2} %{_builddir}/%{name}_%{version}-1_linux
cp -r ./* %{buildroot}%{_prefix}/lib/ungoogled-chromium
ln -s %{_prefix}/lib/ungoogled-chromium/chrome %{buildroot}%{_bindir}/ungoogled-chromium
install -d %{buildroot}%{_datadir}/pixmaps
install -m 0644 -p product_logo_48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -m 0644 -p %{SOURCE3} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
for size in 16 22 24 32 48 64 128 256; do
dest=%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps
install -d ${dest}
rsvg-convert -w ${size} -h ${size} %{SOURCE3} -o ${dest}/%{name}.png
chmod 0644 ${dest}/%{name}.png
touch -r %{SOURCE3} ${dest}/%{name}.png
done
cat > %{buildroot}%{_datadir}/applications/ungoogled-chromium.desktop <<EOF
[Desktop Entry]
Version=1.0
Name=Ungoogled Chromium
Comment=Browse the web
Exec=%{_bindir}/ungoogled-chromium %U
Terminal=false
Icon=ungoogled-chromium
Type=Application
Categories=Network;WebBrowser;
StartupWMClass=chromium-browser
EOF
%{__strip} %{buildroot}/usr/lib/ungoogled-chromium/chrome
%{__strip} %{buildroot}/usr/lib/ungoogled-chromium/chrome_crashpad_handler
%{__strip} %{buildroot}/usr/lib/ungoogled-chromium/chrome_sandbox
%{__strip} %{buildroot}/usr/lib/ungoogled-chromium/chromedriver
%{__strip} %{buildroot}/usr/lib/ungoogled-chromium/libEGL.so
%{__strip} %{buildroot}/usr/lib/ungoogled-chromium/libGLESv2.so
%{__strip} %{buildroot}/usr/lib/ungoogled-chromium/libvk_swiftshader.so
%{__strip} %{buildroot}/usr/lib/ungoogled-chromium/libvulkan.so.1
%fdupes %{buildroot}/%{_prefix}/share
%fdupes %{buildroot}/%{_prefix}/lib/ungoogled-chromium/locales/
%files
%license LICENSE
%doc README.md
%{_prefix}/lib/%{name}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/16x16
%dir %{_datadir}/icons/hicolor/16x16/apps
%dir %{_datadir}/icons/hicolor/22x22
%dir %{_datadir}/icons/hicolor/22x22/apps
%dir %{_datadir}/icons/hicolor/24x24
%dir %{_datadir}/icons/hicolor/24x24/apps
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%dir %{_datadir}/icons/hicolor/48x48
%dir %{_datadir}/icons/hicolor/48x48/apps
%dir %{_datadir}/icons/hicolor/64x64
%dir %{_datadir}/icons/hicolor/64x64/apps
%dir %{_datadir}/icons/hicolor/128x128
%dir %{_datadir}/icons/hicolor/128x128/apps
%dir %{_datadir}/icons/hicolor/256x256
%dir %{_datadir}/icons/hicolor/256x256/apps
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/pixmaps/%{name}.png
%changelog
* Tue May 29 2024 Your Name <youremail@example.com> - 125.0.6422.141-1
- Initial package