Skip to content
Snippets Groups Projects
Commit 3f5cde84f699 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

CFirst try to make a spec file, Daniel

parent b680889ed975
Branches
No related tags found
No related merge requests found
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> Mon Jan 22 19:37:00 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* libxslt/xsltproc.c: avoid segfault when stylesheet is inproper * libxslt/xsltproc.c: avoid segfault when stylesheet is inproper
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
dnl find libxml dnl find libxml
dnl dnl
XML_CONFIG="xml-config" 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" if test "x$LIBXML_PREFIX" != "x"
then then
if ${LIBXML_PREFIX}/bin/xml-config --libs print > /dev/null 2>&1 if ${LIBXML_PREFIX}/bin/xml-config --libs print > /dev/null 2>&1
...@@ -91,9 +91,9 @@ ...@@ -91,9 +91,9 @@
if test "x$XML_CONFIG" != "x" if test "x$XML_CONFIG" != "x"
then then
vers=`$XML_CONFIG --version | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` 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 then
LIBXML_LIBS="`$XML_CONFIG --libs`" LIBXML_LIBS="`$XML_CONFIG --libs`"
LIBXML_CFLAGS="`$XML_CONFIG --cflags`" LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
AC_MSG_RESULT(found) AC_MSG_RESULT(found)
else else
...@@ -95,9 +95,9 @@ ...@@ -95,9 +95,9 @@
then then
LIBXML_LIBS="`$XML_CONFIG --libs`" LIBXML_LIBS="`$XML_CONFIG --libs`"
LIBXML_CFLAGS="`$XML_CONFIG --cflags`" LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
AC_MSG_RESULT(found) AC_MSG_RESULT(found)
else 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 fi
else else
AC_MSG_ERROR(Could not find libxml anywhere.) AC_MSG_ERROR(Could not find libxml anywhere.)
...@@ -124,4 +124,5 @@ ...@@ -124,4 +124,5 @@
tests/REC1/Makefile tests/REC1/Makefile
tests/REC2/Makefile tests/REC2/Makefile
xslt-config xslt-config
libxslt.spec
]) ])
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment