| 1 | #define svn_url e:/trees/libxml2/trunk
|
|---|
| 2 | %define svn_url http://svn.netlabs.org/repos/ports/xslt/trunk
|
|---|
| 3 | %define svn_rev 1829
|
|---|
| 4 |
|
|---|
| 5 | Summary: Library providing the Gnome XSLT engine
|
|---|
| 6 | Name: libxslt
|
|---|
| 7 | Version: 1.1.29
|
|---|
| 8 | Release: 2%{?dist}%{?extra_release}
|
|---|
| 9 | License: MIT
|
|---|
| 10 | Group: Development/Libraries
|
|---|
| 11 | URL: http://xmlsoft.org/XSLT/
|
|---|
| 12 | Vendor: bww bitwise works GmbH
|
|---|
| 13 |
|
|---|
| 14 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 15 |
|
|---|
| 16 | # DEF files to create forwarders for the legacy package
|
|---|
| 17 | Source10: libxslt.def
|
|---|
| 18 | Source11: libexslt.def
|
|---|
| 19 |
|
|---|
| 20 | Requires: libxml2 >= 2.6.27
|
|---|
| 21 | Requires: libcx >= 0.4
|
|---|
| 22 |
|
|---|
| 23 | BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|---|
| 24 | BuildRequires: libxml2-devel >= 2.6.27
|
|---|
| 25 | BuildRequires: python2-devel
|
|---|
| 26 | BuildRequires: libxml2-python
|
|---|
| 27 | #BuildRequires: libgcrypt-devel
|
|---|
| 28 | BuildRequires: automake autoconf
|
|---|
| 29 |
|
|---|
| 30 | %description
|
|---|
| 31 | This C library allows to transform XML files into other XML files
|
|---|
| 32 | (or HTML, text, ...) using the standard XSLT stylesheet transformation
|
|---|
| 33 | mechanism. To use it you need to have a version of libxml2 >= 2.6.27
|
|---|
| 34 | installed. The xsltproc command is a command line interface to the XSLT engine
|
|---|
| 35 |
|
|---|
| 36 | %package devel
|
|---|
| 37 | Summary: Libraries, includes, etc. to embed the Gnome XSLT engine
|
|---|
| 38 | Group: Development/Libraries
|
|---|
| 39 | Requires: libxslt = %{version}-%{release}
|
|---|
| 40 | Requires: libxml2-devel >= 2.6.27
|
|---|
| 41 | #Requires: libgcrypt-devel
|
|---|
| 42 | Requires: pkgconfig
|
|---|
| 43 |
|
|---|
| 44 | %description devel
|
|---|
| 45 | The %{name}-devel package contains libraries and header files for
|
|---|
| 46 | developing applications that use %{name}.
|
|---|
| 47 |
|
|---|
| 48 | %package python
|
|---|
| 49 | Summary: Python bindings for the libxslt library
|
|---|
| 50 | Group: Development/Libraries
|
|---|
| 51 | Requires: libxslt = %{version}-%{release}
|
|---|
| 52 | Requires: libxml2 >= 2.6.27
|
|---|
| 53 | Requires: libxml2-python >= 2.6.27
|
|---|
| 54 |
|
|---|
| 55 | %description python
|
|---|
| 56 | The libxslt-python package contains a module that permits applications
|
|---|
| 57 | written in the Python programming language to use the interface
|
|---|
| 58 | supplied by the libxslt library to apply XSLT transformations.
|
|---|
| 59 |
|
|---|
| 60 | This library allows to parse sytlesheets, uses the libxml2-python
|
|---|
| 61 | to load and save XML and HTML files. Direct access to XPath and
|
|---|
| 62 | the XSLT transformation context are possible to extend the XSLT language
|
|---|
| 63 | with XPath functions written in Python.
|
|---|
| 64 |
|
|---|
| 65 | %debug_package
|
|---|
| 66 |
|
|---|
| 67 | %prep
|
|---|
| 68 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{?!svn_rev):0}
|
|---|
| 69 | %setup -q
|
|---|
| 70 | %else
|
|---|
| 71 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 72 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 73 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 74 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 75 | %endif
|
|---|
| 76 |
|
|---|
| 77 | # Prepare forwarder DLLs.
|
|---|
| 78 | for m in %{SOURCE10} %{SOURCE11}; do
|
|---|
| 79 | cp ${m} .
|
|---|
| 80 | done
|
|---|
| 81 |
|
|---|
| 82 | autoreconf -fvi
|
|---|
| 83 |
|
|---|
| 84 | gzip -9 ChangeLog
|
|---|
| 85 |
|
|---|
| 86 | %build
|
|---|
| 87 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 88 | export LIBS="-lcx"
|
|---|
| 89 | export VENDOR="%{vendor}"
|
|---|
| 90 | %configure --disable-static
|
|---|
| 91 | make %{?_smp_mflags}
|
|---|
| 92 |
|
|---|
| 93 | %install
|
|---|
| 94 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
|---|
| 95 | find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
|---|
| 96 |
|
|---|
| 97 | # multiarch crazyness on timestamp differences
|
|---|
| 98 | touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxslt/xslt.h $RPM_BUILD_ROOT/%{_bindir}/xslt-config
|
|---|
| 99 |
|
|---|
| 100 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 101 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-python-%{version}
|
|---|
| 102 | rm -f $RPM_BUILD_ROOT%{python_sitearch}/*.a
|
|---|
| 103 |
|
|---|
| 104 | # Generate & install forwarder DLLs.
|
|---|
| 105 | gcc -Zomf -Zdll -nostdlib libxslt.def -l$RPM_BUILD_ROOT/%{_libdir}/xslt1.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/xslt.dll
|
|---|
| 106 | gcc -Zomf -Zdll -nostdlib libexslt.def -l$RPM_BUILD_ROOT/%{_libdir}/exslt0.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/exslt.dll
|
|---|
| 107 |
|
|---|
| 108 | # create a symlink for the python binding, as the dll itself is named xml2mod.dll
|
|---|
| 109 | ln -s %{python_sitearch}/xsltmod.dll $RPM_BUILD_ROOT%{python_sitearch}/libxsltmod.pyd
|
|---|
| 110 |
|
|---|
| 111 | %clean
|
|---|
| 112 | rm -fr %{buildroot}
|
|---|
| 113 |
|
|---|
| 114 | %check
|
|---|
| 115 | #make tests
|
|---|
| 116 |
|
|---|
| 117 | #post -p /sbin/ldconfig
|
|---|
| 118 |
|
|---|
| 119 | #postun -p /sbin/ldconfig
|
|---|
| 120 |
|
|---|
| 121 | %files
|
|---|
| 122 | %defattr(-, root, root)
|
|---|
| 123 | %doc AUTHORS ChangeLog.gz NEWS README Copyright FEATURES
|
|---|
| 124 | %doc %{_mandir}/man1/xsltproc.1*
|
|---|
| 125 | %{_libdir}/*.dll
|
|---|
| 126 | %{_libdir}/libxslt-plugins
|
|---|
| 127 | %{_bindir}/xsltproc.exe
|
|---|
| 128 |
|
|---|
| 129 | %files devel
|
|---|
| 130 | %defattr(-, root, root)
|
|---|
| 131 | %doc doc/libxslt-api.xml
|
|---|
| 132 | %doc doc/libxslt-refs.xml
|
|---|
| 133 | %doc doc/EXSLT/libexslt-api.xml
|
|---|
| 134 | %doc doc/EXSLT/libexslt-refs.xml
|
|---|
| 135 | %doc %{_mandir}/man3/libxslt.3*
|
|---|
| 136 | %doc %{_mandir}/man3/libexslt.3*
|
|---|
| 137 | %doc doc/*.html doc/html doc/*.gif doc/*.png
|
|---|
| 138 | %doc doc/images
|
|---|
| 139 | %doc doc/tutorial
|
|---|
| 140 | %doc doc/tutorial2
|
|---|
| 141 | %doc doc/EXSLT
|
|---|
| 142 | %{_libdir}/*_dll.a
|
|---|
| 143 | %{_libdir}/*.sh
|
|---|
| 144 | %{_datadir}/aclocal/libxslt.m4
|
|---|
| 145 | %{_includedir}/*
|
|---|
| 146 | %{_bindir}/xslt-config
|
|---|
| 147 | %{_libdir}/pkgconfig/libxslt.pc
|
|---|
| 148 | %{_libdir}/pkgconfig/libexslt.pc
|
|---|
| 149 |
|
|---|
| 150 | %files python
|
|---|
| 151 | %defattr(-, root, root)
|
|---|
| 152 | %{python_sitearch}/libxslt.py*
|
|---|
| 153 | %{python_sitearch}/libxsltmod*
|
|---|
| 154 | %{python_sitearch}/xsltmod.dll
|
|---|
| 155 | %doc python/libxsltclass.txt
|
|---|
| 156 | %doc python/tests/*.py
|
|---|
| 157 | %doc python/tests/*.xml
|
|---|
| 158 | %doc python/tests/*.xsl
|
|---|
| 159 |
|
|---|
| 160 | %changelog
|
|---|
| 161 | * Wed Nov 30 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.1.29-2
|
|---|
| 162 | - add -nostdlib to forwarders, to need less heap
|
|---|
| 163 |
|
|---|
| 164 | * Fri Nov 25 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.1.29-1
|
|---|
| 165 | - update to version 1.1.29
|
|---|
| 166 | - adjust to the current toolchain
|
|---|
| 167 |
|
|---|
| 168 | * Mon Apr 07 2014 yd
|
|---|
| 169 | - build for python 2.7.
|
|---|
| 170 | - added debug package with symbolic info for exceptq.
|
|---|