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 %global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"]')
51 BuildRequires: ruby ruby-devel
54 %if %{with python_binding}
55 %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")
56 BuildRequires: python-devel
60 Summary: A new approach to package dependency solving
64 A new approach to package dependency solving
68 Michael Schroeder <mls@suse.de>
69 Klaus Kaempf <kkaempf@suse.de>
70 Stephan Kulow <coolo@suse.de>
71 Michael Matz <matz@suse.de>
72 Duncan Mac-Vicar P. <dmacvicar@suse.de>
74 %if !%{with disable_shared}
75 %package -n libsolv@LIBSOLV_SOVERSION@
76 Summary: A new approach to package dependency solving
77 Group: Development/Libraries/C and C++
79 %description -n libsolv@LIBSOLV_SOVERSION@
80 A new approach to package dependency solving
84 Michael Schroeder <mls@suse.de>
85 Klaus Kaempf <kkaempf@suse.de>
86 Stephan Kulow <coolo@suse.de>
87 Michael Matz <matz@suse.de>
88 Duncan Mac-Vicar P. <dmacvicar@suse.de>
92 Summary: A new approach to package dependency solving
93 Group: Development/Libraries/C and C++
94 Requires: libsolv-tools = %version
95 %if !%{with disable_shared}
96 Requires: libsolv@LIBSOLV_SOVERSION@ = %version
101 Development files for libsolv, a new approach to package dependency solving
105 Michael Schroeder <mls@suse.de>
106 Klaus Kaempf <kkaempf@suse.de>
107 Stephan Kulow <coolo@suse.de>
108 Michael Matz <matz@suse.de>
109 Duncan Mac-Vicar P. <dmacvicar@suse.de>
112 Summary: A new approach to package dependency solving
113 Group: Development/Libraries/C and C++
114 Obsoletes: libsatsolver <= 0.0.15
115 Provides: libsatsolver = %{version}-%{release}
116 Requires: gzip bzip2 coreutils
119 A new approach to package dependency solving.
122 Summary: Applications demoing the libsolv library
123 Group: System/Management
125 %if 0%{?fedora_version}
128 %if 0%{?suse_version}
133 Applications demoing the libsolv library.
135 %package -n ruby-solv
136 Summary: Ruby bindings for the libsolv library
137 Group: Development/Languages/Ruby
139 %description -n ruby-solv
140 Ruby bindings for sat solver.
142 %package -n python-solv
143 %if 0%{?py_requires:1}
146 Summary: Python bindings for the libsolv library
147 Group: Development/Languages/Python
149 %description -n python-solv
150 Python bindings for sat solver.
152 %package -n perl-solv
153 Requires: perl = %{perl_version}
154 Summary: Perl bindings for the libsolv library
155 Group: Development/Languages/Perl
157 %description -n perl-solv
158 Perl bindings for sat solver.
161 %setup -n libsolv-%{version}
164 export CFLAGS="$RPM_OPT_FLAGS"
165 export CXXFLAGS="$CFLAGS"
168 %if 0%{?fedora_version}
169 CMAKE_FLAGS="-DFEDORA=1"
173 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
175 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
176 -DCMAKE_BUILD_TYPE=Release \
177 %{?with_enable_static:-DENABLE_STATIC=1} \
178 %{?with_disable_shared:-DDISABLE_SHARED=1} \
179 %{?with_perl_binding:-DENABLE_PERL=1} \
180 %{?with_python_binding:-DENABLE_PYTHON=1} \
181 %{?with_ruby_binding:-DENABLE_RUBY=1} \
184 make %{?jobs:-j %jobs}
187 make DESTDIR=$RPM_BUILD_ROOT install
188 %if %{with python_binding}
189 %if 0%{?suse_version}
190 pushd $RPM_BUILD_ROOT/%{python_sitearch}
191 python %py_libdir/py_compile.py *.py
192 python -O %py_libdir/py_compile.py *.py
196 # we want to leave the .a file untouched
197 export NO_BRP_STRIP_DEBUG=true
200 rm -rf "$RPM_BUILD_ROOT"
202 %if !%{with disable_shared}
203 %post -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
205 %postun -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
207 %files -n libsolv@LIBSOLV_SOVERSION@
208 %defattr(-,root,root)
210 %_libdir/libsolv.so.*
211 %_libdir/libsolvext.so.*
215 %defattr(-,root,root)
216 %exclude /usr/bin/helix2solv
217 %exclude /usr/bin/solv
221 %defattr(-,root,root)
223 %_libdir/libsolvext.so
228 %defattr(-,root,root)
231 %if %{with perl_binding}
233 %defattr(-,root,root)
237 %if %{with ruby_binding}
239 %defattr(-,root,root)
243 %if %{with python_binding}
244 %files -n python-solv
245 %defattr(-,root,root)