From 6c9ac2ea07bffd4de58d95f67e02834e2d7b31f5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 14 Dec 2008 01:48:36 +0100 Subject: [PATCH] Added keep_dirs and conf_files vars for templates. These will be written in pkg metadata props file as well. For now they don't change any behaviour, will be used in binary packages. Convert some pkgs to use them. --HG-- extra : convert_revision : d04f681cf80dc97ceb9e50370d5a8c0d7b52687c --- templates/glibc.tmpl | 2 ++ templates/irssi.tmpl | 1 + templates/openssl.tmpl | 2 ++ templates/wget.tmpl | 1 + utils/sh/binpkg.sh | 9 +++++++++ utils/sh/tmpl_funcs.sh | 2 +- 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/templates/glibc.tmpl b/templates/glibc.tmpl index e080cb86b3..5b7c5d62a6 100644 --- a/templates/glibc.tmpl +++ b/templates/glibc.tmpl @@ -22,6 +22,8 @@ long_desc=" as C++ and Objective C; the runtime facilities of other programming languages use the C library to access the underlying operating system." +conf_files="/etc/localtime /etc/ld.so.cache /etc/ld.so.conf /etc/rpc + /etc/nsswitch.conf" base_chroot=yes build_depends="gcc-4.3.2" diff --git a/templates/irssi.tmpl b/templates/irssi.tmpl index 46f06e5cba..c7d911c556 100644 --- a/templates/irssi.tmpl +++ b/templates/irssi.tmpl @@ -16,5 +16,6 @@ long_desc=" anymore, there's already a working SILC module available. Support for other protocols like ICQ could be created some day too." +conf_files="/etc/irssi.conf" build_depends="glib-2.18.2 perl-5.10.0 openssl-0.9.8i ncurses-5.6" run_depends="glib-2.18.2 openssl-0.9.8i ncurses-5.6" diff --git a/templates/openssl.tmpl b/templates/openssl.tmpl index 29a994729e..90637d7ca4 100644 --- a/templates/openssl.tmpl +++ b/templates/openssl.tmpl @@ -19,6 +19,8 @@ long_desc=" # Does not build with -j. disable_parallel_build=yes +keep_dirs="/etc/ssl" +conf_files="/etc/ssl/openssl.cnf" build_depends="perl-5.10.0 zlib-1.2.3" run_depends="glibc-2.8 zlib-1.2.3" diff --git a/templates/wget.tmpl b/templates/wget.tmpl index baf0b02b90..4a971baf70 100644 --- a/templates/wget.tmpl +++ b/templates/wget.tmpl @@ -29,6 +29,7 @@ long_desc=" re-downloaded when mirroring * GNU Wget is distributed under the GNU General Public License." +conf_files="/etc/wgetrc" base_chroot=yes run_depends="glibc-2.8" # TODO : Add openssl dependency diff --git a/utils/sh/binpkg.sh b/utils/sh/binpkg.sh index a77949d9dd..8b1c644836 100644 --- a/utils/sh/binpkg.sh +++ b/utils/sh/binpkg.sh @@ -88,6 +88,15 @@ _EOF done printf "\t\n" >> $TMPFPROPS fi + # Keep directories while removing. + if [ -n "$keep_dirs" ]; then + printf "\tkeep_dirs\n" >> $TMPFPROPS + printf "\t\n" >> $TMPFPROPS + for f in ${keep_dirs}; do + printf "\t\t$f\n" >> $TMPFPROPS + done + printf "\t\n" >> $TMPFPROPS + fi # Terminate the property list file. printf "\n\n" >> $TMPFPROPS diff --git a/utils/sh/tmpl_funcs.sh b/utils/sh/tmpl_funcs.sh index 73c3d892d1..c876e7c2e6 100644 --- a/utils/sh/tmpl_funcs.sh +++ b/utils/sh/tmpl_funcs.sh @@ -67,7 +67,7 @@ reset_tmpl_vars() tar_override_cmd xml_entries sgml_entries \ build_depends libtool_fixup_la_stage no_fixup_libtool \ disable_parallel_build run_depends cross_compiler \ - only_for_archs patch_args \ + only_for_archs patch_args conf_files keep_dirs \ XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \ XBPS_BUILD_DONE XBPS_INSTALL_DONE"