File mousepad.spec of Package mousepad
#
# spec file for package mousepad
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%define libname libmousepad0
%bcond_with git
Name: mousepad
Version: 0.6.3+git.33.750b92f5
Release: 0
Summary: Simple Text Editor for Xfce
License: GPL-2.0-or-later
Group: Productivity/Text/Editors
Url: https://git.xfce.org/apps/mousepad/about/
Source: %{name}-%{version}.tar.xz
BuildRequires: appstream-glib
BuildRequires: intltool
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gmodule-2.0) >= 2.52.0
BuildRequires: pkgconfig(gspell-1)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.22
BuildRequires: pkgconfig(gtksourceview-4)
BuildRequires: pkgconfig(libxfconf-0)
%if %{with git}
BuildRequires: xfce4-dev-tools
BuildRequires: exo-tools
%endif
%description
Mousepad is a simple text editor for Xfce.
%package -n %{libname}
Summary: Mousepad plugin provider
Group: System/Libraries
Requires: %{name} >= %{version}
%description -n %{libname}
A plugin provider for the Mousepad text editor
%package devel
Summary: Development files for Mousepad
Group: Development/Libraries
Requires: %{libname} >= %{version}
%Description devel
Development files for Mousepad plugin development
%lang_package
%prep
%setup -q
%build
%if %{with git}
NOCONFIGURE=1 ./autogen.sh
%configure \
--enable-maintainer-mode \
--libdir=%{_libdir} \
--enable-gtk3 \
--enable-dbus
%else
%configure \
--enable-gtk3 \
--enable-dbus
%endif
%make_build
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name} %{?no_lang_C}
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata.xml
%suse_update_desktop_file org.xfce.%{name}
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files
%if %{with_git}
%%doc AUTHORS NEWS README.md
%%else
%doc AUTHORS NEWS ChangeLog README.md
%endif
%license COPYING
%{_bindir}/mousepad
%{_datadir}/applications/org.xfce.mousepad.desktop
%{_datadir}/applications/org.xfce.mousepad-settings.desktop
%{_datadir}/glib-2.0/schemas/org.xfce.mousepad.gschema.xml
%{_datadir}/glib-2.0/schemas/org.xfce.mousepad.plugins.gspell.gschema.xml
%{_datadir}/metainfo/org.xfce.%{name}.appdata.xml
%dir %{_datadir}/icons/hicolor
%{_datadir}/icons/hicolor/*
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/libmousepad-plugin-gspell.so
%files -n %{libname}
%{_libdir}/libmousepad.so.*
%files devel
%{_libdir}/libmousepad.so
%files lang -f %{name}.lang
%changelog