Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37855702
en ru br
ALT Linux repos
S:2.78.0-alt1
5.0: 2.20.1-alt1
4.1: 2.16.6-alt0.M41.2
4.0: 2.14.1-alt1
3.0: 2.6.5-alt1

Group :: System/Libraries
RPM: glib2

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# This spec is backported to ALTLinux 4.1 automatically by rpmbph script. Do not edit it.
#
%define _name glib
%define ver_major 2.16
%def_enable static
%def_disable gtk_doc
%def_enable regex
%def_disable separate_core_package

Name: glib2
Version: %ver_major.6
Release: alt0.M41.2

Summary: A library of handy utility functions
License: %lgpl2plus
Group: System/Libraries
Url: ftp://ftp.gnome.org
Packager: Alexey Rusakov <ktirf at altlinux.ru>
Source: %gnome_ftp/%_name/%ver_major/%_name-%version.tar.bz2

# These should be prepared for each major version.

Source1: %name-%ver_major-glib.map
Source2: %name-%ver_major-gobject.map
Source3: %name-%ver_major-gio.map

Patch1: glib2-2.16.6-CVE-2008-4316.patch

Provides: lib%name = %version-%release
Obsoletes: lib%name

%if_enabled separate_core_package
Requires: %name-core = %version-%release
%else
Provides: %name-core = %version-%release
Obsoletes: %name-core < %version-%release
%endif

#define gtk_doc_ver 1.4

#define intltool_ver 0.33

BuildPreReq: rpm-build-gnome rpm-build-licenses

BuildPreReq: pkgconfig >= 0.16
BuildPreReq: gtk-doc >= 1.9
BuildPreReq: python-devel
BuildPreReq: libgamin-devel

BuildRequires: docbook-dtds docbook-style-xsl indent libgpg-error xml-common xsltproc

BuildRequires: rpm-build-compat >= 0.95

%description
GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
portability wrappers, and interfaces for such runtime functionality as
an event loop, threads, dynamic loading, and an object system.

%if_enabled separate_core_package
%package core
Summary: GLib core files
Group: System/Libraries

%description core
Note: This package only contains core libraries. If you need GLib with
localization and docs, consider installing %name package.

GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
portability wrappers, and interfaces for such runtime functionality as
an event loop, threads, dynamic loading, and an object system.
%endif

%package -n libgio
Summary: GIO input/output framework
Group: System/Libraries
Requires: %name = %version-%release

%description -n libgio
GIO is a VFS API, designed to replace GnomeVFS. This GIO implementation is
a part of Glib project; it has support for local filesystems, and
a separate GVFS project contains various backend implementations (CIFS,
FTP, SFTP etc.).

%package devel
Summary: Development files and tools for GLib
Group: Development/C
Requires: %name = %version-%release, pkgconfig
Provides: lib%name-devel = %version
Obsoletes: lib%name-devel

%description devel
GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
portability wrappers, and interfaces for such runtime functionality as
an event loop, threads, dynamic loading, and an object system.

This package provides header files and development tools for GLIB.

%package devel-doc
Summary: Development documentation for GLib
Group: Development/C
Conflicts: %name < %version-%release

%description devel-doc
GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
portability wrappers, and interfaces for such runtime functionality as
an event loop, threads, dynamic loading, and an object system.

This package contains development documentation for GLib.

%package -n libgio-devel
Summary: GIO input/output framework
Group: Development/C
Requires: libgio = %version-%release

%description -n libgio-devel
GIO is a VFS API, designed to replace GnomeVFS. This GIO implementation is
a part of Glib project; it has support for local filesystems, and
a separate GVFS project contains various backend implementations (CIFS,
FTP, SFTP etc.).

This package contains files necessary for development with GIO.

%if_enabled static
%package devel-static
Summary: Static version of GLib libraries
Group: Development/C
Requires: %name-devel = %version-%release
Provides: lib%name-devel-static = %version
Obsoletes: lib%name-devel-static

%description devel-static
GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
portability wrappers, and interfaces for such runtime functionality as
an event loop, threads, dynamic loading, and an object system.

This package provides GLIB static libraries.
%endif

%prep
%setup -q -n %_name-%version

%patch1 -p0

install -p -m644 %SOURCE1 glib/symver.map
install -p -m644 %SOURCE2 gobject/symver.map
install -p -m644 %SOURCE3 gio/symver.map

%build
gtkdocize --copy
%autoreconf
%configure \
   %{subst_enable static} \
   --disable-selinux \
   --enable-fam \
   --enable-xattr \
   %{?_enable_gtk_doc:--enable-gtk-doc} \
   --enable-included-printf=no \
   %{subst_enable regex} \

