summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2011-07-14 12:28:47 +0200
committerMichael Schroeder <mls@suse.de>2011-07-14 12:28:47 +0200
commitcb91a45776f6efef02083a58c7a335fef82fa328 (patch)
tree4e05e1bdaea7207512b7edc62bce06b1ffab3790 /package
parentc4934b45d2b76cc445fe3915c0d7dbd00341119b (diff)
downloadlibsolv-cb91a45776f6efef02083a58c7a335fef82fa328.tar.gz
libsolv-cb91a45776f6efef02083a58c7a335fef82fa328.tar.bz2
libsolv-cb91a45776f6efef02083a58c7a335fef82fa328.zip
- build binding subpackages
Diffstat (limited to 'package')
-rw-r--r--package/libsolv.spec.in65
1 files changed, 63 insertions, 2 deletions
diff --git a/package/libsolv.spec.in b/package/libsolv.spec.in
index 610f17d..decffc2 100644
--- a/package/libsolv.spec.in
+++ b/package/libsolv.spec.in
@@ -8,13 +8,16 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Development/Libraries/C and C++
Prefix: /usr
-BuildRequires: doxygen
+%bcond_without perl_binding
+%bcond_without python_binding
+%bcond_without ruby_binding
+
%if 0%{?mandriva_version}
# force this version on mandriva
BuildRequires: libneon0.26-devel
%endif
%if 0%{?fedora_version}
-BuildRequires: db4-devel ruby ruby-rdoc
+BuildRequires: db4-devel
%endif
%if 0%{?suse_version}
%if 0%{?suse_version} < 1030
@@ -33,6 +36,18 @@ BuildRequires: expat-devel
%endif
BuildRequires: cmake rpm-devel gcc-c++
BuildRequires: zlib-devel
+
+%if %{with perl_binding}
+BuildRequires: perl
+%endif
+%if %{with ruby_binding}
+%global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"] ')}
+BuildRequires: ruby-devel
+%endif
+%if %{with python_binding}
+BuildRequires: python-devel
+%endif
+
Summary: A new approach to package dependency solving
@@ -103,6 +118,29 @@ Requires: gpg2
%description demo
Applications demoing the libsolv library.
+%package -n ruby-solv
+Summary: Ruby bindings for the libsolv library
+Group: Development/Languages/Ruby
+
+%description -n ruby-solv
+Ruby bindings for sat solver.
+
+%package -n python-solv
+%py_requires
+Summary: Python bindings for the libsolv library
+Group: Development/Languages/Python
+
+%description -n python-solv
+Python bindings for sat solver.
+
+%package -n perl-solv
+Requires: perl = %{perl_version}
+Summary: Perl bindings for the libsolv library
+Group: Development/Languages/Perl
+
+%description -n perl-solv
+Perl bindings for sat solver.
+
%prep
%setup -n libsolv-%{version}
@@ -120,6 +158,10 @@ cmake $CMAKE_FLAGS \
-DLIB=%{_lib} \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_BUILD_TYPE=Release \
+ %{?with_perl_binding:-DENABLE_PERL=1} \
+ %{?with_python_binding:-DENABLE_PYTHON=1} \
+ %{?with_ruby_binding:-DENABLE_RUBYL=1} \
+ -DUSE_VENDORDIRS=1 \
-DCMAKE_SKIP_RPATH=1
make %{?jobs:-j %jobs}
@@ -154,4 +196,23 @@ rm -rf "$RPM_BUILD_ROOT"
%defattr(-,root,root)
/usr/bin/solv
+%if %{with perl_binding}
+%files -n perl-solv
+%defattr(-,root,root)
+%{perl_vendorarch}/*
+%endif
+
+%if %{with ruby_binding}
+%files -n ruby-solv
+%defattr(-,root,root)
+%{ruby_vendorarch}/*
+%endif
+
+%if %{with python_binding}
+%files -n python-solv
+%{ruby_vendorarch}/*
+%defattr(-,root,root)
+%{py_sitedir}/*
+%endif
+
%changelog