Split the libs into their own subpackage

Some applications, like GNOME Builder, require the devhelp libs.

This allows installing them without dragging in the Devhelp app as a
dependency.

Note that the libs subpackage needs to include the translation files,
and the gsettings, as per the upstream maintainer's recommandation.
This commit is contained in:
Mathieu Bridon 2016-04-02 12:29:08 +02:00
parent de5501cf9d
commit ed509445c5

View File

@ -2,7 +2,7 @@
Name: devhelp Name: devhelp
Version: 3.20.0 Version: 3.20.0
Release: 1%{?dist} Release: 2%{?dist}
Epoch: 1 Epoch: 1
License: GPLv2+ License: GPLv2+
Summary: API documention browser Summary: API documention browser
@ -24,14 +24,22 @@ BuildRequires: libappstream-glib
Devhelp is an API documentation browser for the GNOME desktop. Devhelp is an API documentation browser for the GNOME desktop.
It works natively with API documentation generated by gtk-doc. It works natively with API documentation generated by gtk-doc.
%package devel %package libs
Summary: Library to embed Devhelp in other applications Summary: Library to embed Devhelp in other applications
%description libs
Devhelp is an API documentation browser for the GNOME desktop.
This package contains a library that can be used for embedding devhelp
into other applications such as IDEs.
%package devel
Summary: Library to embed Devhelp in other applications - Development files
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description devel %description devel
Devhelp is an API documentation browser for the GNOME desktop. Devhelp is an API documentation browser for the GNOME desktop.
This package contains a library that can be used for embedding devhelp This package contains the development files for the library that can be used
into other applications such as IDEs. for embedding devhelp into other applications such as IDEs.
%prep %prep
%setup -q %setup -q
@ -72,28 +80,31 @@ touch --no-create %{_datadir}/icons/hicolor >&/dev/null || :
%postun %postun
/sbin/ldconfig /sbin/ldconfig
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || :
touch --no-create %{_datadir}/icons/hicolor >&/dev/null || : touch --no-create %{_datadir}/icons/hicolor >&/dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
fi fi
%postun libs
if [ $1 -eq 0 ]; then
glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || :
fi
%posttrans %posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%files -f devhelp.lang %posttrans libs
glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || :
%files
%doc AUTHORS NEWS README misc/devhelp.{el,vim} %doc AUTHORS NEWS README misc/devhelp.{el,vim}
%license COPYING %license COPYING
%{_bindir}/devhelp %{_bindir}/devhelp
%{_libdir}/libdevhelp*.so.*
%{_datadir}/appdata/org.gnome.Devhelp.appdata.xml %{_datadir}/appdata/org.gnome.Devhelp.appdata.xml
%{_datadir}/applications/org.gnome.Devhelp.desktop %{_datadir}/applications/org.gnome.Devhelp.desktop
%{_datadir}/dbus-1/services/org.gnome.Devhelp.service %{_datadir}/dbus-1/services/org.gnome.Devhelp.service
%{_datadir}/devhelp %{_datadir}/devhelp
%{_datadir}/GConf/gsettings/devhelp.convert
%{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml
%{_datadir}/icons/hicolor/16x16/apps/devhelp.png %{_datadir}/icons/hicolor/16x16/apps/devhelp.png
%{_datadir}/icons/hicolor/22x22/apps/devhelp.png %{_datadir}/icons/hicolor/22x22/apps/devhelp.png
%{_datadir}/icons/hicolor/24x24/apps/devhelp.png %{_datadir}/icons/hicolor/24x24/apps/devhelp.png
@ -107,12 +118,21 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%{_libdir}/gedit/plugins/devhelp.* %{_libdir}/gedit/plugins/devhelp.*
%{_mandir}/man1/devhelp.1* %{_mandir}/man1/devhelp.1*
%files libs -f devhelp.lang
%{_libdir}/libdevhelp*.so.*
%{_datadir}/GConf/gsettings/devhelp.convert
%{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml
%files devel %files devel
%{_prefix}/include/devhelp-3.0 %{_prefix}/include/devhelp-3.0
%{_libdir}/libdevhelp*.so %{_libdir}/libdevhelp*.so
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%changelog %changelog
* Sat Apr 02 2016 Mathieu Bridon <bochecha@daitauha.fr> - 1:3.20.0-2
- Split the libs into their own subpackages, so that installing a dependent
application (e.g Builder) does not bring in the Devhelp app.
* Sun Mar 20 2016 Kalev Lember <klember@redhat.com> - 1:3.20.0-1 * Sun Mar 20 2016 Kalev Lember <klember@redhat.com> - 1:3.20.0-1
- Update to 3.20.0 - Update to 3.20.0