diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..79e3465 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/YandexBrowser.rpm diff --git a/.yandex-browser-corporate.metadata b/.yandex-browser-corporate.metadata new file mode 100644 index 0000000..5a714f0 --- /dev/null +++ b/.yandex-browser-corporate.metadata @@ -0,0 +1 @@ +d1da3d66f3376b6a6add9f0a65aa16438ba0004d SOURCES/YandexBrowser.rpm diff --git a/README.md b/README.md deleted file mode 100644 index 99ef6b8..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# yandex-browser-corporate - -Yandex Browser Corporate \ No newline at end of file diff --git a/SOURCES/yandex-browser-corporate.rpmlintrc b/SOURCES/yandex-browser-corporate.rpmlintrc new file mode 100644 index 0000000..1217083 --- /dev/null +++ b/SOURCES/yandex-browser-corporate.rpmlintrc @@ -0,0 +1 @@ +addFilter(r'dir-or-file-in-opt') diff --git a/SPECS/yandex-browser-corporate.spec b/SPECS/yandex-browser-corporate.spec new file mode 100644 index 0000000..31674d8 --- /dev/null +++ b/SPECS/yandex-browser-corporate.spec @@ -0,0 +1,114 @@ +#%%global __requires_exclude_from ^/opt/yandex/browser/libqt.*so$ +%global yandex_browser_path /opt/yandex/browser +%global _build_id_links none + +Summary: Yandex Browser Corporate +Name: yandex-browser-corporate +Version: 24.6.1.858 +Release: 1%{?dist} + +License: Multiple, see http://browser.yandex.ru/ +Url: http://browser.yandex.ru/ +Source0: YandexBrowser.rpm +Source1: yandex-browser-corporate.rpmlintrc + +ExclusiveArch: %{x86_64} + +Requires: ca-certificates +Requires: wget +Requires: xdg-utils +Requires: chromium-ffmpeg%{_isa} + +Conflicts: yandex-browser-stable +Conflicts: yandex-browser-beta + +%description +The web browser from Yandex +Yandex Browser is a browser that combines a minimal design with sophisticated +technology to make the web faster, safer, and easier. + +%package qt5-ui +Summary: Qt5 UI built from Yandex Browser +Requires: %{name}%{_isa} = %{version}-%{release} + +%description qt5-ui +Qt5 UI for Yandex Browser. + + +%package qt6-ui +Summary: Qt6 UI built from Yandex Browser +Requires: %{name}%{_isa} = %{version}-%{release} + +%description qt6-ui +Qt6 UI for Yandex Browser. + +%prep + +%build + +%install +pushd %{buildroot} +cat %{SOURCE0} | rpm2archive - | tar -xvz +popd + +# create yandex corporate icons +for png in 16 24 32 48 64 128 256 512; do +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${png}x${png}/apps +install -m644 %{buildroot}%{yandex_browser_path}/product_logo_${png}.png \ + %{buildroot}%{_datadir}/icons/hicolor/${png}x${png}/apps/%{name}.png +done + +# Hotfix desktop file +sed -i 's@Icon=yandex-browser@Icon=yandex-browser-corporate@g' \ + %{buildroot}%{_datadir}/applications/yandex-browser.desktop +sed -i '/Name=Yandex Browser/aName[ru]=Яндекс Браузер' \ + %{buildroot}%{_datadir}/applications/yandex-browser.desktop + +# link libffmpeg with chromium package +pushd %{buildroot}%{yandex_browser_path}/ +ln -sf ../../../usr/lib64/chromium-browser/libffmpeg.so +popd + +# Fix symlink +rm -f %{buildroot}%{_bindir}/yandex-browser-corporate +ln -sr %{buildroot}%{yandex_browser_path}/yandex-browser \ + %{buildroot}%{_bindir}/yandex-browser-corporate + +# Skip setup of Yandex Browser repo +rm -rf %{buildroot}%{_sysconfdir}/cron.daily + +%post +update-desktop-database &> /dev/null || : +touch --no-create %{_datadir}/icons/hicolor || : + +%postun +update-desktop-database &> /dev/null || : +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor || : + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%files +%config %{_sysconfdir}/xdg/autostart/yandex-browser_user_setup.desktop +%{_bindir}/yandex-browser* +%{_datadir}/appdata/yandex-browser.appdata.xml +%{_datadir}/applications/yandex-browser.desktop +%{_datadir}/gnome-control-center/default-apps/yandex-browser.xml +%{_datadir}/icons/hicolor +%dir /opt/yandex/ +%{yandex_browser_path} +%exclude %{yandex_browser_path}/libqt*_shim.so +%{_mandir}/man1/yandex* + +%files qt5-ui +%{yandex_browser_path}/libqt5_shim.so + +%files qt6-ui +%{yandex_browser_path}/libqt6_shim.so + +%changelog +* Sat Jul 27 2024 Arkady L. Shane - 24.6.1.858-1 +- Repack official Yandex Browser Corporate