gobject-introspection/gobject-introspection.spec

166 lines
5.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package gobject-introspection
#
# Copyright (c) 2011 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 http://bugs.opensuse.org/
#
Name: gobject-introspection
Version: 1.31.6
Release: 0
# FIXME: when bgo#629930 gets fixed, move the appropriate pkg-config files to the main package and rename the devel package to libgirepository-devel
Summary: GObject Introspection Tools
License: LGPL-2.1+
Group: Development/Libraries/GNOME
Url: http://live.gnome.org/GObjectIntrospection
Source0: http://download.gnome.org/sources/gobject-introspection/1.31/%{name}-%{version}.tar.xz
# gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires.
Source1: gi-find-deps.sh
Source2: gobjectintrospection.attr
Source3: gobject-introspection-typelib.template
Source99: %{name}-rpmlintrc
# PATCH-FIX-UPSTREAM g-ir-dep-tool.patch bgo#665672 dimstar@opensuse.org -- Add g-ir-dep-tool to get further automatic dependencies.
Patch0: g-ir-dep-tool.patch
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: libffi-devel
# needed for patch0
BuildRequires: libtool
BuildRequires: python-devel
BuildRequires: python-xml
# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467
BuildRequires: xz
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(gobject-2.0)
%if 0%{?BUILD_FROM_VCS}
BuildRequires: gnome-common
BuildRequires: gtk-doc
%endif
Requires: libgirepository-1_0-1 = %{version}
Requires: python-xml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The goal of the project is to describe the APIs and collect them in
a uniform, machine readable format.
%package -n libgirepository-1_0-1
Summary: GObject Introspection Library
# Provide typelib() symbols based on gobject-introspection-typelib.template
# The template is checked during install if it matches the installed *.typelib files.
%(cat %{S:3} | awk '{ print "Provides: " $0}')
%description -n libgirepository-1_0-1
The goal of the project is to describe the APIs and collect them in
a uniform, machine readable format.
%package devel
Summary: GObject Introspection Development Files
# Note: the devel package requires the binaries, not just the library
Requires: %{name} = %{version}
Requires: libffi-devel
%description devel
The goal of the project is to describe the APIs and collect them in
a uniform, machine readable format.
%prep
%setup -q
%patch0 -p1
%if 0%{?BUILD_FROM_VCS}
[ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh
%endif
%build
# needed for patch0
autoreconf -fi
%configure \
%if 0%{?BUILD_FROM_VCS}
--enable-gtk-doc \
%endif
--disable-static
%__make %{?_smp_mflags} V=1
%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print
install -D %{S:1} %{buildroot}%{_rpmconfigdir}/gi-find-deps.sh
install -D %{S:2} -m 0644 %{buildroot}%{_rpmconfigdir}/fileattrs/gobjectintrospection.attr
# comparing, if we provide all the symbols expected.
ls %{buildroot}%{_libdir}/girepository-1.0/*.typelib | sh %{S:1} -P > gobject-introspection-typelib.installed
diff -s %{S:3} gobject-introspection-typelib.installed
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%post -n libgirepository-1_0-1 -p /sbin/ldconfig
%postun -n libgirepository-1_0-1 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS CONTRIBUTORS COPYING COPYING.GPL NEWS README TODO
%{_bindir}/g-ir-annotation-tool
%{_bindir}/g-ir-compiler
%{_bindir}/g-ir-dep-tool
%{_bindir}/g-ir-doc-tool
%{_bindir}/g-ir-generate
%{_bindir}/g-ir-scanner
%doc %{_mandir}/man1/g-ir-compiler.1*
%doc %{_mandir}/man1/g-ir-generate.1*
%doc %{_mandir}/man1/g-ir-scanner.1*
%{_datadir}/aclocal/introspection.m4
%{_datadir}/gir-1.0/*.gir
# We don't include directly %%{_libdir}/gobject-introspection since there might
# be files there in the future that belong to the library package
%dir %{_libdir}/gobject-introspection
%{_libdir}/gobject-introspection/giscanner/
# We explicitly list the content of the directory that is of interest to us,
# since there might be files there in the future that belong to the library
# package
%dir %{_datadir}/gobject-introspection-1.0
%{_datadir}/gobject-introspection-1.0/Makefile.introspection
%{_datadir}/gobject-introspection-1.0/tests/
%{_datadir}/gobject-introspection-1.0/gdump.c
%{_rpmconfigdir}/gi-find-deps.sh
%if 0%{suse_version} <= 1140
# This was not in old versions of rpm
%dir %{_rpmconfigdir}/fileattrs
%endif
%{_rpmconfigdir}/fileattrs/gobjectintrospection.attr
%files -n libgirepository-1_0-1
%defattr(-,root,root)
%doc COPYING.LGPL
# We own this directory here instead of devel to make sure other packages do
# not have to own it
%dir %{_datadir}/gir-1.0
%{_libdir}/libgirepository-1.0.so.*
%{_libdir}/girepository-1.0/
%files devel
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/gi/
%{_includedir}/gobject-introspection-1.0/
%{_libdir}/libgirepository-1.0.so
# FIXME: those two files should be moved to the main package when bgo#629930 gets fixed
%{_libdir}/pkgconfig/gobject-introspection-1.0.pc
%{_libdir}/pkgconfig/gobject-introspection-no-export-1.0.pc
%changelog