5 Url: git://git.opensuse.org/projects/zypp/sat-solver.git
6 Source: satsolver-%{version}.tar.bz2
7 BuildRoot: %{_tmppath}/%{name}-%{version}-build
8 Group: Development/Libraries/C and C++
11 BuildRequires: doxygen
12 %if 0%{?mandriva_version}
13 # force this version on mandriva
14 BuildRequires: libneon0.26-devel
16 %if 0%{?fedora_version}
17 BuildRequires: perl-devel db4-devel ruby ruby-rdoc
20 %if 0%{?suse_version} < 1030
23 BuildRequires: libexpat-devel
25 %if 0%{?suse_version} < 1100
26 BuildRequires: graphviz
28 %if 0%{?suse_version} > 1020
32 BuildRequires: expat-devel
34 BuildRequires: cmake rpm-devel gcc-c++ ruby-devel swig perl python-devel
35 BuildRequires: zlib-devel
36 # the testsuite uses the check framework
37 BuildRequires: check-devel
38 Summary: A new approach to package dependency solving
40 #define some macros missing on fedora
41 %if 0%{?fedora_version}
42 %{!?py_sitedir: %define py_sitedir %(%__python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
43 %{!?py_requires: %define py_requires Requires: python}
44 %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
48 A new approach to package dependency solving
52 Michael Schroeder <mls@suse.de>
53 Klaus Kaempf <kkaempf@suse.de>
54 Stephan Kulow <coolo@suse.de>
55 Michael Matz <matz@suse.de>
56 Duncan Mac-Vicar P. <dmacvicar@suse.de>
59 Summary: A new approach to package dependency solving
60 Group: Development/Libraries/C and C++
61 Requires: satsolver-tools = %version
65 #Summary: satsolver developer documentation
66 #Group: Documentation/HTML
69 Development files for satsolver, a new approach to package dependency solving
71 #%description devel-doc
72 #Developer documentation for satsolver, a new approach to package dependency solving
77 Michael Schroeder <mls@suse.de>
78 Klaus Kaempf <kkaempf@suse.de>
79 Stephan Kulow <coolo@suse.de>
80 Michael Matz <matz@suse.de>
81 Duncan Mac-Vicar P. <dmacvicar@suse.de>
83 %package -n satsolver-tools
84 Summary: A new approach to package dependency solving
85 Group: Development/Libraries/C and C++
86 Obsoletes: libsatsolver <= 0.0.15
87 Provides: libsatsolver = %{version}-%{release}
88 Requires: gzip bzip2 coreutils
90 %description -n satsolver-tools
91 A new approach to package dependency solving.
94 Summary: Applications demoing the satsolver library
95 Group: System/Management
97 %if 0%{?fedora_version}
100 %if 0%{?suse_version}
105 Applications demoing the satsolver library.
107 %package -n ruby-satsolver
108 Summary: Ruby bindings for sat solver
109 Group: Development/Languages/Ruby
111 %description -n ruby-satsolver
112 Ruby bindings for sat solver.
114 %package -n python-satsolver
116 Summary: Python bindings for sat solver
117 Group: Development/Languages/Python
119 %description -n python-satsolver
120 Python bindings for sat solver.
122 %package -n perl-satsolver
123 Requires: perl = %{perl_version}
124 Summary: Perl bindings for sat solver
125 Group: Development/Languages/Perl
127 %description -n perl-satsolver
128 Perl bindings for sat solver.
132 %setup -n satsolver-%{version}
135 export CFLAGS="$RPM_OPT_FLAGS"
136 export CXXFLAGS="$CFLAGS"
139 %if 0%{?fedora_version}
140 CMAKE_FLAGS="-DFEDORA=1"
144 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
145 -DPYTHON_SITEDIR=%{py_sitedir} \
147 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
148 -DCMAKE_BUILD_TYPE=Release \
150 make %{?jobs:-j %jobs}
153 %if 0%{?run_testsuite}
159 make DESTDIR=$RPM_BUILD_ROOT install
160 # we want to leave the .a file untouched
161 export NO_BRP_STRIP_DEBUG=true
165 %if 0%{?suse_version} > 1020
166 # create symlinks for documentation
167 #%fdupes -s %{buildroot}%{_docdir}/ruby-satsolver
168 %fdupes -s bindings/ruby/html
172 rm -rf "$RPM_BUILD_ROOT"
174 %files -n satsolver-tools
175 %defattr(-,root,root)
177 %exclude /usr/bin/deptestomatic
178 %exclude /usr/bin/helix2solv
179 %exclude /usr/bin/solv
183 %defattr(-,root,root)
184 %_libdir/libsatsolver.a
185 %_libdir/libsatsolverext.a
186 %_libdir/libappsatsolver.a
187 %dir /usr/include/satsolver
188 /usr/include/satsolver/*
189 /usr/bin/deptestomatic
193 %defattr(-,root,root)
197 #%defattr(-,root,root)
198 #%dir %_docdir/satsolver
199 #%_docdir/satsolver/*
201 %files -n ruby-satsolver
202 %defattr(-,root,root,-)
203 %if 0%{?suse_version}
204 %if 0%{?suse_version} < 1100
205 %dir %{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}
206 %{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}/satsolver.so
208 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/satsolver.so
211 %if 0%{?mandriva_version}
212 %{ruby_sitearchdir}/satsolver.so
214 %if 0%{?fedora_version}
215 %{ruby_sitearch}/satsolver.so
217 %doc bindings/ruby/html
219 %files -n python-satsolver
220 %defattr(-,root,root,-)
221 #%doc swig/python/examples/*.py
222 %{py_sitedir}/_satsolver.so
223 %{py_sitedir}/satsolver.py*
225 %files -n perl-satsolver
226 %defattr(-,root,root,-)
227 %{perl_vendorarch}/satsolver.so
228 %{perl_vendorlib}/satsolver.pm