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-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
140 Summary: Python bindings for the libsolv library
141 Group: Development/Languages/Python
143 %description -n python-solv
144 Python bindings for sat solver.
146 %package -n perl-solv
147 Requires: perl = %{perl_version}
148 Summary: Perl bindings for the libsolv library
149 Group: Development/Languages/Perl
151 %description -n perl-solv
152 Perl bindings for sat solver.
155 %setup -n libsolv-%{version}
158 export CFLAGS="$RPM_OPT_FLAGS"
159 export CXXFLAGS="$CFLAGS"
162 %if 0%{?fedora_version}
163 CMAKE_FLAGS="-DFEDORA=1"
167 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
169 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
170 -DCMAKE_BUILD_TYPE=Release \
171 %{?with_enable_static:-DENABLE_STATIC=1} \
172 %{?with_disable_shared:-DDISABLE_SHARED=1} \
173 %{?with_perl_binding:-DENABLE_PERL=1} \
174 %{?with_python_binding:-DENABLE_PYTHON=1} \
175 %{?with_ruby_binding:-DENABLE_RUBY=1} \
178 make %{?jobs:-j %jobs}
181 make DESTDIR=$RPM_BUILD_ROOT install
182 %if %{with python_binding}
183 pushd $RPM_BUILD_ROOT/%{py_sitedir}
184 python %py_libdir/py_compile.py *.py
185 python -O %py_libdir/py_compile.py *.py
188 # we want to leave the .a file untouched
189 export NO_BRP_STRIP_DEBUG=true
192 rm -rf "$RPM_BUILD_ROOT"
194 %if !%{with disable_shared}
195 %post -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
197 %postun -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
199 %files -n libsolv@LIBSOLV_SOVERSION@
200 %defattr(-,root,root)
202 %_libdir/libsolv.so.*
203 %_libdir/libsolvext.so.*
207 %defattr(-,root,root)
208 %exclude /usr/bin/helix2solv
209 %exclude /usr/bin/solv
213 %defattr(-,root,root)
215 %_libdir/libsolvext.so
220 %defattr(-,root,root)
223 %if %{with perl_binding}
225 %defattr(-,root,root)
229 %if %{with ruby_binding}
231 %defattr(-,root,root)
235 %if %{with python_binding}
236 %files -n python-solv
237 %defattr(-,root,root)