diff --git a/sc2/autogen.sh b/sc2/autogen.sh new file mode 100755 index 000000000..8b7666b12 --- /dev/null +++ b/sc2/autogen.sh @@ -0,0 +1,116 @@ +#! /bin/sh -e + +if [ "$#" != 0 ]; then + case "$1" in + (--version) + cat < and Kalle Olavi Niemitalo +(originally for the FSCP) +This program is free software; you may redistribute it under the terms of +the GNU General Public License. This program has absolutely no warranty. +EOF + exit 0 + ;; + (--help) + cat <. +EOF + exit 0 + ;; + (-*) + # Don't parse backslashes in $0 or $1. + printf >&2 "%s: invalid option -- %s\n" "$0" "$1" + printf >&2 "Try \"%s --help\" for more information.\n" "$0" + exit 1 + ;; + (*) + printf >&2 "%s: non-option arguments don't work.\n" + printf >&2 "Try \"%s --help\" for more information.\n" "$0" + exit 1 + ;; + esac +fi + +# Like printf, except prepend the program name and append a newline. +# This is used for error messages too, so don't check --quiet here. +note () +{ + local fmt + fmt="$1" + shift + printf "%s: ${fmt}\n" "$0" "$@" +} + +if [ ! -d libltdl ]; then + note "Running libtoolize" + libtoolize --automake --ltdl +fi + +#if [ ! -d po ]; then +# note "Running gettextize" +# gettextize --intl +#fi + +#if [ ! -f po/POTFILES.in ]; then +# note "Making POTFILES.in" +# ls src/*.[ch] src/sc2code/*.[ch] src/sc2code/*/*.[ch] > po/POTFILES.in +#fi + +if [ ! -f aclocal.m4 ]; then + note "Running aclocal" + aclocal +fi + +if [ ! -x config.h.in ]; then + note "Running autoheader" + autoheader +fi + +if [ ! -x configure ]; then + note "Running autoconf" + autoconf +fi + +if [ ! -f ChangeLog ]; then + if [ -x /usr/bin/cvs2cl ]; then + note "Creating ChangeLog from CVS" + cvs2cl -P -r -t -U AUTHORS + # If there's no route to the CVS server, cvs2cl exits with code 0 + # but does not create ChangeLog. We notice that below. + fi + if [ ! -f ChangeLog ]; then + note "Creating dummy ChangeLog" + touch ChangeLog + fi +fi + +if [ ! -e INSTALL.generic ]; then + # There is aclocal --print-ac-dir, but no such thing for Autoconf. :-( + # We can't grep autoconf_dir "$(which autoconf)" either, because + # Debian puts the real Autoconf in /usr/bin/autoconf2.50 and makes + # /usr/bin/autoconf a wrapper. + found= + for dir in /usr/local/share/autoconf /usr/share/autoconf; do + if [ -e "${dir}/INSTALL" ]; then + note "Linking INSTALL.generic" + ln -s "${dir}/INSTALL" INSTALL.generic + found=t + break + fi + done + if [ -z "${found}" ]; then + note >&2 "Autoconf directory not found" + exit 1 + fi +fi + +note "Running automake" +automake --add-missing diff --git a/sc2/sc2.lsm.in b/sc2/sc2.lsm.in new file mode 100644 index 000000000..ecb947f82 --- /dev/null +++ b/sc2/sc2.lsm.in @@ -0,0 +1,17 @@ +Begin3 +Title: sc2 +Version: @VERSION@ +Entered-date: @ISODATE@ +Description: Star Control II + Open source release of Star Control II, +Keywords: game space exploration adventure arcade +Author: +Maintained-by: +Primary-site: http://sc2.sourceforge.net + 31k sc2-@VERSION@.tar.gz + 500 sc2.lsm +Alternate-site: +Original-site: +Platforms: linux-i386 win32 +Copying-policy: GNU copyleft +End