From 08e2840e01c46382aeff9b6c6db89ea8df50a5dc Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Fri, 29 Dec 2006 15:23:05 +0000 Subject: [PATCH] - added python bcond Changed files: libxslt.spec -> 1.130 --- libxslt.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libxslt.spec b/libxslt.spec index a48185b..74f6b96 100644 --- a/libxslt.spec +++ b/libxslt.spec @@ -1,5 +1,6 @@ # # Conditional build: +%bcond_without python # don't build python binding %bcond_without static_libs # don't build static library %bcond_with tests # run test suite # @@ -23,9 +24,11 @@ BuildRequires: libgcrypt-devel >= 1.1.42 BuildRequires: libtool >= 1:1.4.2-9 BuildRequires: libxml2-devel >= %{libxml2ver} BuildRequires: perl-base +%if %{with python} BuildRequires: python BuildRequires: python-devel BuildRequires: python-libxml2 >= %{libxml2ver} +%endif BuildRequires: rpm-pythonprov Requires: libgcrypt >= 1.1.42 Requires: libxml2 >= %{libxml2ver} @@ -122,7 +125,8 @@ Modu %{__autoheader} %{__automake} %configure \ - %{!?with_static_libs:--disable-static} + %{!?with_static_libs:--disable-static} \ + %{!?with_python:--without-python} %{__make} %{?with_tests:%{__make} -C tests test} @@ -133,6 +137,7 @@ rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +%if %{with python} # move examples to proper dir install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version} mv $RPM_BUILD_ROOT%{_docdir}/%{name}-python-%{version}/examples/* \ @@ -143,6 +148,7 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-python-%{version} %py_comp $RPM_BUILD_ROOT%{py_sitedir} rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{py,la,a} +%endif %clean rm -rf $RPM_BUILD_ROOT @@ -180,8 +186,10 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/xsltproc %{_mandir}/man1/* +%if %{with python} %files -n python-%{name} %defattr(644,root,root,755) %attr(755,root,root) %{py_sitedir}/*.so %{py_sitedir}/*.py[co] %{_examplesdir}/python-%{name}-%{version} +%endif -- 2.44.0