5 Url: git://gitorious.org/opensuse/libsolv.git
6 Source: libsolv-%{version}.tar.bz2
7 BuildRoot: %{_tmppath}/%{name}-%{version}-build
8 Group: Development/Libraries/C and C++
11 %bcond_without enable_static
12 %bcond_without disable_shared
13 %bcond_without perl_binding
14 %bcond_without python_binding
15 %bcond_without ruby_binding
17 %if 0%{?mandriva_version}
18 # force this version on mandriva
19 BuildRequires: libneon0.26-devel
21 %if 0%{?fedora_version}
22 BuildRequires: db4-devel
25 %if 0%{?suse_version} < 1030
28 BuildRequires: libexpat-devel
30 %if 0%{?suse_version} < 1100
31 BuildRequires: graphviz
33 %if 0%{?suse_version} > 1020
37 BuildRequires: expat-devel
39 BuildRequires: cmake rpm-devel gcc-c++
40 BuildRequires: zlib-devel
42 %if %{with perl_binding}
44 %if 0%{?fedora_version}
45 BuildRequires: perl-devel
49 %if %{with ruby_binding}
50 %if 0%{?fedora_version}
51 %global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')
53 %global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"]')
55 BuildRequires: ruby ruby-devel
58 %if %{with python_binding}
59 %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")
60 BuildRequires: python-devel
64 Summary: A new approach to package dependency solving
68 A new approach to package dependency solving
72 Michael Schroeder <mls@suse.de>
73 Klaus Kaempf <kkaempf@suse.de>
74 Stephan Kulow <coolo@suse.de>
75 Michael Matz <matz@suse.de>
76 Duncan Mac-Vicar P. <dmacvicar@suse.de>
78 %if !%{with disable_shared}
79 %package -n libsolv@LIBSOLV_SOVERSION@
80 Summary: A new approach to package dependency solving
81 Group: Development/Libraries/C and C++
83 %description -n libsolv@LIBSOLV_SOVERSION@
84 A new approach to package dependency solving
88 Michael Schroeder <mls@suse.de>
89 Klaus Kaempf <kkaempf@suse.de>
90 Stephan Kulow <coolo@suse.de>
91 Michael Matz <matz@suse.de>
92 Duncan Mac-Vicar P. <dmacvicar@suse.de>
96 Summary: A new approach to package dependency solving
97 Group: Development/Libraries/C and C++
98 Obsoletes: libsatsolver-devel < 0.18
99 Provides: libsatsolver-devel = 0.18
100 Requires: libsolv-tools = %version
101 %if !%{with disable_shared}
102 Requires: libsolv@LIBSOLV_SOVERSION@ = %version
107 Development files for libsolv, a new approach to package dependency solving
111 Michael Schroeder <mls@suse.de>
112 Klaus Kaempf <kkaempf@suse.de>
113 Stephan Kulow <coolo@suse.de>
114 Michael Matz <matz@suse.de>
115 Duncan Mac-Vicar P. <dmacvicar@suse.de>
118 Summary: A new approach to package dependency solving
119 Group: Development/Libraries/C and C++
120 Obsoletes: satsolver-tools < 0.18
121 Provides: satsolver-tools = 0.18
122 Requires: gzip bzip2 coreutils
125 A new approach to package dependency solving.
128 Summary: Applications demoing the libsolv library
129 Group: System/Management
131 %if 0%{?fedora_version}
134 %if 0%{?suse_version}
139 Applications demoing the libsolv library.
141 %package -n ruby-solv
142 Summary: Ruby bindings for the libsolv library
143 Group: Development/Languages/Ruby
145 %description -n ruby-solv
146 Ruby bindings for sat solver.
148 %package -n python-solv
149 %if 0%{?py_requires:1}
152 Summary: Python bindings for the libsolv library
153 Group: Development/Languages/Python
155 %description -n python-solv
156 Python bindings for sat solver.
158 %package -n perl-solv
159 Requires: perl = %{perl_version}
160 Summary: Perl bindings for the libsolv library
161 Group: Development/Languages/Perl
163 %description -n perl-solv
164 Perl bindings for sat solver.
167 %setup -n libsolv-%{version}
170 export CFLAGS="$RPM_OPT_FLAGS"
171 export CXXFLAGS="$CFLAGS"
174 %if 0%{?fedora_version}
175 CMAKE_FLAGS="-DFEDORA=1"
179 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
181 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
182 -DCMAKE_BUILD_TYPE=Release \
183 %{?with_enable_static:-DENABLE_STATIC=1} \
184 %{?with_disable_shared:-DDISABLE_SHARED=1} \
185 %{?with_perl_binding:-DENABLE_PERL=1} \
186 %{?with_python_binding:-DENABLE_PYTHON=1} \
187 %{?with_ruby_binding:-DENABLE_RUBY=1} \
190 make %{?jobs:-j %jobs}
193 make DESTDIR=$RPM_BUILD_ROOT install
194 %if %{with python_binding}
195 %if 0%{?suse_version}
196 pushd $RPM_BUILD_ROOT/%{python_sitearch}
197 python %py_libdir/py_compile.py *.py
198 python -O %py_libdir/py_compile.py *.py
202 # we want to leave the .a file untouched
203 export NO_BRP_STRIP_DEBUG=true
206 rm -rf "$RPM_BUILD_ROOT"
208 %if !%{with disable_shared}
209 %post -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
211 %postun -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
213 %files -n libsolv@LIBSOLV_SOVERSION@
214 %defattr(-,root,root)
216 %{_libdir}/libsolv.so.*
217 %{_libdir}/libsolvext.so.*
221 %defattr(-,root,root)
222 %exclude %{_bindir}/helix2solv
223 %exclude %{_bindir}/solv
227 %defattr(-,root,root)
228 %if %{with enable_static}
230 %{_libdir}/libsolvext.a
232 %if !%{with disable_shared}
233 %{_libdir}/libsolv.so
234 %{_libdir}/libsolvext.so
237 %{_bindir}/helix2solv
238 %{_datadir}/cmake/Modules/*
241 %defattr(-,root,root)
244 %if %{with perl_binding}
246 %defattr(-,root,root)
250 %if %{with ruby_binding}
252 %defattr(-,root,root)
256 %if %{with python_binding}
257 %files -n python-solv
258 %defattr(-,root,root)