]> git.pld-linux.org Git - packages/libsolv.git/blobdiff - libsolv.spec
- rel 8; fix build with rpm headers
[packages/libsolv.git] / libsolv.spec
index 48e97ac55b03673989a494cfc17e23cd94767d11..21be5c58c47c3a8124dbe7f2a63230a6f4ee0d18 100644 (file)
@@ -3,20 +3,22 @@
 %bcond_without static_libs     # static libraries
 %bcond_without python3         # Python 3.x bindings
 %bcond_without ruby            # Ruby bindings
+%bcond_without tcl             # Tcl bindings
 
-%define                gitrev  f78f5de
 %include       /usr/lib/rpm/macros.perl
 Summary:       Package dependency solver
 Summary(pl.UTF-8):     Biblioteka do rozwiązywania zależności pakietów
 Name:          libsolv
-Version:       0.6.1
-Release:       3
+Version:       0.6.34
+Release:       8
 License:       BSD
 Group:         Libraries
-# git clone https://github.com/openSUSE/libsolv.git
-Source0:       http://pkgs.fedoraproject.org/repo/pkgs/libsolv/%{name}-%{gitrev}.tar.xz/79166e5d759b1c879bca4d167c02fc62/libsolv-%{gitrev}.tar.xz
-# Source0-md5: 79166e5d759b1c879bca4d167c02fc62
+#Source0Download: https://github.com/openSUSE/libsolv/releases
+Source0:       https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: b61f8268a60086ae6fbf7a3454d669cb
 Patch0:                ruby.patch
+Patch1:                %{name}-python.patch
+Patch2:                %{name}-rpm5.patch
 URL:           https://github.com/openSUSE/libsolv
 BuildRequires: bzip2-devel
 BuildRequires: cmake >= 2.4
@@ -32,7 +34,9 @@ BuildRequires:        rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.219
 BuildRequires: swig-perl
 BuildRequires: swig-python
+%{?with_tcl:BuildRequires:     swig-tcl}
 BuildRequires: tar >= 1:1.22
+%{?with_tcl:BuildRequires:     tcl-devel}
 BuildRequires: xz
 BuildRequires: xz-devel
 BuildRequires: zlib-devel
@@ -43,6 +47,8 @@ BuildRequires:        swig-ruby
 %endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                specflags       -D_GNU_SOURCE=1
+
 %description
 A free package dependency solver using a satisfiability algorithm. The
 library is based on two major, but independent, blocks:
@@ -154,43 +160,65 @@ Ruby bindings for the libsolv libraries.
 %description -n ruby-solv -l pl.UTF-8
 Wiązania języka Ruby do bibliotek libsolv.
 
+%package -n tcl-solv
+Summary:       Tcl bindings for the libsolv libraries
+Summary(pl.UTF-8):     Wiązania języka Tcl do bibliotek libsolv
+Group:         Development/Languages
+Requires:      %{name} = %{version}-%{release}
+Requires:      tcl
+
+%description -n tcl-solv
+Tcl bindings for the libsolv libraries.
+
+%description -n tcl-solv -l pl.UTF-8
+Wiązania języka Tcl do bibliotek libsolv.
+
 %prep
-%setup -q -n %{name}
+%setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+# use system one
+%{__rm} cmake/modules/FindRuby.cmake
 
 %build
+# TODO: -DENABLE_RPMDB_LIBRPM=ON -DENABLE_RPMPKG_LIBRPM=ON (rpm5 not supported)
+
+%define common_opts \\\
+       -DENABLE_APPDATA=ON \\\
+       -DENABLE_BZIP2_COMPRESSION=ON \\\
+       -DENABLE_COMPLEX_DEPS=ON \\\
+       -DENABLE_HELIXREPO=ON \\\
+       -DENABLE_LZMA_COMPRESSION=ON \\\
+       -DENABLE_PUBKEY=ON \\\
+       -DENABLE_RPMDB=ON \\\
+       -DENABLE_RPMDB_BYRPMHEADER=ON \\\
+       -DENABLE_RPMMD=ON \\\
+       %{?with_static_libs:-DENABLE_STATIC=ON} \\\
+       -DRPM5=ON \\\
+       %{nil}
+
 install -d build %{?with_python3:build-py3}
 cd build
 %cmake .. \
-       -DENABLE_APPDATA=ON \
-       -DENABLE_BZIP2_COMPRESSON=ON \
-       -DENABLE_LZMA_COMPRESSON=ON \
+       %{common_opts} \
        -DENABLE_PERL=ON \
