fc65836
# Todo: build docs
fc65836
# BuildRequires:  gtk-doc >= 1.14
fc65836
# configure --enable-gtk-doc --enable-gtk-doc-html --enable-gtk-doc-pdf
0b6cbc7
fc65836
%global ubuntu_release 16.04
bf4610f
53a7881
# Set to 1 to run testsuite
53a7881
%global with_tests 0
53a7881
fc65836
Name:       libdbusmenu
fc65836
Version:    %{ubuntu_release}.0
53a7881
Release:    2%{?dist}
fc65836
Summary:    Library for passing menus over DBus
4e97943
3ac4321
# All files installed in final rpms use C sources with dual licensing headers.
3ac4321
# Tests compiled in the build process are licensed GPLv3
3ac4321
fc65836
License:    LGPLv3 or LGPLv2 and GPLv3
fc65836
URL:        https://launchpad.net/libdbusmenu
fc65836
Source0:    https://launchpad.net/libdbusmenu/%{ubuntu_release}/%{version}/+download/%{name}-%{version}.tar.gz
fc65836
fc65836
BuildRequires:  atk-devel
fc65836
BuildRequires:  autoconf
fc65836
BuildRequires:  automake
fc65836
BuildRequires:  gettext
fc65836
BuildRequires:  glibc-devel
fc65836
BuildRequires:  gnome-common
fc65836
BuildRequires:  gnome-doc-utils
fc65836
BuildRequires:  intltool
fc65836
BuildRequires:  libtool
fc65836
BuildRequires:  libxslt
fc65836
BuildRequires:  pkgconfig
fc65836
BuildRequires:  pkgconfig(atk)
fc65836
BuildRequires:  pkgconfig(gio-2.0) >= 2.35.4
fc65836
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.24
fc65836
BuildRequires:  pkgconfig(glib-2.0) >= 2.35.4
fc65836
BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 0.10
fc65836
BuildRequires:  pkgconfig(gtk+-2.0) >= 2.16
fc65836
BuildRequires:  pkgconfig(gtk+-3.0) >= 2.91
fc65836
BuildRequires:  pkgconfig(json-glib-1.0) >= 0.13.4
fc65836
BuildRequires:  pkgconfig(x11) >= 1.3
fc65836
BuildRequires:  python
fc65836
BuildRequires:  vala-devel
fc65836
BuildRequires:  vala-tools
3ac4321
53a7881
# pkgconfig file is checked for valgrind, but is actually only used for tests
53a7881
# https://bugzilla.redhat.com/show_bug.cgi?id=1262274
53a7881
# BuildRequires:  pkgconfig(valgrind)
53a7881
%if 0%{?with_tests}
53a7881
BuildRequires:  dbus-test-runner
53a7881
BuildRequires:  valgrind
53a7881
%endif
53a7881
3ac4321
%description
fc65836
This is a small library designed to make sharing and displaying of menu
fc65836
structures over DBus simple and easy to use. It works for both QT and GTK+ and
fc65836
makes building menus simple.
3ac4321
3ac4321
%package devel
fc65836
Summary:    %{summary} - Development files
fc65836
Requires:   %{name}%{?_isa} = %{version}-%{release}
fc65836
Requires:   dbus-glib-devel
3ac4321
fc65836
%description devel
fc65836
The %{name}-devel package contains libraries and header files for
fc65836
developing applications that use %{name}.
3ac4321
3ac4321
%package gtk2
fc65836
Summary:    %{summary} - GTK+2 version
fc65836
Requires:   %{name}%{?_isa} = %{version}-%{release}
fc65836
3ac4321
%description gtk2
fc65836
Shared libraries for the %{name}-gtk2 library.
3ac4321
3ac4321
%package gtk3
fc65836
Summary:    %{summary} - GTK+3 version
fc65836
Requires:   %{name}%{?_isa} = %{version}-%{release}
3ac4321
3ac4321
%description gtk3
fc65836
Shared libraries for the %{name}-gtk3 library.
3ac4321
fc65836
%package gtk2-devel
fc65836
Summary:    Development files for %{name}-gtk2
fc65836
Requires:   %{name}-gtk2%{?_isa} = %{version}-%{release}
fc65836
Requires:   %{name}%{?_isa} = %{version}-%{release}
fc65836
Requires:   gtk2-devel
fc65836
Requires:   dbus-glib-devel
3ac4321
fc65836
%description gtk2-devel
3ac4321
The %{name}-gtk2-devel package contains libraries and header files for
fc65836
developing applications that use %{name}-gtk2.
3ac4321
fc65836
%package gtk3-devel
fc65836
Summary:    Development files for %{name}-gtk3
fc65836
Requires:   %{name}-gtk3%{?_isa} = %{version}-%{release}
fc65836
Requires:   %{name}%{?_isa} = %{version}-%{release}
fc65836
Requires:   gtk3-devel
fc65836
Requires:   dbus-glib-devel
3ac4321
fc65836
%description gtk3-devel
3ac4321
The %{name}-gtk3-devel package contains libraries and header files for
fc65836
developing applications that use %{name}-gtk3.
3ac4321
fc65836
%package jsonloader
fc65836
Summary:    Test lib development files
fc65836
Requires:   %{name}-devel%{?_isa} = %{version}-%{release}
3ac4321
fc65836
%description jsonloader
fc65836
Test library for %{name}.
3ac4321
fc65836
%package jsonloader-devel
fc65836
Summary:    Test lib development files for %{name}
fc65836
Requires:   %{name}-jsonloader%{?_isa} = %{version}-%{release}
fc65836
Requires:   %{name}%{?_isa} = %{version}-%{release}
fc65836
fc65836
%description jsonloader-devel
fc65836
The %{name}-jsonloader-devel package contains libraries and header files for
fc65836
developing applications that use %{name}-jsonloader.
fc65836
fc65836
%package    doc
fc65836
Summary:    Document files for %{name}
fc65836
BuildArch:  noarch
fc65836
fc65836
%description doc
fc65836
The %{name}-doc package contains documents for developing applications that
fc65836
use %{name}.
fc65836
fc65836
%package    tools
fc65836
Summary:    Development tools for the dbusmenu libraries
fc65836
Requires:   %{name}%{?_isa} = %{version}-%{release}
fc65836
fc65836
%description tools
fc65836
The %{name}-tools package contains helper tools for developing applications
fc65836
that use %{name}.
3ac4321
3ac4321
3ac4321
%prep
3ac4321
%setup -q -n %{name}-%{version} -c
fc65836
cp -a %{name}-%{version}/{README,COPYING,COPYING.2.1,COPYING-GPL3,AUTHORS,ChangeLog} .
3ac4321
cp -a %{name}-%{version} %{name}-gtk3-%{version}
3ac4321
fc65836
3ac4321
%build
fc65836
build(){
fc65836
autoreconf -vif
fc65836
%configure --disable-static --disable-dumper $*
fc65836
%make_build
fc65836
}
fc65836
3ac4321
pushd %{name}-gtk3-%{version}
3ac4321
sed -i -e 's@^#!.*python$@#!/usr/bin/python2@' tools/dbusmenu-bench
fc65836
build --with-gtk=3
3ac4321
popd
3ac4321
3ac4321
pushd %{name}-%{version}
3ac4321
sed -i -e 's@^#!.*python$@#!/usr/bin/python2@' tools/dbusmenu-bench
fc65836
build --with-gtk=2
3ac4321
popd
3ac4321
3ac4321
3ac4321
%install
3ac4321
pushd %{name}-gtk3-%{version}
fc65836
%make_install
fc65836
find %{buildroot} -name '*.la' -delete
3ac4321
popd
3ac4321
3ac4321
pushd %{name}-%{version}
fc65836
%make_install
fc65836
find %{buildroot} -name '*.la' -delete
3ac4321
popd
3ac4321
fc65836
# Let rpmbuild pick the documents in the files section
fc65836
rm -fr %{buildroot}%{_docdir}/%{name}
3ac4321
53a7881
%if 0%{?with_tests}
53a7881
%check
53a7881
for variant in %{name}-gtk3-%{version} %{name}-%{version}; do
53a7881
    pushd $variant
