1 %if 0%{?fedora_version}
2 %{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')}
3 %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
10 Url: git://git.opensuse.org/projects/zypp/sat-solver.git
11 Source: satsolver-%{version}.tar.bz2
12 BuildRoot: %{_tmppath}/%{name}-%{version}-build
13 Group: Development/Libraries/C and C++
16 BuildRequires: doxygen
17 %if 0%{?mandriva_version}
18 # force this version on mandriva
19 BuildRequires: libneon0.26-devel
21 %if 0%{?fedora_version}
22 BuildRequires: perl-devel db4-devel ruby ruby-rdoc
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++ ruby-devel swig perl python-devel
40 BuildRequires: zlib-devel
41 # the testsuite uses the check framework
42 BuildRequires: check-devel
43 Summary: A new approach to package dependency solving
45 #define some macros missing on fedora
46 %if 0%{?fedora_version}
47 %{!?py_sitedir: %define py_sitedir %(%__python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
48 %{!?py_requires: %define py_requires Requires: python}
49 %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
53 A new approach to package dependency solving
57 Michael Schroeder <mls@suse.de>
58 Klaus Kaempf <kkaempf@suse.de>
59 Stephan Kulow <coolo@suse.de>
60 Michael Matz <matz@suse.de>
61 Duncan Mac-Vicar P. <dmacvicar@suse.de>
64 Summary: A new approach to package dependency solving
65 Group: Development/Libraries/C and C++
66 Requires: satsolver-tools = %version
70 #Summary: satsolver developer documentation
71 #Group: Documentation/HTML
74 Development files for satsolver, a new approach to package dependency solving
76 #%description devel-doc
77 #Developer documentation for satsolver, a new approach to package dependency solving
82 Michael Schroeder <mls@suse.de>
83 Klaus Kaempf <kkaempf@suse.de>
84 Stephan Kulow <coolo@suse.de>
85 Michael Matz <matz@suse.de>
86 Duncan Mac-Vicar P. <dmacvicar@suse.de>
88 %package -n satsolver-tools
89 Summary: A new approach to package dependency solving
90 Group: Development/Libraries/C and C++
91 Obsoletes: libsatsolver <= 0.0.15
92 Provides: libsatsolver = %{version}-%{release}
93 Requires: gzip bzip2 coreutils
95 %description -n satsolver-tools
96 A new approach to package dependency solving.
99 Summary: Applications demoing the satsolver library
100 Group: System/Management
102 %if 0%{?fedora_version}
105 %if 0%{?suse_version}
110 Applications demoing the satsolver library.
112 %package -n ruby-satsolver
113 Summary: Ruby bindings for sat solver
114 Group: Development/Languages/Ruby
116 %description -n ruby-satsolver
117 Ruby bindings for sat solver.
119 %package -n python-satsolver
121 Summary: Python bindings for sat solver
122 Group: Development/Languages/Python
124 %description -n python-satsolver
125 Python bindings for sat solver.
127 %package -n perl-satsolver
128 Requires: perl = %{perl_version}
129 Summary: Perl bindings for sat solver
130 Group: Development/Languages/Perl
132 %description -n perl-satsolver
133 Perl bindings for sat solver.
137 %setup -n satsolver-%{version}
140 export CFLAGS="$RPM_OPT_FLAGS"
141 export CXXFLAGS="$CFLAGS"
144 %if 0%{?fedora_version}
145 CMAKE_FLAGS="-DFEDORA=1"
149 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
150 -DPYTHON_SITEDIR=%{py_sitedir} \
152 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
153 -DCMAKE_BUILD_TYPE=Release \
155 make %{?jobs:-j %jobs}
158 %if 0%{?run_testsuite}
164 make DESTDIR=$RPM_BUILD_ROOT install
165 # we want to leave the .a file untouched
166 export NO_BRP_STRIP_DEBUG=true
170 %if 0%{?suse_version} > 1020
171 # create symlinks for documentation
172 #%fdupes -s %{buildroot}%{_docdir}/ruby-satsolver
173 %fdupes -s bindings/ruby/html
177 rm -rf "$RPM_BUILD_ROOT"
179 %files -n satsolver-tools
180 %defattr(-,root,root)
182 %exclude /usr/bin/deptestomatic
183 %exclude /usr/bin/helix2solv
184 %exclude /usr/bin/solv
188 %defattr(-,root,root)
189 %_libdir/libsatsolver.a
190 %_libdir/libsatsolverext.a
191 %_libdir/libappsatsolver.a
192 %dir /usr/include/satsolver
193 /usr/include/satsolver/*
194 /usr/bin/deptestomatic
198 %defattr(-,root,root)
202 #%defattr(-,root,root)
203 #%dir %_docdir/satsolver
204 #%_docdir/satsolver/*
206 %files -n ruby-satsolver
207 %defattr(-,root,root,-)
208 %if 0%{?suse_version}
209 %if 0%{?suse_version} < 1010
210 %dir %{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}
211 %dir %{_libdir}/ruby/site_ruby/%{rb_ver}/satsolver
212 %{_libdir}/ruby/site_ruby/%{rb_ver}/satsolver/*.rb
213 %{_libdir}/ruby/site_ruby/%{rb_ver}/satsolver.rb
214 %{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}/satsolver.so
216 %dir %{_libdir}/ruby/vendor_ruby/%{rb_ver}/satsolver
217 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/satsolver/*.rb
218 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/satsolver.rb
219 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/satsolver.so
222 %if 0%{?mandriva_version}
223 %dir %{ruby_sitelibdir}/satsolver
224 %{ruby_sitelibdir}/satsolver.rb
225 %{ruby_sitearchdir}/satsolver.so
227 %if 0%{?fedora_version}
228 %dir %{ruby_sitelib}/satsolver
229 %{ruby_sitelib}/satsolver.rb
230 %{ruby_sitearch}/satsolver.so
232 %doc bindings/ruby/html
234 %files -n python-satsolver
235 %defattr(-,root,root,-)
236 #%doc swig/python/examples/*.py
237 %{py_sitedir}/_satsolver.so
238 %{py_sitedir}/satsolver.py*
240 %files -n perl-satsolver
241 %defattr(-,root,root,-)
242 %{perl_vendorarch}/satsolver.so
243 %{perl_vendorlib}/satsolver.pm