fix: switchboard-plug-tweaks (#1471)

* fix: switchboard-plug-tweaks

Signed-off-by: madomado <madonuko@outlook.com>

* feat: obsolete old `pantheon-tweaks` package and more fixes

---------

Signed-off-by: madomado <madonuko@outlook.com>
This commit is contained in:
madomado
2024-07-10 23:13:47 +08:00
committed by GitHub
parent 5d384c83c5
commit acc804ebe3
4 changed files with 14 additions and 59 deletions
@@ -1,5 +0,0 @@
project pkg {
rpm {
spec = "pantheon-tweaks.spec"
}
}
@@ -1,37 +0,0 @@
Name: pantheon-tweaks
Version: 2.0.2
Release: 1%?dist
Summary: A system settings panel for the Pantheon desktop environment
License: GPL-3.0
URL: https://github.com/pantheon-tweaks/pantheon-tweaks
Source0: %{url}/archive/refs/tags/%{version}.tar.gz
BuildRequires: vala switchboard-devel pkgconfig(gee-0.8) pkgconfig(glib-2.0)
BuildRequires: granite-devel >= 6.0.0 pkgconfig(gtk+-3.0) meson vala
Requires: gtk3 granite
%description
A system settings panel for the Pantheon Desktop that
lets you easily and safely customise your desktop's appearance.
%prep
%autosetup
%build
%meson
%meson_build
%install
%meson_install
%files
%doc README.md
%license COPYING
/usr/lib64/switchboard/personal/libpantheon-tweaks.so
%{_datadir}/icons/hicolor/32x32/categories/preferences-desktop-tweaks.svg
%{_datadir}/locale/*/LC_MESSAGES/pantheon-tweaks-plug.mo
%{_datadir}/metainfo/pantheon-tweaks.metainfo.xml
%changelog
* Tue Jan 17 2023 windowsboy111 <windowsboy111@fyralabs.com> - 1.0.4-1
- Initial package
@@ -1 +0,0 @@
rpm.version(gh("pantheon-tweaks/pantheon-tweaks"));
@@ -2,16 +2,20 @@
%global plug_type personal
%global plug_name pantheon-tweaks
%global app io.github.pantheon_tweaks.pantheon-tweaks
Name: switchboard-plug-tweaks
Summary: Switchboard Tweaks Plug
Version: 2.0.2
Release: 1%?dist
Release: 2%?dist
License: GPL-3.0-or-later
URL: https://github.com/pantheon-tweaks/pantheon-tweaks
Source0: %{url}/archive/%{version}/%{plug_name}-%{version}.tar.gz
Provides: pantheon-tweaks = %version-%release
Obsoletes: pantheon-tweaks < 2.0.2-2
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: libappstream-glib
@@ -22,7 +26,7 @@ BuildRequires: pkgconfig(gee-0.8)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(granite) >= 6.0.0
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(switchboard-2.0)
BuildRequires: pkgconfig(switchboard-3)
Requires: switchboard%{?_isa}
@@ -63,28 +67,22 @@ de trabalho.
%install
%meson_install
%find_lang %{plug_name}-plug
%find_lang %{plug_name}
# remove the specified stock icon from metainfo (invalid in libappstream-glib)
sed -i '/icon type="stock"/d' %{buildroot}/%{_datadir}/metainfo/%{plug_name}.metainfo.xml
sed -i '/icon type="stock"/d' %buildroot%_metainfodir/%app.metainfo.xml
%check
appstream-util validate-relax --nonet \
%{buildroot}/%{_datadir}/metainfo/%{plug_name}.metainfo.xml
appstream-util validate-relax --nonet %buildroot%_metainfodir/%app.metainfo.xml
%files -f %{plug_name}-plug.lang
%files -f %{plug_name}.lang
%license COPYING
%doc README.md
%doc AUTHORS
%doc CONTRIBUTORS
%{_libdir}/switchboard/%{plug_type}/lib%{plug_name}.so
%{_datadir}/metainfo/%{plug_name}.metainfo.xml
%{_datadir}/icons/hicolor/*/categories/preferences-*.svg
%changelog
* Sat Oct 15 2022 windowsboy111 <windowsboy111@fyralabs.com>
- Repackaged for Terra
%_bindir/pantheon-tweaks
%_datadir/applications/%app.desktop
%_iconsdir/hicolor/*/apps/%app.svg
%_metainfodir/io.github.pantheon_tweaks.pantheon-tweaks.metainfo.xml