summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2008-05-13 03:49:03 +0000
committerivan <ivan>2008-05-13 03:49:03 +0000
commit6726ccd411b87ab1c92942201ebd0677f79dd59d (patch)
treee31e3cfebab03e3e00bee8d8442509163fa999d4
parenteaafe49123e402598d1e350c5654b7870073740d (diff)
better place for initial configuration to be stored and retreived from than the initial tarball...
-rwxr-xr-xFS/bin/freeside-setup2
-rw-r--r--Makefile11
-rwxr-xr-xdebian/rules7
3 files changed, 16 insertions, 4 deletions
diff --git a/FS/bin/freeside-setup b/FS/bin/freeside-setup
index 9b16d78cb..d813e76e2 100755
--- a/FS/bin/freeside-setup
+++ b/FS/bin/freeside-setup
@@ -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;
diff --git a/Makefile b/Makefile
index e1b705698..a7a49fb9f 100644
--- 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 ] \
diff --git a/debian/rules b/debian/rules
index 2d9b643a8..1e5b9f0ec 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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