-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
+
+++ /dev/null
-#! /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
+++ /dev/null
-# 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'}
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
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)
+++ /dev/null
-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
--- /dev/null
+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
# 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;