File glib.spec of Package glib1

# spec file for package glib
# Copyright (c) 2013 SUSE LINUX Products 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

Name:           glib
# bug437293
%ifarch ppc64
Obsoletes:      glib-64bit
# /bug437293
Version:        1.2.10
Release:        0
Summary:        The Utility Functions for Gtk
License:        LGPL-2.1+
Group:          System/Libraries
Source:         glib-%{version}.tar.bz2
Source99:       baselibs.conf
# PATCH-FIX-UPSTREAM glib-1.2.10.dif
Patch0:         glib-%{version}.dif
# PATCH-FIX-UPSTREAM glib-1.2.10-gcc34.patch
Patch1:         glib-%{version}-gcc34.patch
# PATCH-FIX-UPSTREAM glib-sentinel.patch
Patch2:         glib-sentinel.patch
# PATCH-FIX-UPSTREAM glib-self-contained.patch
Patch3:         glib-self-contained.patch
# PATCH-FIX-UPSTREAM glib-shift.patch
Patch4:         glib-shift.patch
# PATCH-FIX-UPSTREAM glib-autotools.patch
Patch5:         glib-autotools.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

A library of utility functions for Gtk.

%package devel
Summary:        Development libraries and header files for using the GLib library
Group:          Development/Libraries/C and C++
Obsoletes:      glibdev
Provides:       glibdev
# bug437293
%ifarch ppc64
Obsoletes:      glib-devel-64bit
# /bug437293
Requires(pre):  %install_info_prereq
Requires:       %{name} = %{version}
Requires:       glibc-devel

%description devel
This package contains all necessary include files and libraries needed
to compile and link applications which use the Glib library which
provides utility functions for Gtk.

%setup -q
%patch1 -p1
%patch2 -p1
%patch5 -p1

rm acinclude.m4
autoreconf -f -i
%configure --disable-static --with-pic
make | tee make.log
# Fix linking, so resulting library can be prelinked (#50796).
cd gthread
$(fgrep -- "-o" ../make.log) ../
cd ..

make DESTDIR=%{buildroot} install
# for whatever reason libgmodule is 644
chmod a+x %{buildroot}%{_libdir}/*.so.*
rm %{buildroot}%{_infodir}/dir
%if 0%{?suse_version} > 1110
rm -f %{buildroot}%{_libdir}/*.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/

%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/


%files devel
%doc %{_infodir}/*
%if 0%{?suse_version} <= 1110
%doc %{_mandir}/man1/glib-config.1*

openSUSE Build Service is sponsored by