Blob Blame History Raw
%bcond_without check

Name:           gplugin
Version:        0.27.0
Release:        10%{?dist}
Summary:        GObject based library that implements a reusable plugin system

License:        LGPLv2+

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  %{_bindir}/help2man
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(gmodule-2.0)
%if %{with check}
BuildRequires:  %{_bindir}/gtester
BuildRequires:  %{_bindir}/xsltproc
BuildRequires:  %{_bindir}/xgettext
BuildRequires:  %{_bindir}/msgfmt
BuildRequires:  %{_bindir}/msgmerge
Requires:       %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

GPlugin is a GObject based library that implements a reusable plugin system
which supports loading plugins in other languages via loaders.
It relies heavily on GObjectIntrospection to expose its API to the other

It has a very simple API which makes it very simple to use in your application.

%package        libs
Summary:        Library for %{name}

%description    libs

%package        gtk
Summary:        GTK+ applications for %{name}
BuildRequires:  pkgconfig(gtk+-3.0)
Requires:       %{name}-gtk-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description    gtk

%package        gtk-libs
Summary:        GTK+ libraries for %{name}
Requires:       %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description    gtk-libs

%package        loader-python
Summary:        Python loader for %{name}
BuildRequires:  pkgconfig(python3)
BuildRequires:  pkgconfig(pygobject-3.0)
Requires:       %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description    loader-python

%package        loader-lua
Summary:        Lua loader for %{name}
BuildRequires:  pkgconfig(lua)
BuildRequires:  lua-lgi
Requires:       %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description    loader-lua

%package        devel
Summary:        Development libraries and header files for %{name}-libs
Requires:       %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description    devel

%package        gtk-devel
Summary:        Development libraries and header files for %{name}-gtk-libs
Requires:       %{name}-gtk-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description    gtk-devel

# Pretty much not interested in automatically installed docs
sed -i -e "/CMAKE_INSTALL_DOCDIR/d" CMakeLists.txt

mkdir %{_target_platform}
pushd %{_target_platform}
  %cmake .. \
    -DTESTING_ENABLED=%{?with_check:ON}%{!?with_check:OFF} \
%make_build -C %{_target_platform}

%make_install -C %{_target_platform}

%if %{with check}
# Everything is tested during build process...

# Remove unnecessary library search path.
sed -i 's/-L\${libdir} //g' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
sed -i 's/-L\${libdir} //g' %{buildroot}%{_libdir}/pkgconfig/%{name}-gtk.pc


%ldconfig_scriptlets libs

%files libs
%license COPYING
%doc ChangeLog README
%dir %{_libdir}/%{name}/
%dir %{_libdir}/girepository-1.0

%files gtk

%ldconfig_scriptlets gtk-libs

%files gtk-libs

%files loader-python

%files loader-lua

%files devel
%dir %{_includedir}/%{name}-1.0/
%dir %{_datadir}/gir-1.0

%files gtk-devel

* Fri Feb 01 2019 Fedora Release Engineering <> - 0.27.0-10
- Rebuilt for

* Fri Jul 13 2018 Fedora Release Engineering <> - 0.27.0-9
- Rebuilt for

* Wed Feb 07 2018 Fedora Release Engineering <> - 0.27.0-8
- Rebuilt for

* Fri Feb 02 2018 Igor Gnatenko <> - 0.27.0-7
- Switch to %%ldconfig_scriptlets

* Fri Aug 11 2017 Elliott Sales de Andrade <> - 0.27.0-6
- Remove extraneous pkgconfig library path.

* Wed Aug 02 2017 Fedora Release Engineering <> - 0.27.0-5
- Rebuilt for

* Wed Jul 26 2017 Fedora Release Engineering <> - 0.27.0-4
- Rebuilt for

* Fri Feb 10 2017 Fedora Release Engineering <> - 0.27.0-3
- Rebuilt for

* Tue Jan 10 2017 Igor Gnatenko <> - 0.27.0-2
- Add missing ldconfig scriptlets

* Mon Jan 09 2017 Igor Gnatenko <> - 0.27.0-1
- Initial package