]> matita.cs.unibo.it Git - helm.git/commitdiff
autoconfiguration improved (well, maybe)
authorLuca Padovani <luca.padovani@unito.it>
Wed, 17 Jan 2001 17:54:26 +0000 (17:54 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Wed, 17 Jan 2001 17:54:26 +0000 (17:54 +0000)
helm/http_getter/Makefile.in
helm/http_getter/cadet [deleted file]
helm/http_getter/config.cache.pkg [deleted file]
helm/http_getter/configure.in
helm/http_getter/helm_http_getter-0.0.1-1.spec [deleted file]
helm/http_getter/helm_http_getter.spec.in [new file with mode: 0644]
helm/http_getter/http_getter.pl.in

index ef76f950b1ec6a0ed66f4110a3fb013f96b5378c..f7f047813a61344e93bea02de9e9ca443d22e9b4 100644 (file)
@@ -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 (executable)
index 2b84119..0000000
+++ /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 (file)
index af3e3a1..0000000
+++ /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'}
index 84f3def5140a3a64b56dca8fefd6ef8f7e85e00d..38069607d7f73595b5680873a91ad25a5fce1c6e 100644 (file)
@@ -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 (file)
index e0b8353..0000000
+++ /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 <sacerdot@cs.unibo.it>
-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 (file)
index 0000000..703e485
--- /dev/null
@@ -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 <sacerdot@cs.unibo.it>
+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
index 9c68ae71077c7e97ee7ffc87ffd719fd19cab60c..f0392de2caa9acd9cbafb1b4805ba6f71e28e1c3 100755 (executable)
 
 # 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;