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.
This commit is contained in:
Jordan K. Hubbard 1995-04-22 00:03:18 +00:00
parent b79219d31a
commit 3a5e372a3d
8 changed files with 64 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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 *, ...);

View File

@ -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);
}

View File

@ -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);

View File

@ -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.

View File

@ -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

View File

@ -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