File grilo.spec of Package grilo

#
# spec file for package grilo
#
# Copyright (c) 2012 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:           grilo
Version:        0.1.19
Release:        0
Summary:        Framework for browsing and searching media content
License:        LGPL-2.1+
Group:          Productivity/Multimedia/Other
Url:            https://live.gnome.org/Grilo
Source:         http://download.gnome.org/sources/grilo/0.1/%{name}-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  intltool
# Required to build documentation
BuildRequires:  gtk-doc
BuildRequires:  vala
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gmodule-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libsoup-2.4)
BuildRequires:  pkgconfig(libvala-0.16)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Grilo is a framework for browsing and searching media content from
various sources using a single API.

%package -n libgrilo-0_1-0
Summary:        Framework for browsing and searching media content
Group:          System/Libraries
# Without plugins, grilo is useless
Recommends:     grilo-plugins

%description -n libgrilo-0_1-0
Grilo is a framework for browsing and searching media content from
various sources using a single API.

%package -n typelib-1_0-Grl-0_1
Summary:        Framework for browsing and searching media content -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-Grl-0_1
Grilo is a framework for browsing and searching media content from
various sources using a single API.

This package provides the GObject Introspection bindings for the
libgrl library.

%package -n libgrlnet-0_1-0
Summary:        Framework for browsing and searching media content -- Networking Helper Library
Group:          System/Libraries

%description -n libgrlnet-0_1-0
Grilo is a framework for browsing and searching media content from
various sources using a single API.

%package -n typelib-1_0-GrlNet-0_1
Summary:        Framework for browsing and searching media content -- Networking Helper Library, Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-GrlNet-0_1
Grilo is a framework for browsing and searching media content from
various sources using a single API.

This package provides the GObject Introspection bindings for the
libgrlnet library.

%package tools
Summary:        Framework for browsing and searching media content -- Tools
Group:          Productivity/Multimedia/Other

%description tools
Grilo is a framework for browsing and searching media content from
various sources using a single API.

This package provides tools related to Grilo.

%package devel
Summary:        Framework for browsing and searching media content -- Development Files
Group:          Development/Libraries/GNOME
Requires:       libgrilo-0_1-0 = %{version}
Requires:       libgrlnet-0_1-0 = %{version}
Requires:       typelib-1_0-Grl-0_1 = %{version}
Requires:       typelib-1_0-GrlNet-0_1 = %{version}

%description devel
Grilo is a framework for browsing and searching media content from
various sources using a single API.

%prep
%setup -q

%build
%configure \
   --disable-static \
   --disable-tests \
   --enable-grl-net \
   --enable-gtk-doc
make %{?_smp_mflags}

%install
%make_install
find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print
# Create directories needed for plugins
install -d %{buildroot}%{_libdir}/grilo-0.1
install -d %{buildroot}%{_datadir}/grilo-0.1/plugins
%fdupes %{buildroot}%{_datadir}

%check
make check

%clean

%post -n libgrilo-0_1-0 -p /sbin/ldconfig

%postun -n libgrilo-0_1-0 -p /sbin/ldconfig

%post -n libgrlnet-0_1-0 -p /sbin/ldconfig

%postun -n libgrlnet-0_1-0 -p /sbin/ldconfig

%files -n libgrilo-0_1-0
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/libgrilo-0.1.so.*
# Directories needed for plugins
%dir %{_libdir}/grilo-0.1

%files -n typelib-1_0-Grl-0_1
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Grl-0.1.typelib

%files -n libgrlnet-0_1-0
%defattr(-,root,root)
%doc COPYING
%{_libdir}/libgrlnet-0.1.so.*

%files -n typelib-1_0-GrlNet-0_1
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GrlNet-0.1.typelib

%files tools
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_bindir}/grl-inspect-0.1
%{_bindir}/grilo-simple-playlist
%{_bindir}/grilo-test-ui-0.1
%{_mandir}/man1/grl-inspect.1%{?ext_man}

%files devel
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/grilo/
%{_includedir}/grilo-0.1/
%{_libdir}/*.so
%{_libdir}/pkgconfig/grilo-0.1.pc
%{_libdir}/pkgconfig/grilo-net-0.1.pc
%{_datadir}/gir-1.0/*.gir
%dir %{_datadir}/vala-0.16/
%dir %{_datadir}/vala-0.16/vapi/
%{_datadir}/vala-0.16/vapi/*.deps
%{_datadir}/vala-0.16/vapi/*.vapi

%changelog