------------------------------------------------------------ revno: 809 committer: Steven Garcia <steven@satellite> branch nick: aikiframework timestamp: Wed 2011-06-08 18:11:03 -0700 message: Added initial configuration items for an Aiki log utility. modified: Makefile.am configure.ac src/aiki.php src/configs/aiki-defs.inc src/configs/config.php
-- lp:aikiframework https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk Your team Aiki Framework Developers is subscribed to branch lp:aikiframework. To unsubscribe from this branch go to https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
=== modified file 'Makefile.am' --- Makefile.am 2011-06-05 07:35:00 +0000 +++ Makefile.am 2011-06-09 01:11:03 +0000 @@ -177,6 +177,9 @@ # Additional things to do on install install-data-hook : install-desktop + @$(MKDIR) -p $(DESTDIR)$(AIKI_LOG_DIR) + @$(CHMOD) 0700 $(DESTDIR)$(AIKI_LOG_DIR) + @$(CHOWN) $(HTTPD_USER):$(HTTPD_USER) $(DESTDIR)$(AIKI_LOG_DIR) @for d in $$($(FIND) $(DESTDIR)$(sysconfdir)/$(PACKAGE) -type d); do $(CHMOD) 0755 $$d; done @for f in $$($(FIND) $(DESTDIR)$(sysconfdir)/$(PACKAGE) -type f); do $(CHMOD) 0644 $$f; done @for d in $$($(FIND) $(DESTDIR)$(pkgdatadir) -type d); do $(CHMOD) 0755 $$d; done @@ -192,8 +195,11 @@ # Additional things to do on uninstall uninstall-hook : + @$(RM) -f $(DESTDIR)$(AIKI_LOG_DIR)/* @$(RM) -f $(DESTDIR)$(pkgdatadir)/configs/aiki-defs.php @$(RM) -f $(DESTDIR)$(pkgdatadir)/configs/config.php + @if $(TEST) -z "$$($(FIND) $(DESTDIR)$(AIKI_LOG_DIR) -type f)"; then \ + $(RM) -rf $(DESTDIR)$(AIKI_LOG_DIR); fi @if $(TEST) -z "$$($(FIND) $(DESTDIR)$(pkgdatadir) -type f)"; then \ $(RM) -rf $(DESTDIR)$(pkgdatadir); fi @if $(TEST) -z "$$($(FIND) $(DESTDIR)$(docdir)-$(VERSION) -type f)"; then \ === modified file 'configure.ac' --- configure.ac 2011-06-08 02:10:56 +0000 +++ configure.ac 2011-06-09 01:11:03 +0000 @@ -330,23 +330,52 @@ fi VAR_LIST_ADD HTTPD_CONF_DIR $HTTPD_CONF_DIR +AC_ARG_VAR(HTTPD_USER,[Set the HTTPD user. You may specify a numeric user ID \ +as well. On Debian-based systems, Apache runs as the user www-data. In some \ +configurations the user may be set to nobody. Yet in others, the user may \ +be set to your own user ID. This may be found in the Apache conifiguration \ +file as: User apache and Group apache. This will be used by this package for \ +read/write access to files and directories [default: HTTPD_USER=apache]]) +if $TEST -z $HTTPD_USER; then AC_SUBST(HTTPD_USER,[apache]) +fi +VAR_LIST_ADD HTTPD_USER $HTTPD_USER + AC_ARG_VAR(AIKI_LOGIN_URL,[Set the login URL [default: AIKI_LOGIN_URL=http://$DOMAIN/$PACKAGE/login]]) if $TEST -z $AIKI_LOGIN_URL; then AC_SUBST(AIKI_LOGIN_URL,[http://$DOMAIN/$PACKAGE/login]) fi VAR_LIST_ADD AIKI_LOGIN_URL $AIKI_LOGIN_URL - AC_ARG_VAR(AIKI_REWRITE_BASE,[Set the rewrite-base [default: AIKI_REWRITE_BASE=/$PACKAGE]]) if $TEST -z $AIKI_REWRITE_BASE; then AC_SUBST(AIKI_REWRITE_BASE,[/$PACKAGE]) fi VAR_LIST_ADD AIKI_REWRITE_BASE $AIKI_REWRITE_BASE - AC_ARG_VAR(AIKI_SITE_URL,[Set the site URL [default: AIKI_SITE_URL=http://$DOMAIN/$PACKAGE/]]) if $TEST -z $AIKI_SITE_URL; then AC_SUBST(AIKI_SITE_URL,[http://$DOMAIN/$PACKAGE/]) fi VAR_LIST_ADD AIKI_SITE_URL $AIKI_SITE_URL +AC_ARG_VAR(AIKI_LOG_DIR,[Set the log directory [default: AIKI_LOG_DIR=/var/log/$PACKAGE]]) +if $TEST -z $AIKI_LOG_DIR; then AC_SUBST(AIKI_LOG_DIR,[/var/log/$PACKAGE]) +fi +VAR_LIST_ADD AIKI_LOG_DIR $AIKI_LOG_DIR + +AC_ARG_VAR(AIKI_LOG_FILE,[Set the log file name [default: AIKI_LOG_FILE=$PACKAGE.log]]) +if $TEST -z $AIKI_LOG_FILE; then AC_SUBST(AIKI_LOG_FILE,[$PACKAGE.log]) +fi +VAR_LIST_ADD AIKI_LOG_FILE $AIKI_LOG_FILE + +AC_ARG_VAR(AIKI_LOG_PROFILE,[Set the host profile log name \ +[default: AIKI_LOG_PROFILE=profile.log]]) +if $TEST -z $AIKI_LOG_PROFILE; then AC_SUBST(AIKI_LOG_PROFILE,[profile.log]) +fi +VAR_LIST_ADD AIKI_LOG_PROFILE $AIKI_LOG_PROFILE + +AC_ARG_VAR(AIKI_LOG_LEVEL,[Set the log level where valid values are: NONE, \ +ERROR, WARN, INFO and DEBUG [default: AIKI_LOG_LEVEL=ERROR]]) +if $TEST -z $AIKI_LOG_LEVEL; then AC_SUBST(AIKI_LOG_LEVEL,[ERROR]) +fi +VAR_LIST_ADD AIKI_LOG_LEVEL $AIKI_LOG_LEVEL # use eval to force variable substitution/expansion PKG_DATA_DIR=$($EVAL $EVAL $EVAL $ECHO $datadir/$PACKAGE) === modified file 'src/aiki.php' --- src/aiki.php 2011-06-08 23:20:44 +0000 +++ src/aiki.php 2011-06-09 01:11:03 +0000 @@ -53,7 +53,7 @@ * When the MINOR number changes, the FIX number should reset to zero. * When the MAJOR number changes, the MINOR number should reset to zero. * When the MAJOR number is zero, this indicates an alpha or beta type release - * Each number can, but should probably not exceed 99 + * Each number can, but should probably not exceed 99 */ define('AIKI_VERSION','0.8.8'); } === modified file 'src/configs/aiki-defs.inc' --- src/configs/aiki-defs.inc 2011-06-07 03:10:07 +0000 +++ src/configs/aiki-defs.inc 2011-06-09 01:11:03 +0000 @@ -16,9 +16,15 @@ * @package Aiki * @version @VERSION@.@REVISION@ * @filesource + * + * IMPORTANT + * + * The values for the define statements in this file are generated + * automatically when the autoconf configure script is executed. + * These are ment to be used as the default configuration. Please, + * be aware that the configuration is expected change during run-time. */ - /** * Aiki Framework Version */ @@ -64,3 +70,19 @@ * Aiki Rewrite Base (for htaccess) */ define("AIKI_REWRITE_BASE", "@AIKI_REWRITE_BASE@"); +/** + * Aiki Log Directory + */ +define("AIKI_LOG_DIR", "@AIKI_LOG_DIR@"); +/** + * Aiki Log File Name + */ +define("AIKI_LOG_FILE", "@AIKI_LOG_FILE@"); +/** + * Aiki Host Profile File Name + */ +define("AIKI_LOG_PROFILE", "@AIKI_LOG_PROFILE@"); +/** + * Aiki Log Level + */ +define("AIKI_LOG_LEVEL", "@AIKI_LOG_LEVEL@"); === modified file 'src/configs/config.php' --- src/configs/config.php 2011-06-08 20:44:38 +0000 +++ src/configs/config.php 2011-06-09 01:11:03 +0000 @@ -130,4 +130,16 @@ // enable debugging $config["debug"] = false; +// set the aiki log directory +$config["log_dir"] = AIKI_LOG_DIR; + +// set the aiki log file name +$config["log_file"] = AIKI_LOG_FILE; + +// set the aiki host profile name +$config["log_profile"] = AIKI_LOG_PROFILE; + +// set the aiki log level +$config["log_level"] = AIKI_LOG_LEVEL; + ?>
_______________________________________________ Mailing list: https://launchpad.net/~aikiframework-devel Post to : [email protected] Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp

