From: Joe Z. <jz...@us...> - 2003-02-05 02:05:57
|
Update of /cvsroot/bobs/bobs In directory sc8-pr-cvs1:/tmp/cvs-serv1209/bobs Modified Files: Makefile.am Makefile.in configure configure.in Log Message: All installed files now fall under ${prefix} and ${DESTDIR}. This should help with 'make rpm'. Index: Makefile.am =================================================================== RCS file: /cvsroot/bobs/bobs/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile.am 3 Feb 2003 05:51:42 -0000 1.9 +++ Makefile.am 5 Feb 2003 02:05:21 -0000 1.10 @@ -66,25 +66,26 @@ if test -n "$(myHTTPDUSER)"; then \ chown -R $(myHTTPDUSER) $(myBOBSDATA); \ - chown -R $(myHTTPDUSER) $(myWEBDIR)/inc/servers; \ fi # Remove some other crap for 'make distclean' distclean-local: rm -rf auto*.cache -# not enuf auth rm -rf $(PACKAGE)-$(VERSION) + -chmod 755 $(PACKAGE)-$(VERSION) + -rm -rf $(PACKAGE)-$(VERSION) rm -f $(PACKAGE)-$(VERSION).tar.gz # # Extra stuff to uninstall +# The '-' on '-rmdir' tells 'make' to ignore any error returned by command # uninstall-local: - rmdir $(htmldir) - rmdir $(myBOBSDATA)/current/process/{cmd,mounts,session} - rmdir $(myBOBSDATA)/current/process - rmdir $(myBOBSDATA)/current - rmdir $(myBOBSDATA) + -rmdir `find $(myWEBDIR) -type d | sort -r` + -rmdir $(myBOBSDATA)/current/process/{cmd,mounts,session} + -rmdir $(myBOBSDATA)/current/process + -rmdir $(myBOBSDATA)/current + -rmdir $(myBOBSDATA) # # This will remove all the install directories - empty or not. Index: Makefile.in =================================================================== RCS file: /cvsroot/bobs/bobs/Makefile.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.in 3 Feb 2003 05:51:42 -0000 1.6 +++ Makefile.in 5 Feb 2003 02:05:21 -0000 1.7 @@ -82,9 +82,12 @@ install_sh = @install_sh@ myBOBSDATA = @myBOBSDATA@ myCRONDIR = @myCRONDIR@ +myCRONTABDIR = @myCRONTABDIR@ myHTTPDUSER = @myHTTPDUSER@ myPASS = @myPASS@ myWEBDIR = @myWEBDIR@ +myrealBOBSDATA = @myrealBOBSDATA@ +myrealWEBDIR = @myrealWEBDIR@ SUBDIRS = bash doc cron images inc js winc @@ -472,25 +475,26 @@ if test -n "$(myHTTPDUSER)"; then \ chown -R $(myHTTPDUSER) $(myBOBSDATA); \ - chown -R $(myHTTPDUSER) $(myWEBDIR)/inc/servers; \ fi # Remove some other crap for 'make distclean' distclean-local: rm -rf auto*.cache -# not enuf auth rm -rf $(PACKAGE)-$(VERSION) + -chmod 755 $(PACKAGE)-$(VERSION) + -rm -rf $(PACKAGE)-$(VERSION) rm -f $(PACKAGE)-$(VERSION).tar.gz # # Extra stuff to uninstall +# The '-' on '-rmdir' tells 'make' to ignore any error returned by command # uninstall-local: - rmdir $(htmldir) - rmdir $(myBOBSDATA)/current/process/{cmd,mounts,session} - rmdir $(myBOBSDATA)/current/process - rmdir $(myBOBSDATA)/current - rmdir $(myBOBSDATA) + -rmdir `find $(myWEBDIR) -type d | sort -r` + -rmdir $(myBOBSDATA)/current/process/{cmd,mounts,session} + -rmdir $(myBOBSDATA)/current/process + -rmdir $(myBOBSDATA)/current + -rmdir $(myBOBSDATA) # # This will remove all the install directories - empty or not. Index: configure =================================================================== RCS file: /cvsroot/bobs/bobs/configure,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- configure 22 Dec 2002 02:30:31 -0000 1.4 +++ configure 5 Feb 2003 02:05:21 -0000 1.5 @@ -259,6 +259,7 @@ PACKAGE_BUGREPORT='' ac_unique_file="admin.php" +ac_default_prefix='' # Initialize some variables set by options. ac_init_help= @@ -1547,10 +1548,12 @@ + + # Check whether --with-webdir or --without-webdir was given. if test "${with_webdir+set}" = set; then withval="$with_webdir" - myWEBDIR=${DESTDIR}$with_webdir/bobs + myWEBDIR=$with_webdir/bobs else echo "$as_me:$LINENO: checking for /home/httpd/html" >&5 @@ -1571,7 +1574,7 @@ echo "$as_me:$LINENO: result: $ac_cv_file__home_httpd_html" >&5 echo "${ECHO_T}$ac_cv_file__home_httpd_html" >&6 if test $ac_cv_file__home_httpd_html = yes; then - myDOCUMENTROOT=/home/httpd/html + myDOCUMENTROOT='${prefix}'/home/httpd/html fi echo "$as_me:$LINENO: checking for /var/www/html" >&5 @@ -1592,7 +1595,7 @@ echo "$as_me:$LINENO: result: $ac_cv_file__var_www_html" >&5 echo "${ECHO_T}$ac_cv_file__var_www_html" >&6 if test $ac_cv_file__var_www_html = yes; then - myDOCUMENTROOT=/var/www/html + myDOCUMENTROOT='${prefix}'/var/www/html fi if test -z "$myDOCUMENTROOT"; then @@ -1602,7 +1605,7 @@ echo "$as_me: error: \"*** Please use the --with-webdir=DIR configuration option.\"" >&2;} { (exit 1); exit 1; }; } else - myWEBDIR=${DESTDIR}${myDOCUMENTROOT}/bobs + myWEBDIR=${myDOCUMENTROOT}/bobs fi @@ -1613,9 +1616,9 @@ # Check whether --with-bobsdata or --without-bobsdata was given. if test "${with_bobsdata+set}" = set; then withval="$with_bobsdata" - myBOBSDATA=${DESTDIR}${with_bobsdata}/bobsdata + myBOBSDATA=${with_bobsdata}/bobsdata else - myBOBSDATA=${DESTDIR}/var/bobsdata + myBOBSDATA=${localstatedir}/bobsdata fi; @@ -1623,9 +1626,9 @@ # Check whether --with-crondir or --without-crondir was given. if test "${with_crondir+set}" = set; then withval="$with_crondir" - myCRONDIR=${DESTDIR}${with_crondir} + myCRONDIR=${with_crondir} else - myCRONDIR=${DESTDIR}/etc/cron.daily + myCRONDIR=${sysconfdir}/cron.daily fi; @@ -1650,6 +1653,10 @@ myPASS=admin +myCRONTABDIR=${sysconfdir} + + + @@ -1662,6 +1669,19 @@ ac_config_files="$ac_config_files Makefile bash/Makefile cron/Makefile doc/Makefile images/Makefile images/bar/Makefile images/menu/Makefile inc/Makefile inc/Makefile inc/excludes/Makefile inc/servers/Makefile inc/templates/Makefile js/Makefile winc/Makefile" + +myrealBOBSDATA=`( + test "x$prefix" = xNONE && prefix=$ac_default_prefix + eval echo "$myBOBSDATA" +)` + + +myrealWEBDIR=`( + test "x$prefix" = xNONE && prefix=$ac_default_prefix + eval echo "$myWEBDIR" +)` + + ac_config_files="$ac_config_files inc/config.php cron/backup.php cron/check_loop" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -2277,8 +2297,11 @@ s,@myWEBDIR@,$myWEBDIR,;t t s,@myBOBSDATA@,$myBOBSDATA,;t t s,@myCRONDIR@,$myCRONDIR,;t t +s,@myCRONTABDIR@,$myCRONTABDIR,;t t s,@myPASS@,$myPASS,;t t s,@myHTTPDUSER@,$myHTTPDUSER,;t t +s,@myrealBOBSDATA@,$myrealBOBSDATA,;t t +s,@myrealWEBDIR@,$myrealWEBDIR,;t t CEOF _ACEOF @@ -2510,12 +2533,22 @@ echo " ======================================== -Your configuration: - web pages directory = $myWEBDIR - bobs data directory = $myBOBSDATA - cron directory = $myCRONDIR - admin password = $myPASS - -*** $WARNCOUNT warning(s) -" +Your configuration:" +echo -n " web pages directory = "; eval echo $myWEBDIR +echo -n " bobs data directory = "; eval echo $myBOBSDATA +echo -n " cron directory = "; eval echo $myCRONDIR +echo " admin password = $myPASS" +echo "" +echo "*** $WARNCOUNT warning(s)" +echo "" +echo "The following is just for testing and will be removed:" +echo "" +echo "prefix: ${prefix}" +echo "sysconfdir: ${sysconfdir}" +echo "myWEBDIR: ${myWEBDIR}" +echo "myrealWEBDIR: ${myrealWEBDIR}" +echo "myBOBSDATA: ${myBOBSDATA}" +echo "myrealBOBSDATA: ${myrealBOBSDATA}" +echo "myCRONDIR: ${myCRONDIR}" +echo "myCRONTABDIR: ${myCRONTABDIR}" Index: configure.in =================================================================== RCS file: /cvsroot/bobs/bobs/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- configure.in 22 Dec 2002 02:30:32 -0000 1.6 +++ configure.in 5 Feb 2003 02:05:22 -0000 1.7 @@ -10,6 +10,7 @@ dnl> Get 'make dist' to work. dnl> This is how I am currently building the package: dnl> aclocal;autoconf;automake --add-missing;./configure +dnl> 02-03-2003 Provide destination for crontab for 'make rpm'. PACKAGE=bobs VERSION=0.5.1 @@ -28,20 +29,25 @@ WARNCOUNT=0 dnl> +dnl> make the root directory '/' the default for the installation +dnl> +AC_PREFIX_DEFAULT('') + +dnl> dnl> Decide where to put the bobs web pages. dnl> If not specified --with-webdir, then look for the http root. dnl> AC_ARG_WITH(webdir,[ --with-webdir=DIR Place the bobs web pages in DIR], - myWEBDIR=${DESTDIR}$with_webdir/bobs, + myWEBDIR=$with_webdir/bobs, [ - AC_CHECK_FILE(/home/httpd/html,myDOCUMENTROOT=/home/httpd/html) - AC_CHECK_FILE(/var/www/html, myDOCUMENTROOT=/var/www/html) + AC_CHECK_FILE(/home/httpd/html,myDOCUMENTROOT='${prefix}'/home/httpd/html) + AC_CHECK_FILE(/var/www/html, myDOCUMENTROOT='${prefix}'/var/www/html) if test -z "$myDOCUMENTROOT"; then AC_MSG_WARN("*** I\'m unable to determine where your website root is.") AC_MSG_ERROR("*** Please use the --with-webdir=DIR configuration option.") else - myWEBDIR=${DESTDIR}${myDOCUMENTROOT}/bobs + myWEBDIR=${myDOCUMENTROOT}/bobs fi ] ) @@ -53,7 +59,7 @@ dnl> AC_ARG_WITH(bobsdata,[ --with-bobsdata=DIR Place the bobs data (backups) in DIR ], - myBOBSDATA=${DESTDIR}${with_bobsdata}/bobsdata, myBOBSDATA=${DESTDIR}/var/bobsdata ) + myBOBSDATA=${with_bobsdata}/bobsdata, myBOBSDATA=${localstatedir}/bobsdata ) dnl> dnl> Set the location of the cron.daily directory @@ -62,7 +68,7 @@ dnl> AC_ARG_WITH(crondir,[ --with-crondir=DIR Location of cron.daily directory ], - myCRONDIR=${DESTDIR}${with_crondir}, myCRONDIR=${DESTDIR}/etc/cron.daily ) + myCRONDIR=${with_crondir}, myCRONDIR=${sysconfdir}/cron.daily ) dnl> dnl> Try to determine the user id of the web server. @@ -87,6 +93,12 @@ myPASS=admin dnl> +dnl> Location of crontab file +dnl> + +myCRONTABDIR=${sysconfdir} + +dnl> dnl> The following variables will will be substituted with their dnl> actual values in the files specified in AC_OUTPUT(). dnl> @@ -94,6 +106,7 @@ AC_SUBST(myWEBDIR) AC_SUBST(myBOBSDATA) AC_SUBST(myCRONDIR) +AC_SUBST(myCRONTABDIR) AC_SUBST(myPASS) AC_SUBST(myHTTPDUSER) AC_SUBST(PACKAGE) @@ -120,6 +133,22 @@ winc/Makefile ]) +dnl> +dnl> Resolve ${prefix} to final variable for these files +dnl> + +myrealBOBSDATA=`( + test "x$prefix" = xNONE && prefix=$ac_default_prefix + eval echo "$myBOBSDATA" +)` +AC_SUBST(myrealBOBSDATA) + +myrealWEBDIR=`( + test "x$prefix" = xNONE && prefix=$ac_default_prefix + eval echo "$myWEBDIR" +)` +AC_SUBST(myrealWEBDIR) + AC_OUTPUT([ inc/config.php cron/backup.php @@ -132,13 +161,23 @@ echo " ======================================== -Your configuration: - web pages directory = $myWEBDIR - bobs data directory = $myBOBSDATA - cron directory = $myCRONDIR - admin password = $myPASS - -*** $WARNCOUNT warning(s) -" +Your configuration:" +echo -n " web pages directory = "; eval echo $myWEBDIR +echo -n " bobs data directory = "; eval echo $myBOBSDATA +echo -n " cron directory = "; eval echo $myCRONDIR +echo " admin password = $myPASS" +echo "" +echo "*** $WARNCOUNT warning(s)" +echo "" +echo "The following is just for testing and will be removed:" +echo "" +echo "prefix: ${prefix}" +echo "sysconfdir: ${sysconfdir}" +echo "myWEBDIR: ${myWEBDIR}" +echo "myrealWEBDIR: ${myrealWEBDIR}" +echo "myBOBSDATA: ${myBOBSDATA}" +echo "myrealBOBSDATA: ${myrealBOBSDATA}" +echo "myCRONDIR: ${myCRONDIR}" +echo "myCRONTABDIR: ${myCRONTABDIR}" dnl> THE END |