# HG changeset patch # User Daniel Veillard <veillard@src.gnome.org> # Date 980191537 0 # Mon Jan 22 19:25:37 2001 +0000 # Node ID 3f5cde84f69974c6786b3f7695acd2b862ae8a65 # Parent b680889ed975b48a11d8e41df1b8a204ff896fb2 CFirst try to make a spec file, Daniel diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -74,7 +74,7 @@ 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 @@ 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/REC1/Makefile tests/REC2/Makefile xslt-config +libxslt.spec ]) diff --git a/libxslt.spec.in b/libxslt.spec.in new file mode 100644 --- /dev/null +++ b/libxslt.spec.in @@ -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