-       -DENABLE_PUBKEY=ON \
        -DENABLE_PYTHON=ON \
-       -DENABLE_RPMDB=ON \
-       -DENABLE_RPMDB_BYRPMHEADER=ON \
-       -DENABLE_RPMMD=ON \
        %{?with_ruby:-DENABLE_RUBY=ON} \
-       %{?with_static_libs:-DENABLE_STATIC=ON} \
+       %{?with_tcl:-DENABLE_TCL=ON} \
        -DPythonLibs_FIND_VERSION=2 \
-       -DRPM5=ON \
+       -DPythonLibs_FIND_VERSION_MAJOR=2 \
        -DUSE_VENDORDIRS=ON
 
 %{__make}
 %if %{with python3}
 cd ../build-py3
 %cmake .. \
-       -DENABLE_APPDATA=ON \
-       -DENABLE_BZIP2_COMPRESSON=ON \
-       -DENABLE_LZMA_COMPRESSON=ON \
-       -DENABLE_PUBKEY=ON \
+       %{common_opts} \
        -DENABLE_PYTHON=ON \
-       -DENABLE_RPMDB=ON \
-       -DENABLE_RPMMD=ON \
-       -DENABLE_RPMDB_BYRPMHEADER=ON \
        -DPythonLibs_FIND_VERSION=3 \
-       -DRPM5=ON
+       -DPythonLibs_FIND_VERSION_MAJOR=3
 
 %{__make}
 %endif
@@ -218,16 +246,17 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc BUGS CREDITS LICENSE.BSD README
+%doc BUGS CREDITS LICENSE.BSD NEWS README
 %attr(755,root,root) %{_libdir}/libsolv.so.0
 %attr(755,root,root) %{_libdir}/libsolvext.so.0
 
 %files devel
 %defattr(644,root,root,755)
-%doc examples/solv.c
 %attr(755,root,root) %{_libdir}/libsolv.so
 %attr(755,root,root) %{_libdir}/libsolvext.so
 %{_includedir}/solv
+%{_pkgconfigdir}/libsolv.pc
+%{_pkgconfigdir}/libsolvext.pc
 %{_datadir}/cmake/Modules/FindLibSolv.cmake
 %{_mandir}/man3/libsolv*.3*
 
@@ -243,6 +272,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/appdata2solv
 %attr(755,root,root) %{_bindir}/deltainfoxml2solv
 %attr(755,root,root) %{_bindir}/dumpsolv
+%attr(755,root,root) %{_bindir}/helix2solv
 %attr(755,root,root) %{_bindir}/installcheck
 %attr(755,root,root) %{_bindir}/mergesolv
 %attr(755,root,root) %{_bindir}/repo2solv.sh
@@ -250,9 +280,20 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/rpmdb2solv
 %attr(755,root,root) %{_bindir}/rpmmd2solv
 %attr(755,root,root) %{_bindir}/rpms2solv
-%attr(755,root,root) %{_bindir}/solv
 %attr(755,root,root) %{_bindir}/testsolv
 %attr(755,root,root) %{_bindir}/updateinfoxml2solv
+%{_mandir}/man1/appdata2solv.1*
+%{_mandir}/man1/deltainfoxml2solv.1*
+%{_mandir}/man1/dumpsolv.1*
+%{_mandir}/man1/helix2solv.1*
+%{_mandir}/man1/installcheck.1*
+%{_mandir}/man1/mergesolv.1*
+%{_mandir}/man1/repomdxml2solv.1*
+%{_mandir}/man1/rpmdb2solv.1*
+%{_mandir}/man1/rpmmd2solv.1*
+%{_mandir}/man1/rpms2solv.1*
+%{_mandir}/man1/testsolv.1*
+%{_mandir}/man1/updateinfoxml2solv.1*
 
 %files -n perl-solv
 %defattr(644,root,root,755)
@@ -280,3 +321,11 @@ rm -rf $RPM_BUILD_ROOT
 %doc examples/rbsolv
 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
 %endif
+
+%if %{with tcl}
+%files -n tcl-solv
+%defattr(644,root,root,755)
+%doc examples/tclsolv
+%attr(755,root,root) %{_prefix}/lib/tcl8/8.*/solv-%{version}.so
+%{_prefix}/lib/tcl8/8.*/solv-%{version}.tm
+%endif
This page took 0.133602 seconds and 4 git commands to generate.