Browse Source

libxml2-2.9.9-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@12086 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 5 years ago
parent
commit
5a66e45932
1 changed files with 73 additions and 14 deletions
  1. 73 14
      lib/libx/libxml2/libxml2-vl.spec

+ 73 - 14
lib/libx/libxml2/libxml2-vl.spec

@@ -1,17 +1,21 @@
 Summary: Library providing XML and HTML support
 Summary(ja): XML や HTML サポートを提供するライブラリ
 Name: libxml2
-Version: 2.9.7
+Version: 2.9.9
 Release: 1%{_dist_release}
 License: MIT
 Group: System Environment/Libraries
 Source: ftp://xmlsoft.org/libxml2-%{version}.tar.gz
 
 Patch0: libxml2-multilib.patch
+# Patch from openSUSE.
+# See:  https://bugzilla.gnome.org/show_bug.cgi?id=789714
+Patch1:         libxml2-2.9.8-python3-unicode-errors.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: python
-BuildRequires: python-devel
+BuildRequires: python python-devel python-rpm-macros
+BuildRequires: python3 python3-devel python3-rpm-macros
+BuildRequires: libxcrypt-devel
 BuildRequires: zlib-devel
 BuildRequires: pkgconfig
 
@@ -19,7 +23,6 @@ URL: http://xmlsoft.org/
 
 Vendor: Project Vine
 Distribution: Vine Linux
-Packager: Takemikaduchi
 
 %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
 
@@ -164,30 +167,69 @@ XMLやHTMLファイルを読み込み、修正、書き込みをサポートし
 DTDに対応しており、パース時や一度ドキュメントが修正された後でも複雑な
 DTDであってもパースと確認が出来ます。
 
+%package -n python3-%{name}
+Summary: Python bindings for the libxml2 library
+Summary(ja): libxml2 ライブラリ用の python バインディング
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: python3
+
+%description -n python3-%{name}
+The python3-libxml2 package contains a module that permits applications
+written in the Python 3 programming language to use the interface
+supplied by the libxml2 library to manipulate XML files.
+
+This library allows to manipulate XML files. It includes support 
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DTDs, either
+at parse time or later once the document has been modified.
+
+%description -n python3-%{name} -l ja
+python3-libxml2はXMLファイルを扱うlibxml2ライブラリによって提供される
+インターフェースを使用するためにpython3プログラム言語で書かれた
+アプリケーションを許可するモジュール類を含んでいます。
+
+このライブラリはXMLファイルを扱う事ができます。
+XMLやHTMLファイルを読み込み、修正、書き込みをサポートしています。
+DTDに対応しており、パース時や一度ドキュメントが修正された後でも複雑な
+DTDであってもパースと確認が出来ます。
+
 %prep
 %setup -q
 
 %patch0 -p1
+%patch1 -p1
+
+find doc -type f -executable -print -exec chmod 0644 {} ';'
 
 %build
-%configure
-make %{?_smp_mflags}
+mkdir py2 py3
+%global _configure ../configure
+%global _configure_disable_silent_rules 1
+( cd py2 && %configure --cache-file=../config.cache --with-python=%{__python2} )
+
+( cd py3 && %configure --cache-file=../config.cache --with-python=%{__python3} )
+
+make %{?_smp_mflags} -C py2
+make %{?_smp_mflags} -C py3
+
 gzip -9 ChangeLog
 
 
 %install
 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
 
-make install DESTDIR=$RPM_BUILD_ROOT
-gzip -9 doc/libxml2-api.xml
-
-rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
-rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.{a,la}
+make install -C py2 DESTDIR=$RPM_BUILD_ROOT
+make install -C py3 DESTDIR=$RPM_BUILD_ROOT
 
 # multiarch crazyness on timestamp differences or Makefile/binaries for examples
 touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxml2/libxml/parser.h $RPM_BUILD_ROOT/%{_bindir}/xml2-config
 
-(cd doc/examples ; make clean ; rm -rf .deps Makefile)
+find %{buildroot} -type f -name '*.la' -print -delete
+rm -vf %{buildroot}{%{python_sitearch},%{python3_sitearch}}/*.a
+rm -vrf %{buildroot}%{_datadir}/doc/
+#(cd doc/examples ; make clean ; rm -rf .deps Makefile)
+gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
 
 
 %clean
@@ -203,7 +245,8 @@ touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxml2/libxml/parser.h $RPM
 
 %files
 %defattr(-, root, root)
-%doc AUTHORS ChangeLog.gz NEWS README COPYING Copyright TODO
+%license COPYING Copyright
+%doc AUTHORS ChangeLog.gz NEWS README TODO
 %{_bindir}/xmlcatalog
 %{_bindir}/xmllint
 %{_libdir}/lib*.so.*
@@ -238,7 +281,18 @@ touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxml2/libxml/parser.h $RPM
 %doc python/tests/*.py
 %doc doc/*.py
 %doc doc/python.html
-%{_libdir}/python*/site-packages/*
+%{python_sitearch}/*
+
+%files -n python3-%{name}
+%defattr(-, root, root)
+%license Copyright
+%doc AUTHORS ChangeLog.gz NEWS README
+%doc python/TODO
+%doc python/libxml2class.txt
+%doc python/tests/*.py
+%doc doc/*.py
+%doc doc/python.html
+%{python3_sitearch}/*
 
 %if %{build_compat32}
 %files -n compat32-%{name}
@@ -253,6 +307,11 @@ touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxml2/libxml/parser.h $RPM
 %endif
 
 %changelog
+* Mon May 13 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.9.9-1
+- updated to 2.9.9.
+- added BR:libxcrypt-devel.
+- added a sub-package "python3-libxml2".
+
 * Fri Dec 15 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.9.7-1
 - updated to 2.9.7.