File monodevelop-database.spec of Package monodevelop-database

#
# spec file for package monodevelop-database
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define db_packages mono-data-oracle mono-data-sqlite

Name:           monodevelop-database
Version:        5.10
Release:        0
License:        MIT
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Url:            http://www.monodevelop.com
Source:         http://download.mono-project.com/sources/%{name}/%{name}-%{version}.0.871.tar.bz2
BuildRequires:  %db_packages
BuildRequires:  pkgconfig(mono)
BuildRequires:  pkgconfig(mono-addins)
BuildRequires:  pkgconfig(monodevelop) >= %{version}
BuildRequires:  pkgconfig(monodoc)
Requires:       %db_packages
Summary:        Monodevelop Database Addin
Group:          Development/Languages/Mono

# TODO: Fix mono dependencies generator (monodevelop package also need this fix).
# For now just copy deps generator code from monodevelop package (this will fail with monodis execution), and add direct monodevelop depencency
Requires:       monodevelop >= %{version}
%define _use_internal_dependency_generator 0
%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-provides ; } | sort | uniq'
%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-requires ; } | sort | uniq'

%description
Addin for MonoDevelop for an integrated database explorer and editor.

%package devel
Summary:        Development files for MonoDevelop Database
Group:          Development/Languages/Mono
Requires:       monodevelop-database = %{version}

%description devel
The pkgconfig file for MonoDevelop Database.

%prep
%setup -q

%build
%{?env_options}
./configure --prefix=%{_prefix}
make

%install
%{?env_options}
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_datadir}/pkgconfig
mv %{buildroot}%{_prefix}/lib/pkgconfig/*.pc %{buildroot}%{_datadir}/pkgconfig
%{find_lang} %{name}

%files -f %{name}.lang
%defattr(-, root, root)
%{_prefix}/lib/monodevelop/AddIns/MonoDevelop.Database

%files devel
%defattr(-,root,root)
%{_datadir}/pkgconfig/monodevelop-database.pc

%changelog