53a7881
        make check V=1
53a7881
    popd
53a7881
done
53a7881
%endif
53a7881
3ac4321
%post -p /sbin/ldconfig
3ac4321
%post gtk2 -p /sbin/ldconfig
3ac4321
%post gtk3 -p /sbin/ldconfig
3ac4321
%post jsonloader -p /sbin/ldconfig
3ac4321
3ac4321
%postun -p /sbin/ldconfig
3ac4321
%postun gtk2 -p /sbin/ldconfig
3ac4321
%postun gtk3 -p /sbin/ldconfig
3ac4321
%postun jsonloader -p /sbin/ldconfig
3ac4321
fc65836
%files
fc65836
%license COPYING COPYING.2.1 COPYING-GPL3
fc65836
%doc README AUTHORS ChangeLog
3ac4321
%{_libdir}/libdbusmenu-glib.so.*
3ac4321
%{_libdir}/girepository-1.0/Dbusmenu-0.4.typelib
3ac4321
3ac4321
%files devel
fc65836
%doc %{name}-%{version}/tests/glib-server-nomenu.c
3ac4321
%dir %{_includedir}/libdbusmenu-glib-0.4/
3ac4321
%dir %{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-glib/
3ac4321
%{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-glib/*.h
3ac4321
%{_libdir}/libdbusmenu-glib.so
3ac4321
%{_libdir}/pkgconfig/dbusmenu-glib-0.4.pc
3ac4321
%{_datadir}/gir-1.0/Dbusmenu-0.4.gir
3ac4321
%{_datadir}/vala/vapi/Dbusmenu-0.4.vapi
3ac4321
3ac4321
%files jsonloader
3ac4321
%{_libdir}/libdbusmenu-jsonloader.so.*
3ac4321
3ac4321
%files jsonloader-devel
3ac4321
%dir %{_includedir}/libdbusmenu-glib-0.4/
3ac4321
%dir %{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-jsonloader/
3ac4321
%{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-jsonloader/*.h
3ac4321
%{_libdir}/libdbusmenu-jsonloader.so
3ac4321
%{_libdir}/pkgconfig/dbusmenu-jsonloader-0.4.pc
3ac4321
3ac4321
%files gtk3
3ac4321
%{_libdir}/libdbusmenu-gtk3.so.*
3ac4321
%{_libdir}/girepository-1.0/DbusmenuGtk3-0.4.typelib
3ac4321
3ac4321
%files gtk2
3ac4321
%{_libdir}/libdbusmenu-gtk.so.*
3ac4321
%{_libdir}/girepository-1.0/DbusmenuGtk-0.4.typelib
3ac4321
3ac4321
%files gtk3-devel
3ac4321
%dir %{_includedir}/libdbusmenu-gtk3-0.4
3ac4321
%dir %{_includedir}/libdbusmenu-gtk3-0.4/libdbusmenu-gtk
3ac4321
%{_includedir}/libdbusmenu-gtk3-0.4/libdbusmenu-gtk/*.h
3ac4321
%{_libdir}/libdbusmenu-gtk3.so
3ac4321
%{_libdir}/pkgconfig/dbusmenu-gtk3-0.4.pc
3ac4321
%{_datadir}/gir-1.0/DbusmenuGtk3-0.4.gir
3ac4321
%{_datadir}/vala/vapi/DbusmenuGtk3-0.4.vapi
3ac4321
3ac4321
%files gtk2-devel
3ac4321
%dir %{_includedir}/libdbusmenu-gtk-0.4
3ac4321
%dir %{_includedir}/libdbusmenu-gtk-0.4/libdbusmenu-gtk
3ac4321
%{_includedir}/libdbusmenu-gtk-0.4/libdbusmenu-gtk/*.h
3ac4321
%{_libdir}/libdbusmenu-gtk.so
3ac4321
%{_libdir}/pkgconfig/dbusmenu-gtk-0.4.pc
3ac4321
%{_datadir}/gir-1.0/DbusmenuGtk-0.4.gir
3ac4321
%{_datadir}/vala/vapi/DbusmenuGtk-0.4.vapi
3ac4321
fc65836
%files doc
3ac4321
%dir %{_datadir}/gtk-doc/
3ac4321
%{_datadir}/gtk-doc/*
3ac4321
3ac4321
%files tools
fc65836
%doc %{name}-%{version}/tools/README.dbusmenu-bench
3ac4321
%{_libexecdir}/dbusmenu-bench
3ac4321
%{_libexecdir}/dbusmenu-testapp
3ac4321
%dir %{_datadir}/%{name}/
3ac4321
%dir %{_datadir}/%{name}/json/
3ac4321
%{_datadir}/%{name}/json/test-gtk-label.json
3ac4321
3ac4321
%changelog
53a7881
* Mon Apr 17 2017 Simone Caronni <negativo17@gmail.com> - 16.04.0-2
53a7881
- Add tests, remove valgrind-devel build requirements (#1262274).
53a7881
- Disable tests until dbus-test-runner is available.
53a7881
0b6cbc7
* Sun Apr 16 2017 Simone Caronni <negativo17@gmail.com> - 16.04.0-1
0b6cbc7
- Update to 16.04.0.
0b6cbc7
ce229c3
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 12.10.2-11
ce229c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ce229c3
0db0671
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 12.10.2-10
0db0671
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0db0671
30ba19e
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 12.10.2-9
30ba19e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
30ba19e
5a371c9
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 12.10.2-8
5a371c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
5a371c9
df5a1a6
* Tue Jul 22 2014 Kalev Lember <kalevlember@gmail.com> - 12.10.2-7
df5a1a6
- Rebuilt for gobject-introspection 1.41.4
df5a1a6
8a760c1
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 12.10.2-6
8a760c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8a760c1
bf4610f
* Mon Aug 26 2013 Eduardo Echeverria <echevemaster@gmail.com> - 12.10.2-5
bf4610f
- switch to unversioned documentation directory
bf4610f
08b9352
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 12.10.2-4
08b9352
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
08b9352
4e97943
* Sun Jun 02 2013 Dan HorĂ¡k <dan[at]danny.cz> - 12.10.2-3
4e97943
- valgrind exists only on selected arches
4e97943
3ac4321
* Mon May 27 2013 Eduardo Echeverria <echevemaster@gmail.com> - 12.10.2-2
3ac4321
- Fix issues with macros-in-comment
3ac4321
- Fix cosmetics errors
3ac4321
- Workaround for the docs files
3ac4321
- Fix a issue with the ownership of the some directories
3ac4321
3ac4321
* Sun Feb 17 2013 Eduardo Echeverria <echevemaster@gmail.com> - 12.10.2-1
3ac4321
- initial packaging