File libgnomecups.spec of Package libgnomecups

#
# spec file for package libgnomecups
#
# 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/
#


Name:           libgnomecups
Version:        0.2.3
Release:        0
Summary:        GNOME CUPS Library
License:        LGPL-2.0-only
Group:          System/GUI/GNOME
Url:            http://www.gnome.org/
Source:         %{name}-%{version}.tar.gz
Source99:       baselibs.conf
# PATCH-FIX-UPSTREAM libgnomecups-callback-fix.patch
Patch0:         libgnomecups-callback-fix.patch
# PATCH-FIX-UPSTREAM libgnomecups-lpoptions.patch
Patch1:         libgnomecups-lpoptions.patch
# PATCH-FEATURE-OPENSUSE libgnomecups-ignore-default-ipp-warning.patch
Patch2:         libgnomecups-ignore-default-ipp-warning.patch
# PATCH-FIX-UPSTREAM libgnomecups-glib.patch bgo#664930 dimstar@opensuse.org -- Fix build with glib 2.31: only glib.h can be included.
Patch3:         libgnomecups-glib.patch
# PATCH-FIX-UPSTREAM libgnomecups-buildfixes.patch dimstar@opensuse.org -- use g_error_new_literal to avoid explotability of literal strings.
Patch4:         libgnomecups-buildfixes.patch
BuildRequires:  cups-devel
BuildRequires:  fdupes
BuildRequires:  gnome-common
BuildRequires:  intltool
BuildRequires:  pkgconfig
BuildRequires:  translation-update-upstream
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(glib-2.0)
Recommends:     %{name}-lang = %{version}
#

%description
A gobject (GLib) wrapper for IPP printer management, which is used by
CUPS.  Mainly used by the GNOME printing system.

%package -n libgnomecups-1_0-1
Summary:        GNOME CUPS Library
Group:          System/Libraries
Obsoletes:      libgnomecups < %{version}-%{release}
Provides:       libgnomecups = %{version}-%{release}

%description -n libgnomecups-1_0-1
A gobject (GLib) wrapper for IPP printer management, which is used by
CUPS.  Mainly used by the GNOME printing system.

%package devel
Summary:        Development files for the GNOME CUPS library
Group:          System/GUI/GNOME
Requires:       cups-devel
Requires:       libgnomecups-1_0-1 = %{version}
Requires:       zlib-devel
Requires:       pkgconfig(glib-2.0)
#

%description devel
A gobject (GLib) wrapper for IPP printer management, which is used by
CUPS.  Mainly used by the GNOME printing system.

%lang_package

%prep
%setup -q
translation-update-upstream
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
autoreconf -f -i
CFLAGS="%{optflags} -D_CUPS_IPP_PRIVATE_H_ -Werror=format-security"
%configure --disable-static
make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
# Change sr@Latn to sr@latin
mv %{buildroot}%{_datadir}/locale/sr@Latn %{buildroot}%{_datadir}/locale/sr@latin
%find_lang %{name}

%post   -n libgnomecups-1_0-1  -p /sbin/ldconfig
%postun -n libgnomecups-1_0-1 -p /sbin/ldconfig

%files -n libgnomecups-1_0-1
%license COPYING
%doc AUTHORS ChangeLog NEWS
%{_libdir}/*.so.*

%files lang -f %{name}.lang

%files devel
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*

%changelog
openSUSE Build Service is sponsored by