1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2026-01-07 21:58:22 +03:00

CFirst try to make a spec file, Daniel

This commit is contained in:
Daniel Veillard
2001-01-22 19:25:37 +00:00
parent 4ca88e820a
commit 6db2425bdb
3 changed files with 104 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
Mon Jan 22 20:24:36 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* configure.in libxslt.spec.in: first try to get a spec file
Mon Jan 22 19:37:00 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* libxslt/xsltproc.c: avoid segfault when stylesheet is inproper

View File

@@ -74,7 +74,7 @@ dnl
dnl find libxml
dnl
XML_CONFIG="xml-config"
AC_MSG_CHECKING(for libxml libraries >= 2.x)
AC_MSG_CHECKING(for libxml libraries >= 2.2.12)
if test "x$LIBXML_PREFIX" != "x"
then
if ${LIBXML_PREFIX}/bin/xml-config --libs print > /dev/null 2>&1
@@ -91,13 +91,13 @@ dnl
if test "x$XML_CONFIG" != "x"
then
vers=`$XML_CONFIG --version | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test "$vers" -ge 2000000
if test "$vers" -ge 2002012
then
LIBXML_LIBS="`$XML_CONFIG --libs`"
LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
AC_MSG_RESULT(found)
else
AC_MSG_ERROR(You need at least libxml 2.x for this version of libxml)
AC_MSG_ERROR(You need at least libxml 2.2.12 for this version of libxml)
fi
else
AC_MSG_ERROR(Could not find libxml anywhere.)
@@ -124,4 +124,5 @@ tests/Makefile
tests/REC1/Makefile
tests/REC2/Makefile
xslt-config
libxslt.spec
])

96
libxslt.spec.in Normal file
View File

@@ -0,0 +1,96 @@
# Note that this is NOT a relocatable package
%define ver @VERSION@
%define prefix /usr
Summary: Library providing XSLT support
Name: libxstl
Version: %ver
Release: 1
Copyright: LGPL
Group: Development/Libraries
Source: ftp://xmlsoft.org/XSLT/libxslt-%{ver}.tar.gz
BuildRoot: /var/tmp/libxslt-%{PACKAGE_VERSION}-root
Requires: libxml2 >= 2.2.12
URL: http://xmlsoft.org/
Docdir: %{prefix}/doc
%description
This C library allows to transform XML files into other XML files
(or HTML, text, ...) using the standard XSLT stylesheet transformation
mechanism. To use it you need to have a version of libxml2 >= 2.2.12
installed.
%package devel
Summary: Libraries, includes, etc. to develop XML and HTML applications
Group: Development/Libraries
Requires: libxslt = %{version}
%description devel
This C library allows to transform XML files into other XML files
(or HTML, text, ...) using the standard XSLT stylesheet transformation
mechanism. To use it you need to have a version of libxml2 >= 2.2.12
installed.
%changelog
* Mon Jan 22 2001 Daniel.Veillard <Daniel.Veillard@imag.fr>
- created based on libxml2 spec file
%prep
%setup
%build
# Needed for snapshot releases.
if [ ! -f configure ]; then
%ifarch alpha
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc"
%else
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --sysconfdir="/etc"
%endif
else
%ifarch alpha
CFLAGS="$RPM_OPT_FLAGS" ./configure --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc"
%else
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --sysconfdir="/etc"
%endif
fi
if [ "$SMP" != "" ]; then
(make "MAKE=make -k -j $SMP"; exit 0)
make
else
make
fi
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/usr/man/man1
install -d $RPM_BUILD_ROOT/usr/man/man4
make prefix=$RPM_BUILD_ROOT%{prefix} install
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog NEWS README COPYING COPYING.LIB TODO
%{prefix}/lib/lib*.so.*
%{prefix}/bin/xsltproc
%files devel
%defattr(-, root, root)
%{prefix}/lib/lib*.so
%{prefix}/lib/*a
%{prefix}/lib/*.sh
%{prefix}/include/*
%{prefix}/bin/xslt-config