add -py27 package required for e.g. gimp-help [release 2.9.10-4mamba;Mon Mar 22 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 06:13:31 +01:00
parent 437aa88201
commit f7c6ba844b

View File

@ -1,7 +1,7 @@
%define majver %(echo %version | cut -d. -f 1-2)
Name: libxml2
Version: 2.9.10
Release: 3mamba
Release: 4mamba
Summary: Library providing XML and HTML support
Group: System/Libraries
Vendor: openmamba
@ -24,7 +24,6 @@ BuildRequires: libz-devel
BuildRequires: gtk-doc
%endif
BuildRequires: ldconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
This library allows to manipulate XML files.
@ -46,21 +45,27 @@ There is DTDs support this includes parsing and validation even with complex DtD
The output can be a simple SAX stream or and in-memory DOM like representations.
In this case one can use the built-in XPath and XPointer implementation to select subnodes or ranges.
A flexible Input/Output mechanism is available, with existing HTTP and FTP modules and combined to an URI library.
This package contains static libraries and header files needed for development.
This package contains static libraries and header files need for development.
%if "%{stage1}" != "1"
%package -n python-libxml2-py3
Group: System/Libraries
Summary: Python support for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Provides: python-libxml2
Obsoletes: python-libxml2
Obsoletes: python-libxml2 =< 2.9.10-3mamba
%py3_requires
%description -n python-libxml2-py3
Python support for libxml2.
%endif
%package -n python-libxml2-py27
Group: System/Libraries
Summary: Python support for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%py27_requires
%description -n python-libxml2-py27
Python support for libxml2.
%package utils
Group: Development/Libraries
@ -83,6 +88,7 @@ Requires: gtk-doc
%prep
%setup -q
#%patch0 -p1
cp -a python python27
%build
#autoreconf
@ -100,6 +106,12 @@ Requires: gtk-doc
%make PYTHON_SITE_PACKAGES=%{python3_sitearch}
#make tests
%if "%{stage1}" != "1"
cd python27
CFLAGS="%{optflags}" %{__python27} setup.py build
cd ..
%endif
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall PYTHON_SITE_PACKAGES=%{python3_sitearch}
@ -111,21 +123,17 @@ install AUTHORS COPYING Copyright NEWS README TODO* \
install -d -m 0755 %{buildroot}%{_sysconfdir}/sgml
install -d -m 0755 %{buildroot}%{_sysconfdir}/xml
:<< _EOF
%if "%{stage1}" != "1"
cd python
CFLAGS="%{optflags}" %{__python36} setup.py build
%{__python36} setup.py install \
cd python27
%{__python27} setup.py install \
-O1 --skip-build \
--root="%{buildroot}" \
--install-headers=%{python36_inc} \
--install-lib=%{python36_sitearch} \
--install-headers=%{python27_inc} \
--install-lib=%{python27_sitearch} \
--record=%{name}.filelist
sed -i "s,.*/man/.*,&.gz," %{name}.filelist
%endif
_EOF
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
@ -167,9 +175,13 @@ _EOF
%if "%{stage1}" != "1"
%files -n python-libxml2-py3
%defattr(-,root,root)
%dir %{python3_sitearch}
%{python3_sitearch}/libxml2*
%{python3_sitearch}/drv_libxml2.py
%files -n python-libxml2-py27
%defattr(-,root,root)
%{python27_sitearch}/libxml2*
%{python27_sitearch}/drv_libxml2.py*
%endif
%files apidocs
@ -180,6 +192,9 @@ _EOF
%endif
%changelog
* Mon Mar 22 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.10-4mamba
- add -py27 package required for e.g. gimp-help
* Mon Nov 30 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.10-3mamba
- python-libxml2-py3: fix: don't install in libxml2 subdir