From d71338dee9f65981e827bca3b4d6d79c0197b4d9 Mon Sep 17 00:00:00 2001 From: Luca Padovani Date: Wed, 17 Jan 2001 17:54:26 +0000 Subject: [PATCH] autoconfiguration improved (well, maybe) --- helm/http_getter/Makefile.in | 9 ++-- helm/http_getter/cadet | 9 ---- helm/http_getter/config.cache.pkg | 4 -- helm/http_getter/configure.in | 50 ++++++++++--------- ...-0.0.1-1.spec => helm_http_getter.spec.in} | 7 +-- helm/http_getter/http_getter.pl.in | 12 ++--- 6 files changed, 43 insertions(+), 48 deletions(-) delete mode 100755 helm/http_getter/cadet delete mode 100644 helm/http_getter/config.cache.pkg rename helm/http_getter/{helm_http_getter-0.0.1-1.spec => helm_http_getter.spec.in} (88%) diff --git a/helm/http_getter/Makefile.in b/helm/http_getter/Makefile.in index ef76f950b..f7f047813 100644 --- a/helm/http_getter/Makefile.in +++ b/helm/http_getter/Makefile.in @@ -1,10 +1,13 @@ -HELM_BIN_DIR=@HELM_BIN_DIR@ +INSTALL_DIR=@RESOLVED_EXEC_PREFIX@/bin + +all: install: - cp http_getter.pl $(HELM_BIN_DIR) + cp http_getter.pl $(INSTALL_DIR) distclean: rm -f Makefile configure config.log config.cache config.status \ http_getter.pl -.PHONY: install distclean +.PHONY: all install distclean + diff --git a/helm/http_getter/cadet b/helm/http_getter/cadet deleted file mode 100755 index 2b84119fa..000000000 --- a/helm/http_getter/cadet +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -# WARNING!!! No "//" in the middle of the path, nor a "/" at the end!!!! - -# For V6.2 -export HELM_CONFIGURATION_PREFIX=~/HELM/installation - -# For V7 -#export HELM_CONFIGURATION_PREFIX=/home/cadet/sacerdot diff --git a/helm/http_getter/config.cache.pkg b/helm/http_getter/config.cache.pkg deleted file mode 100644 index af3e3a1a2..000000000 --- a/helm/http_getter/config.cache.pkg +++ /dev/null @@ -1,4 +0,0 @@ -# This is the config.cache that holds the ``standard'' path for the -# HELM library. It is supposed to be used when creating packages - -helm_cv_DEFAULT_HELM_LIBRARY_DIR=${helm_cv_DEFAULT_HELM_LIBRARY_DIR='$RESOLVED_PREFIX/lib/helm'} diff --git a/helm/http_getter/configure.in b/helm/http_getter/configure.in index 84f3def51..38069607d 100644 --- a/helm/http_getter/configure.in +++ b/helm/http_getter/configure.in @@ -1,5 +1,11 @@ AC_INIT(http_getter.pl.in) +PACKAGE=helm_http_getter +MAJOR_VERSION=0 +MINOR_VERSION=0 +MICRO_VERSION=1 +VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION + if test "x$prefix" != xNONE; then RESOLVED_PREFIX=$prefix else @@ -12,38 +18,36 @@ else RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX fi +AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no) +if test $HAVE_HELM_CONFIG = no; then + AC_MSG_ERROR(helm-config not found) +fi + dnl MISSING CHECKS: -dnl perl-libwww-perl, perl-URI, MIME-Base64, perl-HTML-Parser, perl-XML-Parser +dnl perl-libwww-perl, perl-URI, MIME-Base64, perl-HTML-Parser, perl-XML-Parser, more... + +DEFAULT_HELM_LIB_DIR=`helm-config --lib-dir` -dnl General AC_MSG_CHECKING("for configuration.pl") -RES="" -AC_CACHE_VAL(helm_cv_DEFAULT_HELM_LIBRARY_DIR, - echo "Where is configuration.pl (part of the helm_configuration package)?" - read helm_cv_DEFAULT_HELM_LIBRARY_DIR - RES="Asked" -) -DEFAULT_HELM_LIBRARY_DIR=$helm_cv_DEFAULT_HELM_LIBRARY_DIR -if test "$RES" != "Asked" ; then - DEFAULT_HELM_LIBRARY_DIR=`eval "echo $DEFAULT_HELM_LIBRARY_DIR"` - AC_MSG_RESULT($DEFAULT_HELM_LIBRARY_DIR) +if test ! -f $DEFAULT_HELM_LIB_DIR/configuration.pl; then + AC_MSG_ERROR(Could not find configuration.pl in $DEFAULT_HELM_LIB_DIR, please check your installation) fi -AC_CACHE_SAVE +AC_MSG_RESULT(in $DEFAULT_HELM_LIB_DIR) -AC_PATH_PROG(PERL_BINARY,perl,no) +AC_PATH_PROG(PERL_BINARY, perl, no) if test $PERL_BINARY = no ; then AC_MSG_ERROR(Could not find perl) fi -AC_MSG_CHECKING("for the bin dir") -HELM_BIN_DIR=$RESOLVED_EXEC_PREFIX/bin -AC_MSG_RESULT($HELM_BIN_DIR) - -AC_SUBST(HELM_BIN_DIR) -AC_SUBST(DEFAULT_HELM_LIBRARY_DIR) +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) +AC_SUBST(RESOLVED_PREFIX) +AC_SUBST(RESOLVED_EXEC_PREFIX) +AC_SUBST(DEFAULT_HELM_LIB_DIR) AC_SUBST(PERL_BINARY) AC_OUTPUT([ - Makefile - http_getter.pl -],chmod +x http_getter.pl) + Makefile + http_getter.pl + helm_http_getter.spec +], chmod +x http_getter.pl) diff --git a/helm/http_getter/helm_http_getter-0.0.1-1.spec b/helm/http_getter/helm_http_getter.spec.in similarity index 88% rename from helm/http_getter/helm_http_getter-0.0.1-1.spec rename to helm/http_getter/helm_http_getter.spec.in index e0b83531f..703e4854b 100644 --- a/helm/http_getter/helm_http_getter-0.0.1-1.spec +++ b/helm/http_getter/helm_http_getter.spec.in @@ -1,13 +1,13 @@ Summary: The HELM http getter -Name: helm_http_getter -Version: 0.0.1 +Name: @PACKAGE@ +Version: @VERSION@ Release: 1 Copyright: GPL URL: http://www.cs.unibo.it/helm Packager: Claudio Sacerdoti Coen Requires: helm_configuration = 0.0.1, helm_data = 0.0.1, perl-libwww-perl, perl-URI, MIME-Base64, perl-HTML-Parser, perl-XML-Parser Group: Applications/Publishing -Source: www.cs.unibo.it:/~lpadovan/mml-widget/helm_http_getter-0.0.1-1.tar.gz +Source: www.cs.unibo.it:/helm/@PACKAGE@-@VERSION@-1.tar.gz %description HELM (Hypertextual Electronic Library of Mathematics) is a project aimed at the creation of tools for the development and exploitation of a huge @@ -22,6 +22,7 @@ For more information see http://www.cs.unibo.it/helm %build cp config.cache.pkg config.cache ./configure +make %install make install diff --git a/helm/http_getter/http_getter.pl.in b/helm/http_getter/http_getter.pl.in index 9c68ae710..f0392de2c 100755 --- a/helm/http_getter/http_getter.pl.in +++ b/helm/http_getter/http_getter.pl.in @@ -25,16 +25,16 @@ # First of all, let's load HELM configuration use Env; -my $HELM_LIBRARY_DIR = $ENV{"HELM_LIBRARY_DIR"}; +my $HELM_LIB_DIR = $ENV{"HELM_LIB_DIR"}; # this should be the only fixed constant -my $DEFAULT_HELM_LIBRARY_DIR = "@DEFAULT_HELM_LIBRARY_DIR@"; -if (defined ($HELM_LIBRARY_DIR)) { - $HELM_LIBRARY_PATH = $HELM_LIBRARY_DIR."/configuration.pl"; +my $DEFAULT_HELM_LIB_DIR = "@DEFAULT_HELM_LIB_DIR@"; +if (defined ($HELM_LIB_DIR)) { + $HELM_LIB_PATH = $HELM_LIB_DIR."/configuration.pl"; } else { - $HELM_LIBRARY_PATH = $DEFAULT_HELM_LIBRARY_DIR."/configuration.pl"; + $HELM_LIB_PATH = $DEFAULT_HELM_LIB_DIR."/configuration.pl"; } # next require defines: $helm_dir, $html_link, $dtd_dir, $uris_dbm -require $HELM_LIBRARY_PATH; +require $HELM_LIB_PATH; use HTTP::Daemon; use HTTP::Status; -- 2.39.2