From: Luca Padovani Date: Wed, 17 Jan 2001 17:54:26 +0000 (+0000) Subject: autoconfiguration improved (well, maybe) X-Git-Tag: no-uwobo~29 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=d71338dee9f65981e827bca3b4d6d79c0197b4d9;p=helm.git autoconfiguration improved (well, maybe) --- 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-0.0.1-1.spec deleted file mode 100644 index e0b83531f..000000000 --- a/helm/http_getter/helm_http_getter-0.0.1-1.spec +++ /dev/null @@ -1,31 +0,0 @@ -Summary: The HELM http getter -Name: helm_http_getter -Version: 0.0.1 -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 -%description -HELM (Hypertextual Electronic Library of Mathematics) is a project aimed -at the creation of tools for the development and exploitation of a huge -distributed library of formal mathematical knowledge. This package holds -the getter used to map logical names into phisical names and download -the required files. -For more information see http://www.cs.unibo.it/helm - -%prep -%setup - -%build -cp config.cache.pkg config.cache -./configure - -%install -make install - -%files -%doc AUTHORS COPYING ChangeLog NEWS README -%attr(755,root,root) /usr/local/bin/http_getter.pl diff --git a/helm/http_getter/helm_http_getter.spec.in b/helm/http_getter/helm_http_getter.spec.in new file mode 100644 index 000000000..703e4854b --- /dev/null +++ b/helm/http_getter/helm_http_getter.spec.in @@ -0,0 +1,32 @@ +Summary: The HELM http getter +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:/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 +distributed library of formal mathematical knowledge. This package holds +the getter used to map logical names into phisical names and download +the required files. +For more information see http://www.cs.unibo.it/helm + +%prep +%setup + +%build +cp config.cache.pkg config.cache +./configure +make + +%install +make install + +%files +%doc AUTHORS COPYING ChangeLog NEWS README +%attr(755,root,root) /usr/local/bin/http_getter.pl 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;