Build conditionally with kdbus
[platform/upstream/glib.git] / packaging / glib2.spec
index ac122f5..cb12266 100644 (file)
@@ -1,16 +1,18 @@
+%bcond_with kdbus
+%define baseline 2.43
 %define with_systemtap 0
 %define keepstatic 1
+%define release_flags %{?with_kdbus:+kdbus}
 
 Name:           glib2
-%define _name glib
-Version:        2.34.3
-Release:        0
+Version:        2.43.1
+Release:        0%{?release_flags}
 # FIXME: find out if tapsets should really be in devel package or in main package
 Summary:        General-Purpose Utility Library
 License:        LGPL-2.1+
-Group:          System/Libraries
+Group:          Base/Libraries
 Url:            http://www.gtk.org/
-Source:         http://download.gnome.org/sources/glib/2.32/%{_name}-%{version}.tar.xz
+Source:         http://download.gnome.org/sources/glib/%{baseline}/%{name}-%{version}.tar.xz
 Source1:        glib2.sh
 Source2:        glib2.csh
 # Not upstream file. Only proposes upstream packages:
@@ -20,6 +22,7 @@ Source6:        macros.glib2
 # Please update this file from the latest gtk-doc package:
 Source7:        gtk-doc.m4
 Source99:       baselibs.conf
+Source1001:    glib2.manifest
 BuildRequires:  automake
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
@@ -36,13 +39,6 @@ BuildRequires:  pkgconfig(libelf) >= 0.8.12
 BuildRequires:  pkgconfig(libffi)
 BuildRequires:  pkgconfig(libpcre)
 BuildRequires:  pkgconfig(zlib)
-%if 0%{?BUILD_FROM_VCS}
-# It's important to keep those BuildRequires inside
-# BUILD_FROM_VCS to avoid build loops in Factory
-BuildRequires:  git-core
-BuildRequires:  gtk-doc
-%endif
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 GLib is a general-purpose utility library, which provides many useful
@@ -51,7 +47,6 @@ a main loop abstraction, and so on.
 
 %package tools
 Summary:        General-Purpose Utility Library -- Tools
-Group:          Development/Libraries/C and C++
 
 %description tools
 GLib is a general-purpose utility library, which provides many useful
@@ -60,7 +55,6 @@ a main loop abstraction, and so on.
 
 %package -n gio-branding-upstream
 Summary:        Upstream definitions of default settings and applications
-Group:          System/Libraries
 Requires:       libgio = %{version}
 Provides:       %{name}-branding-upstream = %{version}
 Obsoletes:      %{name}-branding-upstream < %{version}
@@ -100,7 +94,6 @@ Requires:       python-xml
 Provides:       glib2-doc = 2.19.6
 Obsoletes:      glib2-doc < 2.19.6
 Summary:        General-Purpose Utility Library -- Development Files
-Group:          Development/Libraries/C and C++
 
 %description devel
 GLib is a general-purpose utility library, which provides many useful
@@ -112,7 +105,6 @@ This package contains the development files for GLib.
 %package devel-static
 Requires:       %{name}-devel = %{version}
 Summary:        General-Purpose Utility Library -- Static Libraries
-Group:          Development/Libraries/C and C++
 
 %description devel-static
 GLib is a general-purpose utility library, which provides many useful
@@ -123,7 +115,6 @@ This package contains static versions of the GLib libraries.
 
 %package -n libglib
 Summary:        General-Purpose Utility Library
-Group:          System/Libraries
 Provides:       %{name} = %{version}
 Obsoletes:      %{name} < %{version}
 
@@ -134,7 +125,6 @@ a main loop abstraction, and so on.
 
 %package -n libgmodule
 Summary:        General-Purpose Utility Library -- Library for Modules
-Group:          System/Libraries
 
 %description -n libgmodule
 GLib is a general-purpose utility library, which provides many useful
@@ -146,7 +136,6 @@ object files (commonly known as 'plug-ins').
 
 %package -n libgio
 Summary:        General-Purpose Utility Library -- Library for VFS
-Group:          System/Libraries
 Requires:       gio-branding = %{version}
 # bnc#555605: shared-mime-info is required by libgio to properly detect mime types.
 Requires:       shared-mime-info
@@ -164,7 +153,6 @@ GIO provides a modern, easy-to-use VFS API.
 
 %package -n libgthread
 Summary:        General-Purpose Utility Library -- Library for Threads
-Group:          System/Libraries
 
 %description -n libgthread
 GLib is a general-purpose utility library, which provides many useful
@@ -176,7 +164,6 @@ software.
 
 %package -n libgobject
 Summary:        General-Purpose Utility Library -- Object-Oriented Framework for C
-Group:          System/Libraries
 
 %description -n libgobject
 GLib is a general-purpose utility library, which provides many useful
@@ -186,38 +173,33 @@ a main loop abstraction, and so on.
 The GObject library provides an object-oriented framework for C.
 
 %prep
