diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-11-18 21:51:44 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-11-18 21:51:44 +0000 |
commit | 12210a4311ec99423609af179ced07e2639f9065 (patch) | |
tree | a7959e63aa5e50787e9372041bd196ed0864b466 | |
parent | 8d5511c2c78613ccea6d3bae00ab06cb4f58f89e (diff) |
document @wantlib, @depend. Provide -P and -W flags to be able to specify
those on the command line instead of having to generate a separate plist.
-rw-r--r-- | usr.sbin/pkg_add/pkg_create | 17 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_create.1 | 65 |
2 files changed, 69 insertions, 13 deletions
diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create index 4e1e2e22bd8..50902db65e6 100644 --- a/usr.sbin/pkg_add/pkg_create +++ b/usr.sbin/pkg_add/pkg_create @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_create,v 1.24 2004/11/15 16:47:54 espie Exp $ +# $OpenBSD: pkg_create,v 1.25 2004/11/18 21:51:43 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -219,12 +219,13 @@ our $errors = 0; our ($opt_p, $opt_f, $opt_c, $opt_d, $opt_v, $opt_i, $opt_k, $opt_r, $opt_S, $opt_h, $opt_s, $opt_O, $opt_A, $opt_L, - $opt_M, $opt_U, + $opt_M, $opt_U, $opt_P, $opt_W, $opt_B); my @contents; -getopts('p:f:c:d:vi:k:r:M:U:S:hs:OA:L:B:D:', +my $plist = new OpenBSD::PackingList; +getopts('p:f:c:d:vi:k:r:M:U:S:hs:OA:L:B:D:P:W:', {'D' => sub { local $_ = shift; @@ -237,6 +238,12 @@ getopts('p:f:c:d:vi:k:r:M:U:S:hs:OA:L:B:D:', 'f' => sub { push(@contents, shift); + }, + 'P' => sub { + OpenBSD::PackingElement::Dependency->add($plist, shift); + }, + 'W' => sub { + OpenBSD::PackingElement::Wantlib->add($plist, shift); } }); @@ -304,7 +311,6 @@ if (defined $opt_U) { copy_subst($opt_U, $dir.UNDISPLAY); } -my $plist = new OpenBSD::PackingList; my @extra_files = (); for my $special (info_names()) { next unless -f $dir.$special; @@ -408,6 +414,9 @@ if (defined $plist->{pkgcfl}) { print STDERR "Error: \@pkgcfl is obsolete, use \@conflict instead\n"; $errors++; } +if (defined $plist->{pkgdep}) { + print STDERR "\@pkgdep is obsolete, use \@depend instead\n"; +} if ($errors) { exit(1); } diff --git a/usr.sbin/pkg_add/pkg_create.1 b/usr.sbin/pkg_add/pkg_create.1 index 5e029f15696..ff6dc59fadc 100644 --- a/usr.sbin/pkg_add/pkg_create.1 +++ b/usr.sbin/pkg_add/pkg_create.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pkg_create.1,v 1.20 2004/11/15 13:20:40 jmc Exp $ +.\" $OpenBSD: pkg_create.1,v 1.21 2004/11/18 21:51:43 espie Exp $ .\" .\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. @@ -43,10 +43,12 @@ .Op Fl k Ar dscript .Op Fl L Ar localbase .Op Fl M Ar displayfile +.Op Fl P Ar pkg-dependency .Op Fl p Ar prefix .Op Fl r Ar rscript .Op Fl S Ar pkg-destdir .Op Fl U Ar undisplayfile +.Op Fl W Ar wantedlib .Fl c Ar desc .Fl d Ar desc .Fl f Ar packinglist @@ -151,6 +153,10 @@ Display the file (using after installing the package. Useful for things like legal notices on almost-free software, etc. +.It Fl P Ar pkg-dependency +Specify a +.Cm @depend +dependency on the command line. .It Fl p Ar prefix Set .Ar prefix @@ -184,6 +190,10 @@ when deinstalling the package. Useful for reminders about stuff to clean up. .It Fl v Turn on verbose output. +.It Fl W Ar wantedlib +Specify a +.Cm @wantlib +requirement on the command line. .El .Sh PACKING LIST DETAILS The @@ -213,19 +223,13 @@ Imbed a comment in the packing list. Useful in trying to document some particularly hairy sequence that may trip someone up later. Can also be used to comment out elements that update-plist -.Po -see -.Xr bsd.port.mk 5 -.Pc +.Pq see Xr bsd.port.mk 5 will insist in inserting in a packing-list. .Pp .It Cm @conflict Ar pkgspec Declare a conflict with packages matching .Ar pkgspec -.Po -see -.Xr packages-specs 7 -.Pc . +.Pq see Xr packages-specs 7 . The .Ar pkgname package can @@ -240,6 +244,26 @@ Set the package current directory. All subsequent filenames will be assumed relative to .Ar pathname . .Pp +.It Xo +.Cm @depend +.Sm off +.Ar pkgpath : +.Ar pkgspec : +.Ar default +.Sm on +.Xc +Declare a dependency on a package matching +.Ar pkgspec +.Pq see Xr packages-specs 7 . +An appropriate package must be installed before this package may be +installed, and this package must be deinstalled before this package +is deinstalled. +The dependency also contains a +.Ar pkgpath +.Pq see Ev FULLPKGPATH in Xr bsd.port.mk 5 +and a +.Ar default +package name, in case there is no listing of available packages. .It Cm @dir Ar directoryname Create directory .Pa directoryname @@ -526,6 +550,9 @@ package is deinstalled. Multiple .Cm @pkgdep directives may be used if the package depends on multiple other packages. +Deprecated, use +.Cm @depend +instead. .Pp .It Cm @sample Ar filename Last preceding @@ -574,6 +601,26 @@ Expansion of special .Cm \&% sequences is the same as for .Cm @exec . +.It Cm @wantlib Ar libspec +Package needs a shared library to work. +.Ar libspec +is +.Sq name.major.minor +or +.Sq path/name.major.minor . +The package won't be installed unless a library with the same name, +the exact same major number and at least the same minor number can +be located. +A library without path is searched through dependent packages under the +same +.Ar localbase , +then in the system libraries under +.Pa /usr/lib +and +.Pa /usr/X11R6/lib . +A library with a path is only searched through dependent packages, +that path being relative to +.Ar localbase . .El .Sh VARIABLE SUBSTITUTION AND FRAGMENT INCLUSION In packing-lists, installation, deinstallation and requirement scripts, |