[Lunar-commits] r18388 - lunar/branches/stable/var/lib/lunar/functions
Auke Kok
sofar at lunar-linux.org
Sun Jan 29 19:28:33 UTC 2006
Author: sofar
Date: 2006-01-29 19:28:29 +0000 (Sun, 29 Jan 2006)
New Revision: 18388
Modified:
lunar/branches/stable/var/lib/lunar/functions/build.lunar
lunar/branches/stable/var/lib/lunar/functions/depends.lunar
lunar/branches/stable/var/lib/lunar/functions/init.lunar
Log:
Backport - mostly cosmetics and internals.
Modified: lunar/branches/stable/var/lib/lunar/functions/build.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/build.lunar 2006-01-29 18:49:10 UTC (rev 18387)
+++ lunar/branches/stable/var/lib/lunar/functions/build.lunar 2006-01-29 19:28:29 UTC (rev 18388)
@@ -147,57 +147,66 @@
}
+# wrapper function to call ./configure
+_configure()
+{
+ debug_msg "_configure($@)"
+ if [ -e ./configure ]; then
+ verbose_msg "CFLAGS=\"$CFLAGS\""
+ verbose_msg "LDFLAGS=\"$LDFLAGS\""
+ verbose_msg "./configure $@"
+ ./configure $@
+ elif [ -e Makefile -o -e makefile ]; then
+ verbose_msg "Missing \"configure\": skipping configure stage."
+ else
+ error_message "${PROBLEM_COLOR}Missing ${FILE_COLOR}configure${PROBLEM_COLOR} and/or ${FILE_COLOR}Makefile${PROBLEM_COLOR}!${DEFAULT_COLOR}"
+ return 1
+ fi
+}
+
+
default_config() {
debug_msg "default_config ($@)"
verbose_msg "running \"default_config\""
-
- verbose_msg "CFLAGS=\"$CFLAGS\"" &&
- verbose_msg "OPTS=\"$OPTS\"" &&
- verbose_msg "./configure --build=$BUILD --prefix=$MODULE_PREFIX --sysconfdir=/etc --localstatedir=/var --infodir=$MODULE_PREFIX/share/info --mandir=$MODULE_PREFIX/share/man $OPTS"
-
- ./configure --build=$BUILD \
- --prefix=$MODULE_PREFIX \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --infodir=$MODULE_PREFIX/share/info \
- --mandir=$MODULE_PREFIX/share/man \
- $OPTS
+ _configure --build=$BUILD \
+ --prefix=$MODULE_PREFIX \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=$MODULE_PREFIX/share/info \
+ --mandir=$MODULE_PREFIX/share/man \
+ $OPTS
} > $C_FIFO 2>&1
default_game_config() {
debug_msg "default_game_config ($@)"
verbose_msg "running \"default_game_config\""
- verbose_msg "CFLAGS=\"$CFLAGS\"" &&
- verbose_msg "OPTS=\"$OPTS\"" &&
- verbose_msg "./configure --build=$BUILD --prefix=$MODULE_PREFIX --bindir=$MODULE_PREFIX/games --datadir=$MODULE_PREFIX/share/games --sysconfdir=/etc --localstatedir=/var --infodir=$MODULE_PREFIX/share/info --mandir=$MODULE_PREFIX/share/man $OPTS"
-
- ./configure --build=$BUILD \
- --prefix=$MODULE_PREFIX \
- --bindir=$MODULE_PREFIX/games \
- --datadir=$MODULE_PREFIX/share/games \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --infodir=$MODULE_PREFIX/share/info \
- --mandir=$MODULE_PREFIX/share/man \
- $OPTS
+ _configure --build=$BUILD \
+ --prefix=$MODULE_PREFIX \
+ --bindir=$MODULE_PREFIX/games \
+ --datadir=$MODULE_PREFIX/share/games \
+ --sysconfdir=/etc \
+ --localstatedir=/var/games \
+ --infodir=$MODULE_PREFIX/share/info \
+ --mandir=$MODULE_PREFIX/share/man \
+ $OPTS
} > $C_FIFO 2>&1
default_cvs_config() {
debug_msg "default_cvs_config ($@)"
verbose_msg "running \"default_cvs_config\""
- verbose_msg "CFLAGS=\"$CFLAGS\"" &&
- verbose_msg "OPTS=\"$OPTS\"" &&
- verbose_msg "./autogen.sh --build=$BUILD --prefix=$MODULE_PREFIX --sysconfdir=/etc --localstatedir=/var --infodir=$MODULE_PREFIX/share/info --mandir=$MODULE_PREFIX/share/man $OPTS"
+ verbose_msg "CFLAGS=\"$CFLAGS\""
+ verbose_msg "LDFLAGS=\"$LDFLAGS\""
+ verbose_msg "MODULE_PREFIX=\"$MODULE_PREFIX\""
- ./autogen.sh --build=$BUILD \
- --prefix=$MODULE_PREFIX \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --infodir=$MODULE_PREFIX/share/info \
- --mandir=$MODULE_PREFIX/share/man \
- $OPTS
+ ./autogen.sh --build=$BUILD \
+ --prefix=$MODULE_PREFIX \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=$MODULE_PREFIX/share/info \
+ --mandir=$MODULE_PREFIX/share/man \
+ $OPTS
} > $C_FIFO 2>&1
@@ -209,6 +218,7 @@
make install
} > $C_FIFO 2>&1
+
default_game_build() {
debug_msg "default_game_build ($@)"
verbose_msg "running \"default_game_build\""
@@ -216,6 +226,7 @@
default_make
} > $C_FIFO 2>&1
+
default_build() {
debug_msg "default_build ($@)"
verbose_msg "running \"default_build\""
Modified: lunar/branches/stable/var/lib/lunar/functions/depends.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/depends.lunar 2006-01-29 18:49:10 UTC (rev 18387)
+++ lunar/branches/stable/var/lib/lunar/functions/depends.lunar 2006-01-29 19:28:29 UTC (rev 18388)
@@ -203,9 +203,9 @@
fi
if module_installed $DEP ; then
- DEPMOD_AVAIL="Use optional ${MESSAGE_COLOR}(presently installed) module${QUERY_COLOR} $DEP"
+ DEPMOD_AVAIL="Use optional (${FILE_COLOR}installed${QUERY_COLOR}) module ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${MESSAGE_COLOR}"
else
- DEPMOD_AVAIL="Install & use optional ${PROBLEM_COLOR}(not yet installed) ${MESSAGE_COLOR}module${QUERY_COLOR} $DEP"
+ DEPMOD_AVAIL="Install & use optional (${PROBLEM_COLOR}not installed${QUERY_COLOR}) module ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${MESSAGE_COLOR}"
fi
# this is shortcut case s1) as discussed in lunar-dev ML
@@ -214,7 +214,7 @@
add_depends "$MODULE" "$DEP" "on" "optional" "$2" "$3"
lin --deps $DEP
elif query "$DEPMOD_AVAIL
- dependency - purpose: $4? " $DEFAULT ; then
+ ${QUERY_COLOR}Purpose: ${DEFAULT_COLOR}${MESSAGE_COLOR}$4 ${QUERY_COLOR}?" $DEFAULT ; then
add_depends "$MODULE" "$DEP" "on" "optional" "$2" "$3"
lin --deps $DEP
else
Modified: lunar/branches/stable/var/lib/lunar/functions/init.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/init.lunar 2006-01-29 18:49:10 UTC (rev 18387)
+++ lunar/branches/stable/var/lib/lunar/functions/init.lunar 2006-01-29 19:28:29 UTC (rev 18388)
@@ -31,7 +31,7 @@
enviro_check() {
debug_msg "enviro_check ($@)"
if [ -z $LUNAR_INSTALL ]; then
- if [ -z "$SHELL" ] || [ "$USER" != "root" ] ; then
+ if [ -z "$SHELL" ] || [ "$(getent passwd $USER | cut -d: -f3)" != "0" ] ; then
message "${PROBLEM_COLOR}WARNING:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
"You are not running a fully initialized root shell, consider"
message "running a proper root shell with 'su -'" \
More information about the Lunar-commits
mailing list