-%setup -q -n %{_name}-%{version}
+%setup -q -n %{name}-%{version}
+cp %{SOURCE1001} .
 cp -a %{S:1} %{S:2} .
 cp -a %{S:4} gnome_defaults.conf
 if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then
     cp -a %{S:7} m4macros/
 fi
-%if 0%{?BUILD_FROM_VCS}
-NOCONFIGURE=1 ./autogen.sh
-%endif
 
 %build
-%autogen
+NOCONFIGURE=1 ./autogen.sh
 %configure \
     --enable-static \
 %if 0%{?with_systemtap}
     --enable-systemtap \
 %endif
+%if %{with kdbus}
+    --enable-kdbus \
+%endif
     --with-pcre=system
 
 %{__make} %{?_smp_mflags} V=1
-%if 0%{?BUILD_FROM_VCS}
-%{__make} ChangeLog
-%endif
 
-%check
-# make check does not work on x86_64. See http://bugzilla.gnome.org/show_bug.cgi?id=554969
-# %{__make} %{?jobs:-j%jobs} check
 
 %install
 %make_install
-%find_lang %{_name}20 %{?no_lang_C}
-mv %{_name}20.lang %{_name}2.lang
+%find_lang glib20 %{?no_lang_C}
+
 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
 install -D -m0644 glib2.sh %{buildroot}%{_sysconfdir}/profile.d/zzz-glib2.sh
 install -D -m0644 glib2.csh %{buildroot}%{_sysconfdir}/profile.d/zzz-glib2.csh
@@ -265,10 +247,10 @@ cp %{S:6} %{buildroot}%{_sysconfdir}/rpm
 
 
 %files tools
+%manifest %{name}.manifest
 %defattr(-,root,root)
 %dir %{_datadir}/bash-completion
 %dir %{_datadir}/bash-completion/completions
-%{_datadir}/bash-completion/completions/gdbus
 %{_datadir}/bash-completion/completions/gresource
 %{_datadir}/bash-completion/completions/gsettings
 %{_bindir}/gdbus
@@ -276,33 +258,40 @@ cp %{S:6} %{buildroot}%{_sysconfdir}/rpm
 %{_bindir}/glib-compile-schemas
 %{_bindir}/gresource
 %{_bindir}/gsettings
+%{_bindir}/gapplication
 # We put those files here, but they don't really belong here. They just don't
 # have a better home... The zzz-glib2 scripts could arguably be in
 # libglib but that would break the shared library policy.
 %{_sysconfdir}/profile.d/zzz-glib2.*
 
 %files -n gio-branding-upstream
+%manifest %{name}.manifest
 %defattr(-,root,root)
 %config (noreplace) %{_sysconfdir}/gnome_defaults.conf
 
 %files -n libglib
+%manifest %{name}.manifest
 %defattr(-, root, root)
-%doc COPYING
+%license COPYING
 %{_libdir}/libglib*.so.*
 
 %files -n libgmodule
+%manifest %{name}.manifest
 %defattr(-, root, root)
 %{_libdir}/libgmodule*.so.*
 
 %files -n libgobject
+%manifest %{name}.manifest
 %defattr(-, root, root)
 %{_libdir}/libgobject*.so.*
 
 %files -n libgthread
+%manifest %{name}.manifest
 %defattr(-, root, root)
 %{_libdir}/libgthread*.so.*
 
 %files -n libgio
+%manifest %{name}.manifest
 %defattr(-, root, root)
 %{_libdir}/libgio*.so.*
 %dir %{_libdir}/gio
@@ -318,14 +307,17 @@ cp %{S:6} %{buildroot}%{_sysconfdir}/rpm
 %ghost %{_localstatedir}/cache/gio-2.0/lxde-defaults.list
 
 
-%lang_package
+%lang_package -f glib20
 
-%docs_package
 
 %files devel
+%manifest %{name}.manifest
 %defattr(-,root,root)
-%doc ChangeLog
+
 %{_bindir}/gdbus-codegen
+%{_datadir}/bash-completion/completions/*
+%_datadir/glib-2.0/codegen
+
 %{_bindir}/glib-compile-resources
 %{_bindir}/glib-genmarshal
 %{_bindir}/glib-gettextize
@@ -345,8 +337,6 @@ cp %{S:6} %{buildroot}%{_sysconfdir}/rpm
 %{_includedir}/gio-unix-2.0
 %{_libdir}/lib*.so
 %dir %{_libdir}/glib-2.0/
-%dir %{_libdir}/gdbus-2.0/
-%{_libdir}/gdbus-2.0/codegen/
 %{_libdir}/glib-2.0/include/
 %{_libdir}/pkgconfig/*.pc
 %{_datadir}/gdb/auto-load/%{_libdir}/*-gdb.py
@@ -361,6 +351,7 @@ cp %{S:6} %{buildroot}%{_sysconfdir}/rpm
 %dir %{_datadir}/gdb/auto-load%{_libdir}
 
 %files devel-static
+%manifest %{name}.manifest
 %defattr(-,root,root)
 %{_libdir}/lib*.a