4 Url: https://github.com/openSUSE/libsolv
6 Source: libsolv-%{version}.tar.bz2
7 Source10: add_pie_compile_option.patch
8 Source1001: libsolv.manifest
9 Summary: A new approach to package dependency solving
10 Group: System/Package Management
12 BuildRequires: db4-devel
13 BuildRequires: expat-devel
16 BuildRequires: gcc-c++
17 BuildRequires: rpm-devel
18 BuildRequires: zlib-devel
20 %bcond_without enable_static
21 %bcond_without perl_binding
22 %bcond_without python_binding
24 %if %{with perl_binding}
28 %if %{with python_binding}
29 %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")
30 BuildRequires: python-devel
35 A new approach to package dependency solving.
38 Summary: A new approach to package dependency solving
39 Group: Development/Libraries
40 Requires: libsolv-tools = %version
41 Requires: libsolv = %version
45 Development files for libsolv, a new approach to package dependency solving
48 Summary: A new approach to package dependency solving
49 Group: Development/Libraries
50 Obsoletes: satsolver-tools < 0.18
51 Provides: satsolver-tools = 0.18
52 Requires: gzip bzip2 coreutils findutils
55 A new approach to package dependency solving.
57 %package -n python-solv
59 Summary: Python bindings for the libsolv library
60 Group: Platfrom Development/Python
62 %description -n python-solv
63 Python bindings for sat solver.
66 Requires: perl = %{perl_version}
67 Summary: Perl bindings for the libsolv library
68 Group: Platfrom Development/Perl
70 %description -n perl-solv
71 Perl bindings for sat solver.
74 %setup -n libsolv-%{version}
76 %{__patch} -p1 < %{SOURCE10}
79 export CFLAGS="$RPM_OPT_FLAGS"
80 export CXXFLAGS="$CFLAGS"
83 CMAKE_FLAGS="-DSUSE=1"
86 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
88 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
89 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
90 %{?with_enable_static:-DENABLE_STATIC=1} \
91 %{?with_perl_binding:-DENABLE_PERL=1} \
92 %{?with_python_binding:-DENABLE_PYTHON=1} \
93 -DENABLE_COMPLEX_DEPS=1 \
96 make %{?jobs:-j %jobs}
99 make DESTDIR=$RPM_BUILD_ROOT install
100 %if %{with python_binding}
101 pushd $RPM_BUILD_ROOT/%{python_sitearch}
102 python %py_libdir/py_compile.py *.py
103 python -O %py_libdir/py_compile.py *.py
106 install -D -m0755 examples/repo2solv.sh %{buildroot}%{_bindir}
109 # we want to leave the .a file untouched
110 export NO_BRP_STRIP_DEBUG=true
112 %post -p /sbin/ldconfig
114 %postun -p /sbin/ldconfig
117 %manifest %{name}.manifest
119 %{_libdir}/libsolv.so.*
120 %{_libdir}/libsolvext.so.*
123 %manifest %{name}.manifest
129 %manifest %{name}.manifest
131 %{_libdir}/pkgconfig/libsolv.pc
132 %{_libdir}/pkgconfig/libsolvext.pc
133 %if %{with enable_static}
135 %{_libdir}/libsolvext.a
137 %if !%{with disable_shared}
138 %{_libdir}/libsolv.so
139 %{_libdir}/libsolvext.so
142 %{_datadir}/cmake/Modules/*
144 %if %{with perl_binding}
146 %manifest %{name}.manifest
151 %if %{with python_binding}
152 %files -n python-solv
153 %manifest %{name}.manifest