Add PKGFS_SYSCONFDIR option to the configuration file.

This is the directory where the configuration files in a package
will be installed. pkgfs won't have control over it, so if a package
overwrites them, be sure to make a backup!

--HG--
extra : convert_revision : a96e3871f7683f96b8711aa060dddadcb4970cb2
This commit is contained in:
Juan RP 2008-10-03 15:41:26 +02:00
parent 32ae8e7df3
commit ce2680b740
2 changed files with 17 additions and 8 deletions

View File

@ -9,27 +9,35 @@
PKGFS_DISTRIBUTIONDIR=$HOME/pkgfs
#
# Global master directory: this is where all symlinks will be
# Master directory: this is where all symlinks will be
# created pointing at packages installed in PKGFS_DESTDIR.
#
PKGFS_MASTERDIR=$PKGFS_DISTRIBUTIONDIR/depot
#
# Global destination directory: this is where all packages will be
# installed.
# Destination directory: this is where all packages will be installed.
#
PKGFS_DESTDIR=$PKGFS_DISTRIBUTIONDIR/packages
#
# Global directory where source files will be extracted to.
# Directory where source files will be extracted to.
#
PKGFS_BUILDDIR=$PKGFS_DISTRIBUTIONDIR/builddir
#
# Global directory where source distribution files are stored.
# Directory where source distribution files are stored.
#
PKGFS_SRCDISTDIR=$PKGFS_DISTRIBUTIONDIR/srcdistdir
#
# Directory where configuration files installed by packages will
# be installed. Please note that files on this directory won't be
# removed if a package is unstowned.
#
# BEWARE: the package itself may overwrite them in some cases!
#
PKGFS_SYSCONFDIR=$PKGFS_MASTERDIR/etc
#
# Path to the xstow program.
#

View File

@ -253,12 +253,12 @@ check_config_vars()
fi
local PKGFS_VARS="PKGFS_MASTERDIR PKGFS_DESTDIR PKGFS_BUILDDIR \
PKGFS_SRCDISTDIR"
PKGFS_SRCDISTDIR PKGFS_SYSCONFDIR"
for f in ${PKGFS_VARS}; do
eval val="\$$f"
if [ -z "$val" ]; then
echo "**** ERROR: '$f' not set in configuration "
echo -n "**** ERROR: '$f' not set in configuration "
echo "file, aborting ***"
exit 1
fi
@ -511,6 +511,7 @@ build_tmpl_sources()
./configure --prefix="$PKGFS_MASTERDIR" \
--mandir="$PKGFS_DESTDIR/$pkgname/man" \
--infodir="$PKGFS_DESTDIR/$pkgname/share/info" \
--sysconfdir="$PKGFS_SYSCONFDIR" \
${configure_args}
#
@ -888,7 +889,7 @@ install_tmpl()
# At this point all required deps are installed, and
# only remaining is the origin template; install it.
#
doing_deps=
unset doing_deps
reset_tmpl_vars
run_file ${origin_tmpl}
check_tmpl_vars ${pkgname}