Browse Source

libxslt-1.1.33-1

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

+ 86 - 35
lib/libx/libxslt/libxslt-vl.spec

@@ -4,7 +4,7 @@
 Summary: Library providing the Gnome XSLT engine
 Summary(ja): XSLT エンジンライブラリ
 Name: libxslt
-Version: 1.1.32
+Version: 1.1.33
 Release: 1%{_dist_release}
 License: MIT
 Group: System Environment/Libraries
@@ -12,10 +12,16 @@ URL: http://xmlsoft.org/XSLT/
 Source0: ftp://xmlsoft.org/XSLT/%{name}-%{version}.tar.gz
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: libxml2-devel >= 2.6.27
+BuildRequires: libtirpc-devel
+BuildRequires: libxcrypt-devel
+BuildRequires: libxml2-devel >= 2.9.9
 BuildRequires: zlib-devel >= 1.1.4
-BuildRequires: python python-devel perl libxml2-python
-Requires: libxml2 >= 2.6.27
+BuildRequires: perl
+BuildRequires: python python-devel python-rpm-macros libxml2-python
+%if %{with python3}
+BuildRequires: python3 python3-devel python3-rpm-macros python3-libxml2
+%endif
+Requires: libxml2 >= 2.9.9
 
 Vendor: Project Vine
 Distribution: Vine Linux
@@ -58,7 +64,7 @@ The libxslt-static package contains the static library for libxslt.
 Summary: Python bindings for the libxslt library
 Group: Development/Libraries
 Requires: libxslt = %{version}-%{release}
-Requires: libxml2 >= 2.6.27
+Requires: libxml2 >= 2.9.9
 Requires: python
 
 %description python
@@ -71,6 +77,26 @@ to load and save XML and HTML files. Direct access to XPath and
 the XSLT transformation context are possible to extend the XSLT language
 with XPath functions written in Python.
 
+%if %{with python3}
+%package -n python3-%{name}
+Summary: Python bindings for the libxslt library
+Group: Development/Libraries
+Requires: libxslt = %{version}-%{release}
+Requires: libxml2 >= 2.9.9
+Requires: python3
+
+%description -n python3-%{name}
+The libxslt-python package contains a module that permits applications
+written in the Python programming language to use the interface
+supplied by the libxslt library to apply XSLT transformations.
+
+This library allows to parse sytlesheets, uses the libxml2-python
+to load and save XML and HTML files. Direct access to XPath and
+the XSLT transformation context are possible to extend the XSLT language
+with XPath functions written in Python.
+
+%endif
+
 # compat32
 %package -n compat32-%{name}
 Summary: Library providing the Gnome XSLT engine
@@ -107,37 +133,39 @@ XSLTのための開発用ファイルです。
 
 %prep
 %setup -q
+chmod 644 python/tests/*
 
 %build
-%configure --without-crypto
-make %{?_smp_mflags}
+perl -pi -e 's|sysconfig\.get_python_lib\(\)|sysconfig.get_python_lib(1)|' configure
+
+mkdir py2 py3
+%global _configure ../configure
+%global _configure_disable_silent_rules 1
+( export PYTHON_SITE_PACKAGES=%{python_sitearch}; cd py2 && %configure --without-crypto --cache-file=../config.cache --with-python=%{__python} )
+make %{?_smp_mflags} -C py2
+
+%if %{with python3}
+( cd py3 && %configure --without-crypto --cache-file=../config.cache --with-python=%{__python3} )
+make %{?_smp_mflags} -C py3
+%endif
 
 %install
 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
 
-make DESTDIR=$RPM_BUILD_ROOT install
-
-rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
-rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.{a,la}
-
-#
-# this is a bit ugly but tries to generate the bindings for all versions
-# of python installed
-#for i in %{prefix}/include/python*
-#do
-#    py_version=`echo $i | sed "s+%{prefix}/include/python++"`
-#    if test -x %{prefix}/bin/python$py_version
-#    then
-#        echo generating bindings for Python $py_version
-#        (cd python ; make clean ; \
-#         make PYTHON="%{prefix}/bin/python$py_version" \
-#              PYTHON_VERSION="$py_version"; \
-#         make PYTHON="%{prefix}/bin/python$py_version" \
-#              PYTHON_VERSION="$py_version" \
-#              prefix=$RPM_BUILD_ROOT%{prefix} \
-#              mandir=$RPM_BUILD_ROOT%{_mandir} install)
-#    fi
-#done
+make install -C py2 DESTDIR=$RPM_BUILD_ROOT
+
+find %{buildroot}%{python_sitearch} -name '*.a' -print -delete
+
+%if %{with python3}
+make install -C py3 DESTDIR=$RPM_BUILD_ROOT
+find %{buildroot}%{python3_sitearch} -name '*.a' -print -delete
+%endif
+
+find %{buildroot} -name '*.la' -print -delete
+
+# multiarch crazyness on timestamp differences
+touch -m --reference=%{buildroot}%{_includedir}/libxslt/xslt.h %{buildroot}%{_bindir}/xslt-config
+rm -vrf %{buildroot}%{_docdir}
 
 %clean
 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
@@ -152,7 +180,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.{a,la}
 
 %files
 %defattr(-, root, root)
-%doc AUTHORS ChangeLog NEWS README Copyright TODO FEATURES
+%license Copyright
+%doc AUTHORS ChangeLog NEWS README TODO FEATURES
 %doc doc/*.html doc/html doc/tutorial doc/EXSLT
 %{_bindir}/xsltproc
 %{_libdir}/lib*.so.*
@@ -160,7 +189,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.{a,la}
 
 %files devel
 %defattr(-, root, root)
-%doc AUTHORS ChangeLog NEWS README Copyright TODO FEATURES
+%license Copyright
+%doc AUTHORS ChangeLog NEWS README TODO FEATURES
 %{_includedir}/*
 %{_libdir}/lib*.so
 %{_libdir}/*.sh
@@ -175,14 +205,29 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.{a,la}
 
 %files python
 %defattr(-, root, root)
-%doc AUTHORS ChangeLog NEWS README Copyright FEATURES
+%license Copyright
+%doc AUTHORS ChangeLog NEWS README FEATURES
+%doc python/TODO
+%doc python/libxsltclass.txt
+%doc python/tests/*.py
+%doc python/tests/*.xml
+%doc python/tests/*.xsl
+%{python_sitearch}/libxslt.py
+%{python_sitearch}/libxsltmod*
+
+%if %{with python3}
+%files -n python3-%{name}
+%defattr(-, root, root)
+%license Copyright
+%doc AUTHORS ChangeLog NEWS README FEATURES
 %doc python/TODO
 %doc python/libxsltclass.txt
 %doc python/tests/*.py
 %doc python/tests/*.xml
 %doc python/tests/*.xsl
-%{_libdir}/python*/site-packages/libxslt.py
-%{_libdir}/python*/site-packages/libxsltmod*
+%{python3_sitearch}/libxslt.py
+%{python3_sitearch}/libxsltmod*
+%endif
 
 # compat32
 %if %{build_compat32}
@@ -198,6 +243,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.{a,la}
 %endif
 
 %changelog
+* Mon May 13 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.33-1
+- updated to 1.1.33.
+- added a sub-package "python3-libxslt".
+- added BR:libxcrypt-devel.
+- added BR:libtirpc-devel.
+
 * Sat Jan 06 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.32-1
 - updated to 1.1.32.