%make_build LIBTOOL_EXPORT_OPTIONS=-Wl,--version-script=symver.map
#make -C tests check-TESTS

%install
%makeinstall LIBRARY_PATH=%buildroot%_lib

# Relocate shared libraries from %_libdir/ to /%_lib/.

mkdir -p %buildroot/%_lib
for f in %buildroot%_libdir/*.so; do
t=`objdump -p "$f" |awk '/SONAME/ {print $2}'`
[ -n "$t" ]
ln -snf ../../%_lib/"$t" "$f"
done
mv %buildroot%_libdir/*.so.* %buildroot/%_lib/

cat <<__SH__ >%name.sh
## This causes GLib2 applications to convert filenames from
## locale encoding to UTF-8. If the locale encoding is already
## UTF-8 then it makes no difference.

export G_BROKEN_FILENAMES=1

# This causes GLib2 applications to convert filenames from

# G_FILENAME_ENCODING encoding to UTF-8.
# Any application can use G_FILENAME_ENCODING for this purposes
# or link natspec library

NATSPEC=/usr/bin/natspec
test -x \$NATSPEC && export G_FILENAME_ENCODING=\`natspec -f\`
__SH__

cat <<__CSH__ >%name.csh
## This causes GLib2 applications to convert filenames from
## locale encoding to UTF-8. If the locale encoding is already
## UTF-8 then it makes no difference.

setenv G_BROKEN_FILENAMES 1

# This causes GLib2 applications to convert filenames from

# G_FILENAME_ENCODING encoding to UTF-8.
# Any application can use G_FILENAME_ENCODING for this purposes
# or link natspec library

setenv NATSPEC /usr/bin/natspec
test -x \$NATSPEC && setenv G_FILENAME_ENCODING \`natspec -f\`
__CSH__

install -pD -m755 %name.sh %buildroot%_sysconfdir/profile.d/lib%name.sh
install -pD -m755 %name.csh %buildroot%_sysconfdir/profile.d/lib%name.csh

# fix gtester-report

subst  's at %buildroot at  at ' %buildroot%_bindir/gtester-report

%find_lang glib20

%set_verify_elf_method strict

%files -f glib20.lang
%doc AUTHORS ChangeLog NEWS README

%if_enabled separate_core_package
# Attention! The files after endif will hit -core subpackage instead of the
# main one, if separate_core_package is defined. Otherwise, they will hit
# %name package.
%files core
%endif
/%_lib/libglib-2.0.so.*
/%_lib/libgobject-2.0.so.*
/%_lib/libgmodule-2.0.so.*
/%_lib/libgthread-2.0.so.*
%config(noreplace) %_sysconfdir/profile.d/*

%files -n libgio
/%_lib/libgio-2.0.so.*
%dir %_libdir/gio
%dir %_libdir/gio/modules
%_libdir/gio/modules/libgiofam.so

%files devel
%_bindir/glib-genmarshal
%_bindir/glib-gettextize
%_bindir/glib-mkenums
%_bindir/gobject-query
# TODO: Check whether gtester is in the right place.
%_bindir/gtester
%_bindir/gtester-report
%dir %_includedir/glib-2.0
%_includedir/glib-2.0/glib*
%_includedir/glib-2.0/gobject*
%_includedir/glib-2.0/gmodule*.h
%_libdir/libglib-2.0.so
%_libdir/libgobject-2.0.so
%_libdir/libgmodule-2.0.so
%_libdir/libgthread-2.0.so
%dir %_libdir/glib-2.0
%dir %_libdir/glib-2.0/include
%dir %_libdir/glib-2.0/include/*.h
%_pkgconfigdir/glib-2.0.pc
%_pkgconfigdir/gmodule*-2.0.pc
%_pkgconfigdir/gobject-2.0.pc
%_pkgconfigdir/gthread-2.0.pc
%_man1dir/glib-*.1.gz
%_man1dir/gobject-*.1.gz
%_datadir/aclocal/glib*.m4
%dir %_datadir/glib-2.0
%_datadir/glib-2.0/*

%files devel-doc
%_datadir/gtk-doc/html/*

%files -n libgio-devel
%dir %_includedir/gio-unix-2.0
%_includedir/gio-unix-2.0/*
%dir %_includedir/glib-2.0/gio
%_includedir/glib-2.0/gio/*
%_libdir/libgio-2.0.so
%_pkgconfigdir/gio-2.0.pc
%_pkgconfigdir/gio-unix-2.0.pc

%if_enabled static
%files devel-static
%_libdir/*.a
%_libdir/gio/modules/*.a
%endif

%exclude %_libdir/gio/modules/*.la

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin