File xfconf.spec of Package xfconf

#
# spec file for package xfconf
#
# Copyright (c) 2018 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 http://bugs.opensuse.org/
#


%define libname libxfconf-0-3
Name:           xfconf
Version:        @SERVICE@
Release:        0
Summary:        Simple Configuration Storage for Xfce
License:        GPL-2.0-or-later
Group:          System/GUI/XFCE
URL:            http://www.xfce.org/projects#core
Source0:        %{name}-%{version}.tar.bz2
Source1:        xfconf-query.1
Source100:      %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE xfconf-remove-rpath.patch gber@opensuse.org -- Do not set RPATH for Xfconf.so
#Patch0:         xfconf-4.7.3-remove-rpath.patch
BuildRequires:  automake
BuildRequires:  intltool
BuildRequires:  pkgconfig
BuildRequires:  xfce4-dev-tools
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(gtk-doc)
BuildRequires:  pkgconfig(libxfce4util-1.0) >= 4.9.0
Recommends:     %{name}-lang = %{version}

%description
Xfconf is a simple client-server configuration storage and query system for the
Xfce desktop.

%package -n %{libname}
Summary:        xfconf Shared Library
Group:          System/Libraries
Recommends:     %{name} = %{version}
Provides:       libxfce4mcs = %{version}
Obsoletes:      libxfce4mcs < %{version}

%description -n %{libname}
This package contains the xfconf shared library.

%package -n libxfconf-devel
Summary:        Development Files for xfconf
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}
Provides:       libxfce4mcs-devel = %{version}
Obsoletes:      libxfce4mcs-devel < %{version}
Provides:       xfce-mcs-manager-devel = %{version}
Obsoletes:      xfce-mcs-manager-devel < %{version}

%description  -n libxfconf-devel
This package contains the files needed for developing applications using
xfconf.

# this should be replaced by %%lang_package once bnc#513786 is resolved
%package lang
Summary:        Languages for package %{name}
Group:          System/Localization
Requires:       %{libname} = %{version}
Supplements:    packageand(bundle-lang-other:%{libname})
Provides:       %{name}-lang-all = %{version}
BuildArch:      noarch

%description lang
Provides translations to the package %{name}

%prep
%setup -q

%build
NOCONFIGURE=1 ./autogen.sh
%configure \
    --enable-maintainer-mode \
    --disable-static \
    --with-helper-path-prefix=%{_libexecdir} \
    --enable-gsettings-backend \
    --enable-gtk-doc
make %{?_smp_mflags} V=1

%install
%make_install
install -D -p -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man1/xfconf-query.1

find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print

rm -rf %{buildroot}%{_datadir}/locale/{ast,kk,ur_PK}

%find_lang %{name} %{?no_lang_C}

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%files
%doc AUTHORS COPYING NEWS TODO
%{_bindir}/xfconf-query
%dir %{_libdir}/gio
%dir %{_libdir}/gio/modules
%{_libdir}/gio/modules/libxfconfgsettingsbackend.so
%dir %{_libexecdir}/xfce4
%dir %{_libexecdir}/xfce4/xfconf
%{_libexecdir}/xfce4/xfconf/xfconfd
%{_datadir}/dbus-1/services/org.xfce.Xfconf.service
%{_mandir}/man1/xfconf-query.1*

%files -n %{libname}
%doc COPYING
%{_libdir}/libxfconf-*.so.*

%files lang -f %{name}.lang

%files -n libxfconf-devel
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%doc %{_datadir}/gtk-doc/html/xfconf
%{_includedir}/xfce4
%{_libdir}/libxfconf-*.so
%{_libdir}/pkgconfig/libxfconf-*.pc

%changelog
openSUSE Build Service is sponsored by