better place for initial configuration to be stored and retreived from than the initi...
authorivan <ivan>
Tue, 13 May 2008 03:49:03 +0000 (03:49 +0000)
committerivan <ivan>
Tue, 13 May 2008 03:49:03 +0000 (03:49 +0000)
FS/bin/freeside-setup
Makefile
debian/rules

index 9b16d78..d813e76 100755 (executable)
@@ -20,7 +20,7 @@ die "Not running uid freeside!" unless checkeuid();
 #  map { lc($FS::raddb::attrib{$_}) => $_ } keys %FS::raddb::attrib;
 
 getopts("u:vd:");
-my $config_dir = shift || 'conf' ;
+my $config_dir = shift || '%%%DIST_CONF%%%' ;
 $config_dir =~ /^([\w.:=]+)$/
   or die "unacceptable configuration directory name";
 $config_dir = $1;
index e1b7056..a7a49fb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,11 @@ FREESIDE_EXPORT = /usr/local/etc/freeside
 MASON_HANDLER = ${FREESIDE_CONF}/handler.pl
 MASONDATA = ${FREESIDE_CACHE}/masondata
 
+#where to put the default configuraiton used by freeside-setup to initialize
+#a new database (not used after that).  primarily of interest to distro
+#package maintainers
+DIST_CONF = ${FREESIDE_CONF}/default_conf
+
 #mod_perl v1
 #APACHE_VERSION = 1
 #mod_perl v2 prereleases up to and including 1.999_21
@@ -201,6 +206,7 @@ perl-modules:
          s|%%%FREESIDE_LOCK%%%|${FREESIDE_LOCK}|g;\
          s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
          s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
+         s|%%%DIST_CONF%%%|${DIST_CONF}|g;\
        " blib/script/*
 
 install-perl-modules: perl-modules
@@ -210,6 +216,11 @@ install-perl-modules: perl-modules
          || true
        cd FS; \
        make install UNINST=1
+       #install this for freeside-setup
+       install -d $(DIST_CONF)
+       #install conf/[a-z]* $(DEFAULT_CONF)
+       #CVS is not [a-z]
+       install `ls -d conf/[a-z]* | grep -v CVS` $(DIST_CONF)
 
 dev-perl-modules: perl-modules
        [ -d ${PERL_INC_DEV_KLUDGE}/FS -a ! -L ${PERL_INC_DEV_KLUDGE}/FS ] \
index 2d9b643..1e5b9f0 100755 (executable)
@@ -57,7 +57,7 @@ export FREESIDE_URL           = http://$(HOSTNAME)/freeside/
 
 #specific to deb pkg, for purposes of saving off a permanent copy of default
 #config for postinst and that sort of thing
-export DEFAULT_CONF           = $(TMP)/usr/share/freeside/default_conf
+export DIST_CONF           = $(TMP)/usr/share/freeside/default_conf
 
 #XXX yuck.  proper RT layout is entirely necessary
 #this seems to infect way to much of RT with the build location, requiring
@@ -112,11 +112,12 @@ install-stamp: build-stamp
        # debian/<package>-whatever.
        ( cd FS/ && $(MAKE) -e DESTDIR=$(TMP)-lib install )
 
+        #falase laziness w/install-perl-modules now
        #install this for postinst later (no create-config)
-       install -d $(DEFAULT_CONF)
+       install -d $(DIST_CONF)
        #install conf/[a-z]* $(DEFAULT_CONF)
        #CVS is not [a-z]
-       install `ls -d conf/[a-z]* | grep -v CVS` $(DEFAULT_CONF)
+       install `ls -d conf/[a-z]* | grep -v CVS` $(DIST_CONF)
 
        install -d $(FREESIDE_DOCUMENT_ROOT)
        install -d $(FREESIDE_CACHE)/masondata #MASONDATA