6 Url: http://svn.opensuse.org/svn/zypp/trunk/sat-solver
7 Source: satsolver-%{version}.tar.bz2
8 BuildRoot: %{_tmppath}/%{name}-%{version}-build
9 Group: Development/Libraries/C and C++
12 BuildRequires: doxygen
13 %if 0%{?mandriva_version}
14 # force this version on mandriva
15 BuildRequires: libneon0.26-devel
17 %if 0%{?fedora_version}
18 BuildRequires: perl-devel
21 %if 0%{?suse_version} < 1030
24 BuildRequires: libexpat-devel
26 %if 0%{?suse_version} < 1100
27 BuildRequires: graphviz
29 %if 0%{?suse_version} > 1020
33 BuildRequires: expat-devel
35 BuildRequires: cmake rpm-devel gcc-c++ ruby-devel swig perl python-devel
36 BuildRequires: zlib-devel
37 # the testsuite uses the check framework
38 BuildRequires: check-devel
39 Summary: A new approach to package dependency solving
41 #define some macros missing on fedora
42 %if 0%{?fedora_version}
43 %{!?py_sitedir: %define py_sitedir %(%__python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
44 %{!?py_requires: %define py_requires Requires: python}
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
74 %package -n satsolver-tools
75 Summary: A new approach to package dependency solving
77 Obsoletes: libsatsolver <= 0.0.15
78 Provides: libsatsolver = %{version}-%{release}
79 Requires: gzip bzip2 coreutils
81 %description -n satsolver-tools
82 A new approach to package dependency solving
84 %package -n ruby-satsolver
85 Summary: Ruby bindings for sat solver
86 Group: Development/Languages/Ruby
88 %description -n ruby-satsolver
89 A new approach to package dependency solving
92 %package -n python-satsolver
94 Summary: Python bindings for satsolver
95 Group: Development/Libraries/C and C++
97 %description -n python-satsolver
98 This allows to use satsolver functionality from Python
100 %package -n perl-satsolver
101 Requires: perl = %{perl_version}
102 Summary: A new approach to package dependency solving
103 Group: Development/Libraries/C and C++
105 %description -n perl-satsolver
106 A new approach to package dependency solving
109 %setup -n satsolver-%{version}
112 export CFLAGS="$RPM_OPT_FLAGS"
113 export CXXFLAGS="$CFLAGS"
115 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
116 -DPYTHON_SITEDIR=%{py_sitedir} \
118 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
119 -DCMAKE_BUILD_TYPE=Release \
121 make %{?jobs:-j %jobs}
124 %if 0%{?run_testsuite}
130 make DESTDIR=$RPM_BUILD_ROOT install
131 # we want to leave the .a file untouched
132 export NO_BRP_STRIP_DEBUG=true
136 %if 0%{?suse_version} > 1020
137 # create symlinks for documentation
138 #%fdupes -s %{buildroot}%{_docdir}/ruby-satsolver
139 %fdupes -s bindings/ruby/html
143 rm -rf "$RPM_BUILD_ROOT"
145 %files -n satsolver-tools
146 %defattr(-,root,root)
148 %exclude /usr/bin/deptestomatic
149 %exclude /usr/bin/helix2solv
153 %defattr(-,root,root)
154 %_libdir/libsatsolver.a
155 %_libdir/libsatsolverext.a
156 %_libdir/libappsatsolver.a
157 %dir /usr/include/satsolver
158 /usr/include/satsolver/*
159 /usr/bin/deptestomatic
163 #%defattr(-,root,root)
164 #%dir %_docdir/satsolver
165 #%_docdir/satsolver/*
167 %files -n ruby-satsolver
168 %defattr(-,root,root,-)
169 %if 0%{?suse_version}
170 %if 0%{?suse_version} < 1100
171 %dir %{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}
172 %{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}/satsolver.so
174 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/satsolver.so
177 %if 0%{?mandriva_version}
178 %{ruby_sitearchdir}/satsolver.so
180 %doc bindings/ruby/html
182 %files -n python-satsolver
183 %defattr(-,root,root,-)
184 #%doc swig/python/examples/*.py
185 %{py_sitedir}/_satsolver.so
186 %{py_sitedir}/satsolver.py*
188 %files -n perl-satsolver
189 %defattr(-,root,root,-)
190 %{perl_vendorarch}/satsolver.so
191 %{perl_vendorlib}/satsolver.pm