From 159225d08bae3947a5890381b1e97cf3c25de3c8 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 6 Jun 1997 12:19:11 +0000 Subject: [PATCH] Add support for srcdir overrides. --- usr.sbin/pkg_install/create/create.h | 5 +++-- usr.sbin/pkg_install/create/main.c | 11 ++++++++--- usr.sbin/pkg_install/create/perform.c | 10 +++++++++- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/usr.sbin/pkg_install/create/create.h b/usr.sbin/pkg_install/create/create.h index 6ef8888f6f0..b9348d95a1f 100644 --- a/usr.sbin/pkg_install/create/create.h +++ b/usr.sbin/pkg_install/create/create.h @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: create.h,v 1.11 1997/02/22 16:09:24 peter Exp $ */ /* * FreeBSD install - a package for the installation and maintainance @@ -31,10 +31,11 @@ extern char *Install; extern char *DeInstall; extern char *Contents; extern char *Require; -extern char PlayPen[]; +extern char *SrcDir; extern char *ExcludeFrom; extern char *Mtree; extern char *Pkgdeps; +extern char PlayPen[]; extern int Dereference; extern int PlistOnly; diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c index 0d8d3d1943b..d8cef07113f 100644 --- a/usr.sbin/pkg_install/create/main.c +++ b/usr.sbin/pkg_install/create/main.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: main.c,v 1.14 1997/02/22 16:09:25 peter Exp $"; +static const char *rcsid = "$Id: main.c,v 1.15 1997/03/31 05:10:47 imp Exp $"; #endif /* @@ -16,20 +16,21 @@ static const char *rcsid = "$Id: main.c,v 1.14 1997/02/22 16:09:25 peter Exp $"; #include "lib.h" #include "create.h" -static char Options[] = "YNOhvf:p:P:c:d:i:k:r:t:X:D:m:"; +static char Options[] = "YNOhvf:p:P:c:d:i:k:r:t:X:D:m:s:"; char *Prefix = NULL; char *Comment = NULL; char *Desc = NULL; +char *SrcDir = NULL; char *Display = NULL; char *Install = NULL; char *DeInstall = NULL; char *Contents = NULL; char *Require = NULL; -char PlayPen[FILENAME_MAX]; char *ExcludeFrom = NULL; char *Mtree = NULL; char *Pkgdeps = NULL; +char PlayPen[FILENAME_MAX]; int Dereference = 0; int PlistOnly = 0; @@ -63,6 +64,10 @@ main(int argc, char **argv) Prefix = optarg; break; + case 's': + SrcDir = optarg; + break; + case 'f': Contents = optarg; break; diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index 83c4f35fce5..428c0cdfd49 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id$"; +static const char *rcsid = "$Id: perform.c,v 1.34 1997/02/22 16:09:28 peter Exp $"; #endif /* @@ -83,6 +83,14 @@ pkg_perform(char **pkgs) if (Verbose && !PlistOnly) printf(".\n"); } + + /* If a SrcDir override is set, add it now */ + if (SrcDir) { + if (Verbose && !PlistOnly) + printf("Using SrcDir value of %s\n", SrcDir); + add_plist(&plist, PLIST_SRC, SrcDir); + } + /* Slurp in the packing list */ read_plist(&plist, pkg_in); -- 2.45.2