File plank.spec of Package plank
#
# spec file for package plank
#
# Copyright (c) 2021 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/
#
%global __provides_exclude_from ^%{_libdir}/.*/docklets/.*\\.so$
%define soname libplank
%define sover 1
Name: plank
Version: 0.11.89
Release: 0
Summary: Elegant, simple, and clean dock
License: GPL-3.0-or-later
Group: System/GUI/Other
URL: https://build.opensuse.org
Source: https://github.com/elementary/dock/archive/%{version}.tar.gz#/dock-%{version}.tar.gz
Source100: switchdeps.sh
# PATCH-FIX-UPSTREAM -- https://bugs.launchpad.net/plank/+bug/1760433
Patch0: 000-strip-RPMDELETE-suffix.patch
BuildRequires: hicolor-icon-theme
BuildRequires: libxml2-tools
BuildRequires: meson
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: vala
BuildRequires: pkgconfig(cairo) >= 1.13
BuildRequires: pkgconfig(dbusmenu-glib-0.4) >= 0.4
BuildRequires: pkgconfig(dbusmenu-gtk3-0.4) >= 0.4
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.26.0
BuildRequires: pkgconfig(gdk-x11-3.0) >= 3.10.0
BuildRequires: pkgconfig(gee-0.8)
BuildRequires: pkgconfig(gio-2.0) >= 2.40
BuildRequires: pkgconfig(glib-2.0) >= 2.40
BuildRequires: pkgconfig(gobject-2.0) >= 2.34
BuildRequires: pkgconfig(granite)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.10.0
BuildRequires: pkgconfig(libbamf3) >= 0.4.0
BuildRequires: pkgconfig(libgnome-menu-3.0)
BuildRequires: pkgconfig(libwnck-3.0)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xfixes) >= 5.0
BuildRequires: pkgconfig(xi) >= 1.6.99.1
%if 0%{?suse_version} < 1600
BuildRequires: icu.691-devel
%endif
Requires: bamf-daemon >= 0.2.92
Recommends: %{name}-docklet-battery
Recommends: %{name}-docklet-clippy
Recommends: %{name}-docklet-clock
Recommends: %{name}-docklet-cpumonitor
Recommends: %{name}-docklet-desktop
Recommends: %{name}-docklet-trash
Recommends: %{name}-lang
Suggests: %{name}-docklet-applications
%description
Plank is meant to be the simplest dock on the planet. The goal is
to provide just what a dock needs and absolutely nothing more.
It is, however, a library which can be extended to create other
dock programs with more advanced features.
%package -n %{soname}%{sover}
Summary: Library for the Plank dock
Group: System/Libraries
%description -n %{soname}%{sover}
Plank is meant to be the simplest dock on the planet. The goal is
to provide just what a dock needs and absolutely nothing more.
It is, however, a library which can be extended to create other
dock programs with more advanced features.
This package contains the plank library.
%package docklet-applications
Summary: Applications plugin for %{name}
Group: System/GUI/Other
Requires: %{name} = %{version}
Provides: %{name}-docklets
%description docklet-applications
This plugin starting any applications.
%package docklet-battery
Summary: Battery plugin for %{name}
Group: System/GUI/Other
Requires: %{name} = %{version}
Provides: %{name}-docklets
%description docklet-battery
This plugin displays battery information.
%package docklet-clippy
Summary: Clippy plugin for %{name}
Group: System/GUI/Other
Requires: %{name} = %{version}
Provides: %{name}-docklets
%description docklet-clippy
This plugin keeps recent clipboard entries.
%package docklet-clock
Summary: Clock plugin for %{name}
Group: System/GUI/Other
Requires: %{name} = %{version}
Provides: %{name}-docklets
%description docklet-clock
This plugin gets current time.
%package docklet-cpumonitor
Summary: CPUMonitor plugin for %{name}
Group: System/GUI/Other
Requires: %{name} = %{version}
Provides: %{name}-docklets
%description docklet-cpumonitor
This plugin keeps an eye on CPU.
%package docklet-desktop
Summary: Desktop plugin for %{name}
Group: System/GUI/Other
Requires: %{name} = %{version}
Provides: %{name}-docklets
%description docklet-desktop
This plugin shows current desktop.
%package docklet-trash
Summary: Trash plugin for %{name}
Group: System/GUI/Other
Requires: %{name} = %{version}
Provides: %{name}-docklets
%description docklet-trash
This is a trash support plugin.
%package devel
Summary: Development files for the Plank dock
Group: Development/Libraries/C and C++
Requires: %{soname}%{sover} = %{version}
%description devel
The libxnoise development package includes the header files, libraries,
configuration files and development tools necessary for compiling and
linking application which will use libplank.
%lang_package
%prep
%setup -q -n dock-%{version}
%autopatch -p1
cp %{SOURCE100} ..
sh -x ../switchdeps.sh
sed -e '/X-GNOME-Autostart-Phase=Panel/d' \
-i $(grep -rl 'X-GNOME-Autostart-Phase=Panel')
%build
%meson \
-Denable-apport=false
%meson_build
%install
%meson_install
%suse_update_desktop_file -r %{buildroot}%{_datadir}/applications/%{name}.desktop Utility DesktopUtility
%find_lang %{name}
%post -n %{soname}%{sover} -p /sbin/ldconfig
%postun -n %{soname}%{sover} -p /sbin/ldconfig
%files
%license COPYING
%doc AUTHORS COPYRIGHT HACKING NEWS
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/metainfo/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_datadir}/glib-2.0/schemas/net.launchpad.%{name}.gschema.xml
%{_mandir}/man?/%{name}.?%{?ext_man}
%config(noreplace) %{_sysconfdir}/xdg/autostart/%{name}.desktop
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/docklets
%files -n %{soname}%{sover}
%{_libdir}/lib%{name}.so.*
%files docklet-applications
%{_libdir}/%{name}/docklets/libdocklet-applications.so
%files docklet-battery
%{_libdir}/%{name}/docklets/libdocklet-battery.so
%files docklet-clippy
%{_libdir}/%{name}/docklets/libdocklet-clippy.so
%files docklet-clock
%{_libdir}/%{name}/docklets/libdocklet-clock.so
%files docklet-cpumonitor
%{_libdir}/%{name}/docklets/libdocklet-cpumonitor.so
%files docklet-desktop
%{_libdir}/%{name}/docklets/libdocklet-desktop.so
%files docklet-trash
%{_libdir}/%{name}/docklets/libdocklet-trash.so
%files lang -f %{name}.lang
%files devel
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_datadir}/vala/
%changelog