File libgksu.spec of Package libgksu
#
# spec file for package libgksu
#
# Copyright (c) 2015 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 soname libgksu2
%define sover 0
%define _name gksu
%define _version 2.0.12
Name: libgksu
Version: 2.0.13~pre1
Release: 0
Summary: Library providing su and sudo functionality
License: GPL-2.0+
Group: System/Libraries
Url: http://nongnu.org/gksu
Source: http://httpredir.debian.org/debian/pool/main/libg/%{name}/%{name}_%{version}.orig.tar.gz
# PATCH-FIX-OPENSUSE libgksu-fix-compilation.patch sor.alexei@meowr.ru -- Fix build and remove some deprecations.
Patch0: %{name}-fix-compilation.patch
# PATCH-FEATURE-OPENSUSE libgksu-gsettings.patch sor.alexei@meowr.ru -- Port to GSettings from GConf.
Patch1: %{name}-gsettings.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext
BuildRequires: intltool
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gnome-keyring-1)
BuildRequires: pkgconfig(gtk+-2.0)
# Deprecaded use of gtk mktmpl cause build failure in recent versions of gtk-doc
%if 0%{?suse_version} < 1330
BuildRequires: pkgconfig(gtk-doc)
%endif
BuildRequires: pkgconfig(libgtop-2.0)
BuildRequires: pkgconfig(libstartup-notification-1.0)
%if 0%{?suse_version} < 1330
%glib2_gsettings_schema_requires
%endif
%description
This library comes from the gksu program. It provides a simple API
to use su and sudo in programs that need to execute tasks as other
user. It provides X authentication facilities for running programs in
an X session.
%package -n %{soname}-%{sover}
Summary: Library providing su and sudo functionality
Group: System/Libraries
Requires: %{soname}-bin >= %{version}
%description -n %{soname}-%{sover}
This library comes from the gksu program. It provides a simple API
to use su and sudo in programs that need to execute tasks as other
user. It provides X authentication facilities for running programs in
an X session.
%lang_package -n %{soname}-%{sover}
%package -n %{soname}-bin
Summary: Libgksu binary files
Group: System/Libraries
Requires: %{soname}-%{sover} = %{version}
%description -n %{soname}-bin
This library comes from the gksu program. It provides a simple API
to use su and sudo in programs that need to execute tasks as other
user. It provides X authentication facilities for running programs in
an X session.
%package -n %{soname}-devel
Summary: Development files of libgksu
Group: Development/Libraries
Requires: %{soname}-%{sover} = %{version}
%description -n %{soname}-devel
The libgksu development package includes the header files, libraries,
configuration files and development tools necessary for compiling and
linking application which will use libgksu.
%prep
%autosetup -n %{name}-%{_version} -p1
ls po | sort | sed -e '/.po$/!d;s/.po$//g' > po/LINGUAS
%build
intltoolize --force --copy --automake
autoreconf -fi
%configure \
--disable-static \
--disable-sudo-forkpty \
%if 0%{?suse_version} < 1330
--enable-gtk-doc \
%else
--disable-gtk-doc \
%endif
--with-html-dir=%{_docdir}/html
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%suse_update_desktop_file -r %{_name}-properties GTK Settings
%find_lang %{name}
%post -n %{soname}-%{sover} -p /sbin/ldconfig
%postun -n %{soname}-%{sover} -p /sbin/ldconfig
%if 0%{?suse_version} < 1330
%post -n %{soname}-bin
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post
%postun -n %{soname}-bin
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun
%endif
%files -n %{soname}-%{sover}
%defattr(-,root,root)
%{_libdir}/%{soname}.so.*
%files -n %{soname}-%{sover}-lang -f %{name}.lang
%defattr(-,root,root)
%files -n %{soname}-bin
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING
%{_bindir}/%{_name}-properties
%{_libexecdir}/%{_name}/
%{_datadir}/%{name}/
%{_datadir}/applications/%{_name}-properties.desktop
%{_datadir}/icons/hicolor/*/apps/%{_name}.png
%{_datadir}/glib-2.0/schemas/*.xml
%dir %{_datadir}/GConf/
%dir %{_datadir}/GConf/gsettings/
%{_datadir}/GConf/gsettings/*.convert
%{_mandir}/man1/%{_name}-properties.1%{?ext_man}
%files -n %{soname}-devel
%defattr(-,root,root)
%if 0%{?suse_version} < 1330
%doc %{_docdir}/html
%endif
%{_includedir}/%{name}/
%{_libdir}/pkgconfig/%{soname}.pc
%{_libdir}/%{soname}.so
%changelog