2 # spec file for package libsolv
4 # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
15 # Please submit bugfixes or comments via http://bugs.opensuse.org/
22 Url: git://gitorious.org/opensuse/libsolv.git
23 Source: libsolv-%{version}.tar.bz2
24 BuildRoot: %{_tmppath}/%{name}-%{version}-build
25 Group: Development/Libraries/C and C++
28 %bcond_without enable_static
29 %bcond_without disable_shared
30 %bcond_without perl_binding
31 %bcond_without python_binding
32 %bcond_without ruby_binding
34 %if 0%{?mandriva_version}
35 # force this version on mandriva
36 BuildRequires: libneon0.26-devel
38 %if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
39 BuildRequires: db4-devel
42 %if 0%{?suse_version} < 1030
45 BuildRequires: libexpat-devel
47 %if 0%{?suse_version} < 1100
48 BuildRequires: graphviz
50 %if 0%{?suse_version} > 1020
54 BuildRequires: expat-devel
56 BuildRequires: cmake rpm-devel gcc-c++
57 BuildRequires: zlib-devel
59 %if %{with perl_binding}
61 %if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
62 BuildRequires: perl-devel
66 %if %{with ruby_binding}
67 %if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
68 %global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')
70 %global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"]')
72 BuildRequires: ruby ruby-devel
75 %if %{with python_binding}
76 %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")
77 BuildRequires: python-devel
81 Summary: A new approach to package dependency solving
85 A new approach to package dependency solving
89 Michael Schroeder <mls@suse.de>
90 Klaus Kaempf <kkaempf@suse.de>
91 Stephan Kulow <coolo@suse.de>
92 Michael Matz <matz@suse.de>
93 Duncan Mac-Vicar P. <dmacvicar@suse.de>
95 %if !%{with disable_shared}
96 %package -n libsolv@LIBSOLV_SOVERSION@
97 Summary: A new approach to package dependency solving
98 Group: Development/Libraries/C and C++
100 %description -n libsolv@LIBSOLV_SOVERSION@
101 A new approach to package dependency solving
105 Michael Schroeder <mls@suse.de>
106 Klaus Kaempf <kkaempf@suse.de>
107 Stephan Kulow <coolo@suse.de>
108 Michael Matz <matz@suse.de>
109 Duncan Mac-Vicar P. <dmacvicar@suse.de>
113 Summary: A new approach to package dependency solving
114 Group: Development/Libraries/C and C++
115 Obsoletes: libsatsolver-devel < 0.18
116 Provides: libsatsolver-devel = 0.18
117 Requires: libsolv-tools = %version
118 %if !%{with disable_shared}
119 Requires: libsolv@LIBSOLV_SOVERSION@ = %version
124 Development files for libsolv, a new approach to package dependency solving
128 Michael Schroeder <mls@suse.de>
129 Klaus Kaempf <kkaempf@suse.de>
130 Stephan Kulow <coolo@suse.de>
131 Michael Matz <matz@suse.de>
132 Duncan Mac-Vicar P. <dmacvicar@suse.de>
135 Summary: A new approach to package dependency solving
136 Group: Development/Libraries/C and C++
137 Obsoletes: satsolver-tools < 0.18
138 Provides: satsolver-tools = 0.18
139 Requires: gzip bzip2 coreutils
142 A new approach to package dependency solving.
145 Summary: Applications demoing the libsolv library
146 Group: System/Management
148 %if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
151 %if 0%{?suse_version}
156 Applications demoing the libsolv library.
158 %package -n ruby-solv
159 Summary: Ruby bindings for the libsolv library
160 Group: Development/Languages/Ruby
162 %description -n ruby-solv
163 Ruby bindings for sat solver.
165 %package -n python-solv
166 %if 0%{?py_requires:1}
169 Summary: Python bindings for the libsolv library
170 Group: Development/Languages/Python
172 %description -n python-solv
173 Python bindings for sat solver.
175 %package -n perl-solv
176 Requires: perl = %{perl_version}
177 Summary: Perl bindings for the libsolv library
178 Group: Development/Languages/Perl
180 %description -n perl-solv
181 Perl bindings for sat solver.
184 %setup -n libsolv-%{version}
187 export CFLAGS="$RPM_OPT_FLAGS"
188 export CXXFLAGS="$CFLAGS"
191 %if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
192 CMAKE_FLAGS="-DFEDORA=1"
196 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
198 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
199 -DCMAKE_BUILD_TYPE=Release \
200 %{?with_enable_static:-DENABLE_STATIC=1} \
201 %{?with_disable_shared:-DDISABLE_SHARED=1} \
202 %{?with_perl_binding:-DENABLE_PERL=1} \
203 %{?with_python_binding:-DENABLE_PYTHON=1} \
204 %{?with_ruby_binding:-DENABLE_RUBY=1} \
207 make %{?jobs:-j %jobs}
210 make DESTDIR=$RPM_BUILD_ROOT install
211 %if %{with python_binding}
212 %if 0%{?suse_version}
213 pushd $RPM_BUILD_ROOT/%{python_sitearch}
214 python %py_libdir/py_compile.py *.py
215 python -O %py_libdir/py_compile.py *.py
219 # we want to leave the .a file untouched
220 export NO_BRP_STRIP_DEBUG=true
223 rm -rf "$RPM_BUILD_ROOT"
225 %if !%{with disable_shared}
226 %post -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
228 %postun -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
230 %files -n libsolv@LIBSOLV_SOVERSION@
231 %defattr(-,root,root)
233 %{_libdir}/libsolv.so.*
234 %{_libdir}/libsolvext.so.*
238 %defattr(-,root,root)
239 %exclude %{_bindir}/helix2solv
240 %exclude %{_bindir}/solv
244 %defattr(-,root,root)
245 %if %{with enable_static}
247 %{_libdir}/libsolvext.a
249 %if !%{with disable_shared}
250 %{_libdir}/libsolv.so
251 %{_libdir}/libsolvext.so
254 %{_bindir}/helix2solv
255 %{_datadir}/cmake/Modules/*
258 %defattr(-,root,root)
261 %if %{with perl_binding}
263 %defattr(-,root,root)
267 %if %{with ruby_binding}
269 %defattr(-,root,root)
273 %if %{with python_binding}
274 %files -n python-solv
275 %defattr(-,root,root)