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 BuildRequires: python-devel
59 Summary: A new approach to package dependency solving
63 A new approach to package dependency solving
67 Michael Schroeder <mls@suse.de>
68 Klaus Kaempf <kkaempf@suse.de>
69 Stephan Kulow <coolo@suse.de>
70 Michael Matz <matz@suse.de>
71 Duncan Mac-Vicar P. <dmacvicar@suse.de>
73 %if !%{with disable_shared}
74 %package -n libsolv@LIBSOLV_SOVERSION@
75 Summary: A new approach to package dependency solving
76 Group: Development/Libraries/C and C++
78 %description -n libsolv@LIBSOLV_SOVERSION@
79 A new approach to package dependency solving
83 Michael Schroeder <mls@suse.de>
84 Klaus Kaempf <kkaempf@suse.de>
85 Stephan Kulow <coolo@suse.de>
86 Michael Matz <matz@suse.de>
87 Duncan Mac-Vicar P. <dmacvicar@suse.de>
91 Summary: A new approach to package dependency solving
92 Group: Development/Libraries/C and C++
93 Requires: libsolv-tools = %version
94 %if !%{with disable_shared}
95 Requires: libsolv@LIBSOLV_SOVERSION@ = %version
100 Development files for libsolv, a new approach to package dependency solving
104 Michael Schroeder <mls@suse.de>
105 Klaus Kaempf <kkaempf@suse.de>
106 Stephan Kulow <coolo@suse.de>
107 Michael Matz <matz@suse.de>
108 Duncan Mac-Vicar P. <dmacvicar@suse.de>
111 Summary: A new approach to package dependency solving
112 Group: Development/Libraries/C and C++
113 Obsoletes: libsatsolver <= 0.0.15
114 Provides: libsatsolver = %{version}-%{release}
115 Requires: gzip bzip2 coreutils
118 A new approach to package dependency solving.
121 Summary: Applications demoing the libsolv library
122 Group: System/Management
124 %if 0%{?fedora_version}
127 %if 0%{?suse_version}
132 Applications demoing the libsolv library.
134 %package -n ruby-solv
135 Summary: Ruby bindings for the libsolv library
136 Group: Development/Languages/Ruby
138 %description -n ruby-solv
139 Ruby bindings for sat solver.
141 %package -n python-solv
142 %if 0%{?py_requires:1}
145 Summary: Python bindings for the libsolv library
146 Group: Development/Languages/Python
148 %description -n python-solv
149 Python bindings for sat solver.
151 %package -n perl-solv
152 Requires: perl = %{perl_version}
153 Summary: Perl bindings for the libsolv library
154 Group: Development/Languages/Perl
156 %description -n perl-solv
157 Perl bindings for sat solver.
160 %setup -n libsolv-%{version}
163 export CFLAGS="$RPM_OPT_FLAGS"
164 export CXXFLAGS="$CFLAGS"
167 %if 0%{?fedora_version}
168 CMAKE_FLAGS="-DFEDORA=1"
172 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
174 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
175 -DCMAKE_BUILD_TYPE=Release \
176 %{?with_enable_static:-DENABLE_STATIC=1} \
177 %{?with_disable_shared:-DDISABLE_SHARED=1} \
178 %{?with_perl_binding:-DENABLE_PERL=1} \
179 %{?with_python_binding:-DENABLE_PYTHON=1} \
180 %{?with_ruby_binding:-DENABLE_RUBY=1} \
183 make %{?jobs:-j %jobs}
186 make DESTDIR=$RPM_BUILD_ROOT install
187 %if %{with python_binding}
188 pushd $RPM_BUILD_ROOT/%{py_sitedir}
189 python %py_libdir/py_compile.py *.py
190 python -O %py_libdir/py_compile.py *.py
193 # we want to leave the .a file untouched
194 export NO_BRP_STRIP_DEBUG=true
197 rm -rf "$RPM_BUILD_ROOT"
199 %if !%{with disable_shared}
200 %post -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
202 %postun -n libsolv@LIBSOLV_SOVERSION@ -p /sbin/ldconfig
204 %files -n libsolv@LIBSOLV_SOVERSION@
205 %defattr(-,root,root)
207 %_libdir/libsolv.so.*
208 %_libdir/libsolvext.so.*
212 %defattr(-,root,root)
213 %exclude /usr/bin/helix2solv
214 %exclude /usr/bin/solv
218 %defattr(-,root,root)
220 %_libdir/libsolvext.so
225 %defattr(-,root,root)
228 %if %{with perl_binding}
230 %defattr(-,root,root)
234 %if %{with ruby_binding}
236 %defattr(-,root,root)
240 %if %{with python_binding}
241 %files -n python-solv
242 %defattr(-,root,root)