summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-04-22 00:03:18 +0000
committerjkh <jkh@FreeBSD.org>1995-04-22 00:03:18 +0000
commitfc0ace6edfc20a1f168504a46ecaa49e96dd8cea (patch)
tree2e873268429c822b85a256fdce06a08e43ce78aa /usr.sbin
parent571d43ff480784669abbb23d717dfb1a2cd06812 (diff)
downloadFreeBSD-src-fc0ace6edfc20a1f168504a46ecaa49e96dd8cea.zip
FreeBSD-src-fc0ace6edfc20a1f168504a46ecaa49e96dd8cea.tar.gz
1. Add proper dependencies to the library in my Makefiles. This was pointed
out by Bruce. 2. Add a "feature" to pkg_create (OK, OK, it's a miserable hack!) to get it to dump its internal packing list out so that the `fake-pkg' rule in bsd.port.mk can generate a more meaningful packing list.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_install/add/Makefile9
-rw-r--r--usr.sbin/pkg_install/create/Makefile9
-rw-r--r--usr.sbin/pkg_install/create/create.h3
-rw-r--r--usr.sbin/pkg_install/create/main.c10
-rw-r--r--usr.sbin/pkg_install/create/perform.c13
-rw-r--r--usr.sbin/pkg_install/create/pkg_create.116
-rw-r--r--usr.sbin/pkg_install/delete/Makefile8
-rw-r--r--usr.sbin/pkg_install/info/Makefile8
8 files changed, 64 insertions, 12 deletions
diff --git a/usr.sbin/pkg_install/add/Makefile b/usr.sbin/pkg_install/add/Makefile
index 2887d05..e0fdcff 100644
--- a/usr.sbin/pkg_install/add/Makefile
+++ b/usr.sbin/pkg_install/add/Makefile
@@ -1,7 +1,14 @@
PROG= pkg_add
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
-LDADD+= -L${.CURDIR}/../lib -L${.CURDIR}/../lib/obj -linstall
+
+.if exists(${.CURDIR}/../lib/obj)
+LDADD+= -L${.CURDIR}/../lib/obj -linstall
+DPADD+= ${.CURDIR}/../lib/obj/libinstall.a
+.else
+LDADD+= -L${.CURDIR}/../lib -linstall
+DPADD+= ${.CURDIR}/../lib/libinstall.a
+.endif
SRCS= main.c perform.c futil.c extract.c
diff --git a/usr.sbin/pkg_install/create/Makefile b/usr.sbin/pkg_install/create/Makefile
index 2f52910..ff33874 100644
--- a/usr.sbin/pkg_install/create/Makefile
+++ b/usr.sbin/pkg_install/create/Makefile
@@ -1,7 +1,14 @@
PROG= pkg_create
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
-LDADD+= -L${.CURDIR}/../lib -L${.CURDIR}/../lib/obj -linstall
+
+.if exists(${.CURDIR}/../lib/obj)
+LDADD+= -L${.CURDIR}/../lib/obj -linstall
+DPADD+= ${.CURDIR}/../lib/obj/libinstall.a
+.else
+LDADD+= -L${.CURDIR}/../lib -linstall
+DPADD+= ${.CURDIR}/../lib/libinstall.a
+.endif
SRCS= main.c perform.c pl.c
diff --git a/usr.sbin/pkg_install/create/create.h b/usr.sbin/pkg_install/create/create.h
index e64cf29..8f4db25 100644
--- a/usr.sbin/pkg_install/create/create.h
+++ b/usr.sbin/pkg_install/create/create.h
@@ -1,4 +1,4 @@
-/* $Id: create.h,v 1.6 1994/12/06 00:51:35 jkh Exp $ */
+/* $Id: create.h,v 1.7 1995/04/09 15:04:57 jkh Exp $ */
/*
* FreeBSD install - a package for the installation and maintainance
@@ -36,6 +36,7 @@ extern char *ExcludeFrom;
extern char *Mtree;
extern char *Pkgdeps;
extern int Dereference;
+extern int PlistOnly;
void check_list(char *, Package *);
void usage(const char *, const char *, ...);
diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c
index e3058dd..4ab6b74 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.8 1994/12/06 00:51:36 jkh Exp $";
+static const char *rcsid = "$Id: main.c,v 1.9 1995/04/09 15:04:58 jkh Exp $";
#endif
/*
@@ -16,7 +16,7 @@ static const char *rcsid = "$Id: main.c,v 1.8 1994/12/06 00:51:36 jkh Exp $";
#include "lib.h"
#include "create.h"
-static char Options[] = "YNhvf: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:";
char *Prefix = NULL;
char *Comment = NULL;
@@ -31,6 +31,7 @@ char *ExcludeFrom = NULL;
char *Mtree = NULL;
char *Pkgdeps = NULL;
int Dereference = 0;
+int PlistOnly = 0;
int
main(int argc, char **argv)
@@ -54,6 +55,10 @@ main(int argc, char **argv)
AutoAnswer = YES;
break;
+ case 'O':
+ PlistOnly = YES;
+ break;
+
case 'p':
Prefix = optarg;
break;
@@ -166,5 +171,6 @@ usage(const char *name, const char *fmt, ...)
fprintf(stderr, "-v verbose\n");
fprintf(stderr, "-Y assume `yes' answer to all questions\n");
fprintf(stderr, "-N assume `no' answer to all questions\n");
+ fprintf(stderr, "-O print a revised packing list and exit\n");
exit(1);
}
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index f83f309..06d517e 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: perform.c,v 1.15 1995/04/09 15:05:00 jkh Exp $";
+static const char *rcsid = "$Id: perform.c,v 1.16 1995/04/10 08:01:52 jkh Exp $";
#endif
/*
@@ -41,7 +41,7 @@ pkg_perform(char **pkgs)
/* Preliminary setup */
sanity_check();
- if (Verbose)
+ if (Verbose && !PlistOnly)
printf("Creating package %s\n", pkg);
get_dash_string(&Comment);
get_dash_string(&Desc);
@@ -92,6 +92,15 @@ pkg_perform(char **pkgs)
if (find_plist(&plist, PLIST_NAME) == NULL)
add_plist_top(&plist, PLIST_NAME, basename_of(pkg));
+ /*
+ * We're just here for to dump out a revised plist for the FreeBSD ports
+ * hack. It's not a real create in progress.
+ */
+ if (PlistOnly) {
+ write_plist(&plist, stdout);
+ exit(0);
+ }
+
/* Make a directory to stomp around in */
home = make_playpen(PlayPen, 0);
signal(SIGINT, cleanup);
diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1
index e5424a9..cd98bf0 100644
--- a/usr.sbin/pkg_install/create/pkg_create.1
+++ b/usr.sbin/pkg_install/create/pkg_create.1
@@ -15,11 +15,15 @@
.\"
.\"
.\" @(#)pkg_create.8
-.\" $Id: pkg_create.1,v 1.12 1995/01/05 10:37:09 jkh Exp $
+.\" $Id: pkg_create.1,v 1.13 1995/04/09 15:05:01 jkh Exp $
+.\"
.\" hacked up by John Kohl for NetBSD--fixed a few bugs, extended keywords,
.\" added dependency tracking, etc.
.\"
-.Dd November 25, 1994
+.\" [jkh] Took John's changes back and made some additional extensions for
+.\" better integration with FreeBSD's new ports collection.
+.\"
+.Dd April 21, 1995
.Dt pkg_create 8
.Os FreeBSD 2.0
.Sh NAME
@@ -27,7 +31,7 @@
.Nd a utility for creating software package distributions.
.Sh SYNOPSIS
.Nm
-.Op Fl YNhv
+.Op Fl YNOhv
.Op Fl P Ar pkgs
.Op Fl p Ar prefix
.Op Fl f Ar contents
@@ -86,6 +90,12 @@ Assume a default answer of `Yes' for any questions asked.
.Em "Optional."
.It Fl N
Assume a default answer of `No' for any questions asked.
+.It Fl O
+Go into a `packing list Only' mode. This is a custom hack for the
+.Em "FreeBSD Ports Collection"
+and is used to do `fake pkg_add' operations when a port is installed.
+In such cases, it is necessary to know what the final, adjusted packing
+list will look like.
.Em "Optional."
.It Fl v
Turns on verbose output.
diff --git a/usr.sbin/pkg_install/delete/Makefile b/usr.sbin/pkg_install/delete/Makefile
index 942f524..cd1598d 100644
--- a/usr.sbin/pkg_install/delete/Makefile
+++ b/usr.sbin/pkg_install/delete/Makefile
@@ -1,8 +1,14 @@
PROG= pkg_delete
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
-LDADD+= -L${.CURDIR}/../lib -L${.CURDIR}/../lib/obj -linstall
+.if exists(${.CURDIR}/../lib/obj)
+LDADD+= -L${.CURDIR}/../lib/obj -linstall
+DPADD+= ${.CURDIR}/../lib/obj/libinstall.a
+.else
+LDADD+= -L${.CURDIR}/../lib -linstall
+DPADD+= ${.CURDIR}/../lib/libinstall.a
+.endif
SRCS= main.c perform.c
diff --git a/usr.sbin/pkg_install/info/Makefile b/usr.sbin/pkg_install/info/Makefile
index b7344f3..a5a75c5 100644
--- a/usr.sbin/pkg_install/info/Makefile
+++ b/usr.sbin/pkg_install/info/Makefile
@@ -1,8 +1,14 @@
PROG= pkg_info
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
-LDADD+= -L${.CURDIR}/../lib -L${.CURDIR}/../lib/obj -linstall
+.if exists(${.CURDIR}/../lib/obj)
+LDADD+= -L${.CURDIR}/../lib/obj -linstall
+DPADD+= ${.CURDIR}/../lib/obj/libinstall.a
+.else
+LDADD+= -L${.CURDIR}/../lib -linstall
+DPADD+= ${.CURDIR}/../lib/libinstall.a
+.endif
SRCS= main.c perform.c show.c
OpenPOWER on IntegriCloud