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}
46 %if %{with ruby_binding}
47 %global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"]')
48 BuildRequires: ruby ruby-devel
51 %if %{with python_binding}
52 BuildRequires: python-devel
56 Summary: A new approach to package dependency solving
60 A new approach to package dependency solving
64 Michael Schroeder <mls@suse.de>
65 Klaus Kaempf <kkaempf@suse.de>
66 Stephan Kulow <coolo@suse.de>
67 Michael Matz <matz@suse.de>
68 Duncan Mac-Vicar P. <dmacvicar@suse.de>
70 %if !%{with disable_shared}
71 %package -n libsolv@LIBSOLV_SOVERSION@
72 Summary: A new approach to package dependency solving
73 Group: Development/Libraries/C and C++
75 %description -n libsolv@LIBSOLV_SOVERSION@
76 A new approach to package dependency solving
80 Michael Schroeder <mls@suse.de>
81 Klaus Kaempf <kkaempf@suse.de>
82 Stephan Kulow <coolo@suse.de>
83 Michael Matz <matz@suse.de>
84 Duncan Mac-Vicar P. <dmacvicar@suse.de>
88 Summary: A new approach to package dependency solving
89 Group: Development/Libraries/C and C++
90 Requires: libsolv-tools = %version
91 %if !%{with disable_shared}
92 Requires: libsolv@LIBSOLV_SOVERSION@ = %version
97 Development files for libsolv, a new approach to package dependency solving
101 Michael Schroeder <mls@suse.de>
102 Klaus Kaempf <kkaempf@suse.de>
103 Stephan Kulow <coolo@suse.de>
104 Michael Matz <matz@suse.de>
105 Duncan Mac-Vicar P. <dmacvicar@suse.de>
108 Summary: A new approach to package dependency solving
109 Group: Development/Libraries/C and C++
110 Obsoletes: libsatsolver <= 0.0.15
111 Provides: libsatsolver = %{version}-%{release}
112 Requires: gzip bzip2 coreutils
115 A new approach to package dependency solving.
118 Summary: Applications demoing the libsolv library
119 Group: System/Management
121 %if 0%{?fedora_version}
124 %if 0%{?suse_version}
129 Applications demoing the libsolv library.
131 %package -n ruby-solv
132 Summary: Ruby bindings for the libsolv library
133 Group: Development/Languages/Ruby
135 %description -n ruby-solv
136 Ruby bindings for sat solver.
138 %package -n python-solv
139 %if 0%{?py_requires:1}
142 Summary: Python bindings for the libsolv library
143 Group: Development/Languages/Python
145 %description -n python-solv
146 Python bindings for sat solver.
148 %package -n perl-solv
149 Requires: perl = %{perl_version}
150 Summary: Perl bindings for the libsolv library
151 Group: Development/Languages/Perl
153 %description -n perl-solv
154 Perl bindings for sat solver.
157 %setup -n libsolv-%{version}
160 export CFLAGS="$RPM_OPT_FLAGS"
161 export CXXFLAGS="$CFLAGS"
164 %if 0%{?fedora_version}
165 CMAKE_FLAGS="-DFEDORA=1"
169 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
171 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
172 -DCMAKE_BUILD_TYPE=Release \
173 %{?with_enable_static:-DENABLE_STATIC=1} \
174 %{?with_disable_shared:-DDISABLE_SHARED=1} \
175 %{?with_perl_binding:-DENABLE_PERL=1} \
176 %{?with_python_binding:-DENABLE_PYTHON=1} \
177 %{?with_ruby_binding:-DENABLE_RUBY=1} \
180 make %{?jobs:-j %jobs}
183 make DESTDIR=$RPM_BUILD_ROOT install
184 %if %{with python_binding}
185 pushd $RPM_BUILD_ROOT/%{py_sitedir}
186 python %py_libdir/py_compile.py *.py
187 python -O %py_libdir/py_compile.py *.py
190 # we want to leave the .a file untouched
191 export NO_BRP_STRIP_DEBUG=true
194 rm -rf "$RPM_BUILD_ROOT"
196 %if !%{with disable_shared}
197 %post -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
199 %postun -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
201 %files -n libsolv@LIBSOLV_SOVERSION@
202 %defattr(-,root,root)
204 %_libdir/libsolv.so.*
205 %_libdir/libsolvext.so.*
209 %defattr(-,root,root)
210 %exclude /usr/bin/helix2solv
211 %exclude /usr/bin/solv
215 %defattr(-,root,root)
217 %_libdir/libsolvext.so
222 %defattr(-,root,root)
225 %if %{with perl_binding}
227 %defattr(-,root,root)
231 %if %{with ruby_binding}
233 %defattr(-,root,root)
237 %if %{with python_binding}
238 %files -n python-solv
239 %defattr(-,root,root)