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) %define majver %(echo %version | cut -d. -f 1-2)
Name: libxml2 Name: libxml2
Version: 2.9.10 Version: 2.9.10
Release: 3mamba Release: 4mamba
Summary: Library providing XML and HTML support Summary: Library providing XML and HTML support
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
@ -24,7 +24,6 @@ BuildRequires: libz-devel
BuildRequires: gtk-doc BuildRequires: gtk-doc
%endif %endif
BuildRequires: ldconfig BuildRequires: ldconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
This library allows to manipulate XML files. 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. 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. 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. 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 %package -n python-libxml2-py3
Group: System/Libraries Group: System/Libraries
Summary: Python support for %{name} Summary: Python support for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Provides: python-libxml2 Provides: python-libxml2
Obsoletes: python-libxml2 Obsoletes: python-libxml2 =< 2.9.10-3mamba
%py3_requires %py3_requires
%description -n python-libxml2-py3 %description -n python-libxml2-py3
Python support for libxml2. 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 %package utils
Group: Development/Libraries Group: Development/Libraries
@ -83,6 +88,7 @@ Requires: gtk-doc
%prep %prep
%setup -q %setup -q
#%patch0 -p1 #%patch0 -p1
cp -a python python27
%build %build
#autoreconf #autoreconf
@ -100,6 +106,12 @@ Requires: gtk-doc
%make PYTHON_SITE_PACKAGES=%{python3_sitearch} %make PYTHON_SITE_PACKAGES=%{python3_sitearch}
#make tests #make tests
%if "%{stage1}" != "1"
cd python27
CFLAGS="%{optflags}" %{__python27} setup.py build
cd ..
%endif
%install %install
[ "%{buildroot}" != / ] && rm -rf %{buildroot} [ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall PYTHON_SITE_PACKAGES=%{python3_sitearch} %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}/sgml
install -d -m 0755 %{buildroot}%{_sysconfdir}/xml install -d -m 0755 %{buildroot}%{_sysconfdir}/xml
:<< _EOF
%if "%{stage1}" != "1" %if "%{stage1}" != "1"
cd python cd python27
CFLAGS="%{optflags}" %{__python36} setup.py build %{__python27} setup.py install \
%{__python36} setup.py install \
-O1 --skip-build \ -O1 --skip-build \
--root="%{buildroot}" \ --root="%{buildroot}" \
--install-headers=%{python36_inc} \ --install-headers=%{python27_inc} \
--install-lib=%{python36_sitearch} \ --install-lib=%{python27_sitearch} \
--record=%{name}.filelist --record=%{name}.filelist
sed -i "s,.*/man/.*,&.gz," %{name}.filelist sed -i "s,.*/man/.*,&.gz," %{name}.filelist
%endif %endif
_EOF
%clean %clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot} [ "%{buildroot}" != / ] && rm -rf %{buildroot}
@ -167,9 +175,13 @@ _EOF
%if "%{stage1}" != "1" %if "%{stage1}" != "1"
%files -n python-libxml2-py3 %files -n python-libxml2-py3
%defattr(-,root,root) %defattr(-,root,root)
%dir %{python3_sitearch}
%{python3_sitearch}/libxml2* %{python3_sitearch}/libxml2*
%{python3_sitearch}/drv_libxml2.py %{python3_sitearch}/drv_libxml2.py
%files -n python-libxml2-py27
%defattr(-,root,root)
%{python27_sitearch}/libxml2*
%{python27_sitearch}/drv_libxml2.py*
%endif %endif
%files apidocs %files apidocs
@ -180,6 +192,9 @@ _EOF
%endif %endif
%changelog %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 * Mon Nov 30 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.10-3mamba
- python-libxml2-py3: fix: don't install in libxml2 subdir - python-libxml2-py3: fix: don't install in libxml2 subdir