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_with enable_static
12 %bcond_with 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 Requires: libsolv-tools = %version
99 %if !%{with disable_shared}
100 Requires: libsolv@LIBSOLV_SOVERSION@ = %version
105 Development files for libsolv, a new approach to package dependency solving
109 Michael Schroeder <mls@suse.de>
110 Klaus Kaempf <kkaempf@suse.de>
111 Stephan Kulow <coolo@suse.de>
112 Michael Matz <matz@suse.de>
113 Duncan Mac-Vicar P. <dmacvicar@suse.de>
116 Summary: A new approach to package dependency solving
117 Group: Development/Libraries/C and C++
118 Obsoletes: libsatsolver <= 0.0.15
119 Provides: libsatsolver = %{version}-%{release}
120 Requires: gzip bzip2 coreutils
123 A new approach to package dependency solving.
126 Summary: Applications demoing the libsolv library
127 Group: System/Management
129 %if 0%{?fedora_version}
132 %if 0%{?suse_version}
137 Applications demoing the libsolv library.
139 %package -n ruby-solv
140 Summary: Ruby bindings for the libsolv library
141 Group: Development/Languages/Ruby
143 %description -n ruby-solv
144 Ruby bindings for sat solver.
146 %package -n python-solv
147 %if 0%{?py_requires:1}
150 Summary: Python bindings for the libsolv library
151 Group: Development/Languages/Python
153 %description -n python-solv
154 Python bindings for sat solver.
156 %package -n perl-solv
157 Requires: perl = %{perl_version}
158 Summary: Perl bindings for the libsolv library
159 Group: Development/Languages/Perl
161 %description -n perl-solv
162 Perl bindings for sat solver.
165 %setup -n libsolv-%{version}
168 export CFLAGS="$RPM_OPT_FLAGS"
169 export CXXFLAGS="$CFLAGS"
172 %if 0%{?fedora_version}
173 CMAKE_FLAGS="-DFEDORA=1"
177 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
179 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
180 -DCMAKE_BUILD_TYPE=Release \
181 %{?with_enable_static:-DENABLE_STATIC=1} \
182 %{?with_disable_shared:-DDISABLE_SHARED=1} \
183 %{?with_perl_binding:-DENABLE_PERL=1} \
184 %{?with_python_binding:-DENABLE_PYTHON=1} \
185 %{?with_ruby_binding:-DENABLE_RUBY=1} \
188 make %{?jobs:-j %jobs}
191 make DESTDIR=$RPM_BUILD_ROOT install
192 %if %{with python_binding}
193 %if 0%{?suse_version}
194 pushd $RPM_BUILD_ROOT/%{python_sitearch}
195 python %py_libdir/py_compile.py *.py
196 python -O %py_libdir/py_compile.py *.py
200 # we want to leave the .a file untouched
201 export NO_BRP_STRIP_DEBUG=true
204 rm -rf "$RPM_BUILD_ROOT"
206 %if !%{with disable_shared}
207 %post -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
209 %postun -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
211 %files -n libsolv@LIBSOLV_SOVERSION@
212 %defattr(-,root,root)
214 %_libdir/libsolv.so.*
215 %_libdir/libsolvext.so.*
219 %defattr(-,root,root)
220 %exclude /usr/bin/helix2solv
221 %exclude /usr/bin/solv
225 %defattr(-,root,root)
227 %_libdir/libsolvext.so
232 %defattr(-,root,root)
235 %if %{with perl_binding}
237 %defattr(-,root,root)
241 %if %{with ruby_binding}
243 %defattr(-,root,root)
247 %if %{with python_binding}
248 %files -n python-solv
249 %defattr(-,root,root)