Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37863738
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 

%define _name glib
%define ver_major 2.6
%def_disable static
%def_enable gtk_doc

Name: glib2
Version: %ver_major.5
Release: alt1

Summary: A library of handy utility functions
License: LGPL
Group: System/Libraries
Packager: Yuri N. Sedunov <aris at altlinux.ru>
Url: ftp://ftp.gnome.org

Source: ftp://ftp.gnome.org/pub/gnome/sources/%_name/%ver_major/%_name-%version.tar.bz2

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

%define pkgconfig_ver 0.15-alt3.2
%define gtk_doc_ver 1.3
%define intltool_ver 0.33
%define gnome_common_ver 2.8.0

# /usr/bin/natspec required to set G_FILENAME_ENCODING

Requires: libnatspec

BuildPreReq: pkgconfig >= %pkgconfig_ver
BuildPreReq: gtk-doc >= %gtk_doc_ver
BuildPreReq: intltool >= %intltool_ver
#BuildPreReq: gnome-common >= %gnome_common_ver

# Automatically added by buildreq on Thu Dec 16 2004

BuildRequires: docbook-dtds docbook-style-xsl gcc-c++ gcc-g77 glib2 gtk-doc indent libgpg-error libstdc++-devel pkgconfig xml-common xsltproc

%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.

%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 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.

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

%build
%configure \
   %{subst_enable static} \
%if_enabled gtk_doc
   --enable-gtk-doc
%endif

%make_build
#%make -C tests check-TESTS

%install
%make_install DESTDIR=%buildroot \
       LIBRARY_PATH=%buildroot%_libdir install

%__cat <<__SH__ >%name.sh
## This caused 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 caused 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 caused 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 caused 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/%name.sh
%__install -pD -m755 %name.csh %buildroot%_sysconfdir/profile.d/%name.csh

%find_lang glib20

%post -p %post_ldconfig
%postun -p %postun_ldconfig

%files -f glib20.lang
%_libdir/*.so.*
%_sysconfdir/profile.d/*
%doc AUTHORS ChangeLog NEWS README

%files devel
%_bindir/*
%_includedir/*
%_libdir/*.so
%_libdir/glib-2.0
%_libdir/pkgconfig/*
%_mandir/man?/*
%_datadir/aclocal/*
%_datadir/glib-2.0

%if_enabled gtk_doc
%files devel-doc
%_datadir/gtk-doc/html/*
%endif

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

%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