SPEC file update
- Do not use chrpath for removing RPATH but regenerate configure through autotools - Do not bundle txt docs also in docs - Add license tag/docs to the libraries that are installed in any package combination - Be consistent with spaces/tabs - Update build requirements - Remove unused configure option - Simplify documentation installation - Update summaries and descriptions
This commit is contained in:
parent
0b6cbc7080
commit
fc6583611a
254
libdbusmenu.spec
254
libdbusmenu.spec
@ -1,182 +1,166 @@
|
|||||||
|
# Todo: build docs
|
||||||
|
# BuildRequires: gtk-doc >= 1.14
|
||||||
|
# configure --enable-gtk-doc --enable-gtk-doc-html --enable-gtk-doc-pdf
|
||||||
|
|
||||||
%global ubuntu_release 16.04
|
%global ubuntu_release 16.04
|
||||||
|
|
||||||
%if 0%{?fedora}
|
Name: libdbusmenu
|
||||||
%global tools_doc %{_docdir}/%{name}-tools
|
Version: %{ubuntu_release}.0
|
||||||
%global glib_doc %{_docdir}/%{name}-glib-devel
|
Release: 1%{?dist}
|
||||||
%else
|
Summary: Library for passing menus over DBus
|
||||||
%global tools_doc %{_docdir}/%{name}-tools-%{version}
|
|
||||||
%global glib_doc %{_docdir}/%{name}-glib-devel-%{version}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: libdbusmenu
|
|
||||||
Version: %{ubuntu_release}.0
|
|
||||||
Release: 1%{?dist}
|
|
||||||
Summary: A library that pulling out some code out of indicator-applet
|
|
||||||
|
|
||||||
# All files installed in final rpms use C sources with dual licensing headers.
|
# All files installed in final rpms use C sources with dual licensing headers.
|
||||||
# Tests compiled in the build process are licensed GPLv3
|
# Tests compiled in the build process are licensed GPLv3
|
||||||
|
|
||||||
License: LGPLv3 or LGPLv2 and GPLv3
|
License: LGPLv3 or LGPLv2 and GPLv3
|
||||||
URL: https://launchpad.net/libdbusmenu
|
URL: https://launchpad.net/libdbusmenu
|
||||||
Source0: https://launchpad.net/libdbusmenu/%{ubuntu_release}/%{version}/+download/%{name}-%{version}.tar.gz
|
Source0: https://launchpad.net/libdbusmenu/%{ubuntu_release}/%{version}/+download/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildRequires: vala-tools vala-devel
|
BuildRequires: atk-devel
|
||||||
BuildRequires: json-glib-devel
|
BuildRequires: autoconf
|
||||||
BuildRequires: chrpath
|
BuildRequires: automake
|
||||||
BuildRequires: intltool
|
BuildRequires: gettext
|
||||||
BuildRequires: gobject-introspection-devel
|
BuildRequires: glibc-devel
|
||||||
BuildRequires: gnome-doc-utils
|
BuildRequires: gnome-common
|
||||||
BuildRequires: gnome-common
|
BuildRequires: gnome-doc-utils
|
||||||
BuildRequires: python
|
BuildRequires: intltool
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: libtool
|
||||||
# valgrind exists only on selected arches
|
BuildRequires: libxslt
|
||||||
%ifarch %{ix86} x86_64 ppc ppc64 s390x %{arm}
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: valgrind-devel
|
BuildRequires: pkgconfig(atk)
|
||||||
%endif
|
BuildRequires: pkgconfig(gio-2.0) >= 2.35.4
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.24
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: pkgconfig(glib-2.0) >= 2.35.4
|
||||||
BuildRequires: gtk3-devel
|
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.10
|
||||||
BuildRequires: gtk2-devel
|
BuildRequires: pkgconfig(gtk+-2.0) >= 2.16
|
||||||
BuildRequires: atk-devel
|
BuildRequires: pkgconfig(gtk+-3.0) >= 2.91
|
||||||
|
BuildRequires: pkgconfig(json-glib-1.0) >= 0.13.4
|
||||||
|
BuildRequires: pkgconfig(valgrind)
|
||||||
|
BuildRequires: pkgconfig(x11) >= 1.3
|
||||||
|
BuildRequires: python
|
||||||
|
BuildRequires: vala-devel
|
||||||
|
BuildRequires: vala-tools
|
||||||
|
|
||||||
%description
|
%description
|
||||||
It passes a menu structure across DBus so that a program can create
|
This is a small library designed to make sharing and displaying of menu
|
||||||
a menu simply without worrying about how it is displayed on the
|
structures over DBus simple and easy to use. It works for both QT and GTK+ and
|
||||||
other side of the bus
|
makes building menus simple.
|
||||||
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: %{summary}
|
Summary: %{summary} - Development files
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: dbus-glib-devel
|
Requires: dbus-glib-devel
|
||||||
%description devel
|
|
||||||
Development Files for %{name}
|
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and header files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
|
||||||
%package gtk2
|
%package gtk2
|
||||||
Summary: %{summary}
|
Summary: %{summary} - GTK+2 version
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description gtk2
|
%description gtk2
|
||||||
Shared libraries for the %{name}-gtk2 library
|
Shared libraries for the %{name}-gtk2 library.
|
||||||
|
|
||||||
%package gtk3
|
%package gtk3
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Summary: %{summary} - GTK+3 version
|
||||||
Summary: %{summary}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description gtk3
|
%description gtk3
|
||||||
Shared libraries for the %{name}-gtk3 library
|
Shared libraries for the %{name}-gtk3 library.
|
||||||
|
|
||||||
|
%package gtk2-devel
|
||||||
|
Summary: Development files for %{name}-gtk2
|
||||||
|
Requires: %{name}-gtk2%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: gtk2-devel
|
||||||
|
Requires: dbus-glib-devel
|
||||||
|
|
||||||
%package gtk2-devel
|
%description gtk2-devel
|
||||||
Summary: Development files for %{name}
|
|
||||||
Requires: %{name}-gtk2%{?_isa} = %{version}-%{release}
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
Requires: gtk2-devel
|
|
||||||
Requires: dbus-glib-devel
|
|
||||||
%description gtk2-devel
|
|
||||||
The %{name}-gtk2-devel package contains libraries and header files for
|
The %{name}-gtk2-devel package contains libraries and header files for
|
||||||
developing applications that use %{name}.
|
developing applications that use %{name}-gtk2.
|
||||||
|
|
||||||
%package gtk3-devel
|
%package gtk3-devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}-gtk3
|
||||||
Requires: %{name}-gtk3%{?_isa} = %{version}-%{release}
|
Requires: %{name}-gtk3%{?_isa} = %{version}-%{release}
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: gtk3-devel
|
Requires: gtk3-devel
|
||||||
Requires: dbus-glib-devel
|
Requires: dbus-glib-devel
|
||||||
|
|
||||||
%description gtk3-devel
|
%description gtk3-devel
|
||||||
The %{name}-gtk3-devel package contains libraries and header files for
|
The %{name}-gtk3-devel package contains libraries and header files for
|
||||||
developing applications that use %{name}.
|
developing applications that use %{name}-gtk3.
|
||||||
|
|
||||||
%package jsonloader
|
%package jsonloader
|
||||||
Summary: Test lib development files
|
Summary: Test lib development files
|
||||||
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||||
%description jsonloader
|
|
||||||
It passes a menu structure across DBus so that a program can create
|
|
||||||
a menu simply without worrying about how it is displayed on the
|
|
||||||
other side of the bus
|
|
||||||
|
|
||||||
%package jsonloader-devel
|
%description jsonloader
|
||||||
Summary: Test lib development files for %{name}
|
Test library for %{name}.
|
||||||
Requires: %{name}-jsonloader%{?_isa} = %{version}-%{release}
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
%description jsonloader-devel
|
|
||||||
It passes a menu structure across DBus so that a program can create
|
|
||||||
a menu simply without worrying about how it is displayed on the
|
|
||||||
other side of the bus
|
|
||||||
|
|
||||||
%package doc
|
%package jsonloader-devel
|
||||||
Summary: Document files for %{name}
|
Summary: Test lib development files for %{name}
|
||||||
BuildArch: noarch
|
Requires: %{name}-jsonloader%{?_isa} = %{version}-%{release}
|
||||||
Group: Documentation
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
%description doc
|
|
||||||
The %{name}-doc package contains documents for
|
|
||||||
developing applications that use %{name}.
|
|
||||||
|
|
||||||
%package tools
|
%description jsonloader-devel
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
The %{name}-jsonloader-devel package contains libraries and header files for
|
||||||
Summary: Development tools for the dbusmenu libraries
|
developing applications that use %{name}-jsonloader.
|
||||||
|
|
||||||
%description tools
|
%package doc
|
||||||
The %{name}-tools package contains helper tools for
|
Summary: Document files for %{name}
|
||||||
developing applications that use %{name}.
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
The %{name}-doc package contains documents for developing applications that
|
||||||
|
use %{name}.
|
||||||
|
|
||||||
|
%package tools
|
||||||
|
Summary: Development tools for the dbusmenu libraries
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description tools
|
||||||
|
The %{name}-tools package contains helper tools for developing applications
|
||||||
|
that use %{name}.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version} -c
|
%setup -q -n %{name}-%{version} -c
|
||||||
cp -a %{name}-%{version}/{README,COPYING,COPYING.2.1,COPYING-GPL3,AUTHORS} .
|
cp -a %{name}-%{version}/{README,COPYING,COPYING.2.1,COPYING-GPL3,AUTHORS,ChangeLog} .
|
||||||
cp -a %{name}-%{version} %{name}-gtk3-%{version}
|
cp -a %{name}-%{version} %{name}-gtk3-%{version}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
build(){
|
||||||
|
autoreconf -vif
|
||||||
|
%configure --disable-static --disable-dumper $*
|
||||||
|
%make_build
|
||||||
|
}
|
||||||
|
|
||||||
pushd %{name}-gtk3-%{version}
|
pushd %{name}-gtk3-%{version}
|
||||||
sed -i -e 's@^#!.*python$@#!/usr/bin/python2@' tools/dbusmenu-bench
|
sed -i -e 's@^#!.*python$@#!/usr/bin/python2@' tools/dbusmenu-bench
|
||||||
export CFLAGS="%{optflags} -Wno-error=deprecated-declarations"
|
build --with-gtk=3
|
||||||
%configure --disable-static --disable-scrollkeeper --with-gtk=3 --disable-dumper
|
|
||||||
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
|
|
||||||
make %{?_smp_mflags} V=1
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
pushd %{name}-%{version}
|
pushd %{name}-%{version}
|
||||||
sed -i -e 's@^#!.*python$@#!/usr/bin/python2@' tools/dbusmenu-bench
|
sed -i -e 's@^#!.*python$@#!/usr/bin/python2@' tools/dbusmenu-bench
|
||||||
export CFLAGS="%{optflags} -Wno-error=deprecated-declarations"
|
build --with-gtk=2
|
||||||
%configure --disable-static --disable-scrollkeeper --with-gtk=2 --disable-dumper
|
|
||||||
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
|
|
||||||
make %{?_smp_mflags} V=1
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
pushd %{name}-gtk3-%{version}
|
pushd %{name}-gtk3-%{version}
|
||||||
make install DESTDIR=%{buildroot}
|
%make_install
|
||||||
chrpath --delete %{buildroot}%{_libdir}/libdbusmenu-gtk3.so.4.0.12
|
find %{buildroot} -name '*.la' -delete
|
||||||
chrpath --delete %{buildroot}%{_libdir}/libdbusmenu-jsonloader.so.4.0.12
|
|
||||||
chrpath --delete %{buildroot}%{_libexecdir}/dbusmenu-testapp
|
|
||||||
|
|
||||||
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
pushd %{name}-%{version}
|
pushd %{name}-%{version}
|
||||||
make install DESTDIR=%{buildroot}
|
%make_install
|
||||||
chrpath --delete %{buildroot}%{_libdir}/libdbusmenu-gtk.so.4.0.12
|
find %{buildroot} -name '*.la' -delete
|
||||||
chrpath --delete %{buildroot}%{_libdir}/libdbusmenu-jsonloader.so.4.0.12
|
|
||||||
chrpath --delete %{buildroot}%{_libexecdir}/dbusmenu-testapp
|
|
||||||
|
|
||||||
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# Let rpmbuild pick the documents in the files section
|
||||||
# Put documentation in correct directory
|
rm -fr %{buildroot}%{_docdir}/%{name}
|
||||||
install -dm755 %{buildroot}%{tools_doc}/
|
|
||||||
mv %{buildroot}%{_docdir}/%{name}/README.dbusmenu-bench \
|
|
||||||
%{buildroot}%{tools_doc}
|
|
||||||
|
|
||||||
# Put examples in correct documentation directory
|
|
||||||
install -dm755 %{buildroot}%{glib_doc}/examples/
|
|
||||||
mv %{buildroot}%{_docdir}/%{name}/examples/glib-server-nomenu.c \
|
|
||||||
%{buildroot}%{glib_doc}/examples/
|
|
||||||
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%post gtk2 -p /sbin/ldconfig
|
%post gtk2 -p /sbin/ldconfig
|
||||||
@ -188,12 +172,14 @@ mv %{buildroot}%{_docdir}/%{name}/examples/glib-server-nomenu.c \
|
|||||||
%postun gtk3 -p /sbin/ldconfig
|
%postun gtk3 -p /sbin/ldconfig
|
||||||
%postun jsonloader -p /sbin/ldconfig
|
%postun jsonloader -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README COPYING COPYING.2.1 COPYING-GPL3 AUTHORS
|
%license COPYING COPYING.2.1 COPYING-GPL3
|
||||||
|
%doc README AUTHORS ChangeLog
|
||||||
%{_libdir}/libdbusmenu-glib.so.*
|
%{_libdir}/libdbusmenu-glib.so.*
|
||||||
%{_libdir}/girepository-1.0/Dbusmenu-0.4.typelib
|
%{_libdir}/girepository-1.0/Dbusmenu-0.4.typelib
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
|
%doc %{name}-%{version}/tests/glib-server-nomenu.c
|
||||||
%dir %{_includedir}/libdbusmenu-glib-0.4/
|
%dir %{_includedir}/libdbusmenu-glib-0.4/
|
||||||
%dir %{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-glib/
|
%dir %{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-glib/
|
||||||
%{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-glib/*.h
|
%{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-glib/*.h
|
||||||
@ -201,14 +187,10 @@ mv %{buildroot}%{_docdir}/%{name}/examples/glib-server-nomenu.c \
|
|||||||
%{_libdir}/pkgconfig/dbusmenu-glib-0.4.pc
|
%{_libdir}/pkgconfig/dbusmenu-glib-0.4.pc
|
||||||
%{_datadir}/gir-1.0/Dbusmenu-0.4.gir
|
%{_datadir}/gir-1.0/Dbusmenu-0.4.gir
|
||||||
%{_datadir}/vala/vapi/Dbusmenu-0.4.vapi
|
%{_datadir}/vala/vapi/Dbusmenu-0.4.vapi
|
||||||
%dir %{glib_doc}/
|
|
||||||
%dir %{glib_doc}/examples/
|
|
||||||
%doc %{glib_doc}/examples/glib-server-nomenu.c
|
|
||||||
|
|
||||||
%files jsonloader
|
%files jsonloader
|
||||||
%{_libdir}/libdbusmenu-jsonloader.so.*
|
%{_libdir}/libdbusmenu-jsonloader.so.*
|
||||||
|
|
||||||
|
|
||||||
%files jsonloader-devel
|
%files jsonloader-devel
|
||||||
%dir %{_includedir}/libdbusmenu-glib-0.4/
|
%dir %{_includedir}/libdbusmenu-glib-0.4/
|
||||||
%dir %{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-jsonloader/
|
%dir %{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-jsonloader/
|
||||||
@ -224,7 +206,6 @@ mv %{buildroot}%{_docdir}/%{name}/examples/glib-server-nomenu.c \
|
|||||||
%{_libdir}/libdbusmenu-gtk.so.*
|
%{_libdir}/libdbusmenu-gtk.so.*
|
||||||
%{_libdir}/girepository-1.0/DbusmenuGtk-0.4.typelib
|
%{_libdir}/girepository-1.0/DbusmenuGtk-0.4.typelib
|
||||||
|
|
||||||
|
|
||||||
%files gtk3-devel
|
%files gtk3-devel
|
||||||
%dir %{_includedir}/libdbusmenu-gtk3-0.4
|
%dir %{_includedir}/libdbusmenu-gtk3-0.4
|
||||||
%dir %{_includedir}/libdbusmenu-gtk3-0.4/libdbusmenu-gtk
|
%dir %{_includedir}/libdbusmenu-gtk3-0.4/libdbusmenu-gtk
|
||||||
@ -243,20 +224,17 @@ mv %{buildroot}%{_docdir}/%{name}/examples/glib-server-nomenu.c \
|
|||||||
%{_datadir}/gir-1.0/DbusmenuGtk-0.4.gir
|
%{_datadir}/gir-1.0/DbusmenuGtk-0.4.gir
|
||||||
%{_datadir}/vala/vapi/DbusmenuGtk-0.4.vapi
|
%{_datadir}/vala/vapi/DbusmenuGtk-0.4.vapi
|
||||||
|
|
||||||
|
%files doc
|
||||||
%files doc
|
|
||||||
%doc README COPYING COPYING.2.1 AUTHORS
|
|
||||||
%dir %{_datadir}/gtk-doc/
|
%dir %{_datadir}/gtk-doc/
|
||||||
%{_datadir}/gtk-doc/*
|
%{_datadir}/gtk-doc/*
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
|
%doc %{name}-%{version}/tools/README.dbusmenu-bench
|
||||||
%{_libexecdir}/dbusmenu-bench
|
%{_libexecdir}/dbusmenu-bench
|
||||||
%{_libexecdir}/dbusmenu-testapp
|
%{_libexecdir}/dbusmenu-testapp
|
||||||
%dir %{_datadir}/%{name}/
|
%dir %{_datadir}/%{name}/
|
||||||
%dir %{_datadir}/%{name}/json/
|
%dir %{_datadir}/%{name}/json/
|
||||||
%{_datadir}/%{name}/json/test-gtk-label.json
|
%{_datadir}/%{name}/json/test-gtk-label.json
|
||||||
%dir %{tools_doc}/
|
|
||||||
%{tools_doc}/README.dbusmenu-bench
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Apr 16 2017 Simone Caronni <negativo17@gmail.com> - 16.04.0-1
|
* Sun Apr 16 2017 Simone Caronni <negativo17@gmail.com> - 16.04.0-1
|
||||||
|
Loading…
Reference in New Issue
Block a user