summaryrefslogtreecommitdiff
path: root/mk/flavor/README
blob: 1b9b4deb75b100dd96e7c0a606d1b1215a6baa94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
$NetBSD: README,v 1.6 2007/10/01 10:08:20 rillig Exp $

= Introduction =

A package flavor is a packaging system that is supported by pkgsrc.
Currently, there is only one (the native pkgsrc tools), but maybe we can
support RPM, dpkg or the Solaris native packages someday. It can also be
used to test new variants of the packaging tools.

= Interface =

== Variables usable at load-time ==

A package system flavor must define the following variables so that they
can be used when loading Makefiles. (That is, no references to undefined
variables.)

=== Legacy ===

* PKG_DBDIR (TODO: Make the other parts of pkgsrc independent of that
  variable; this should go away.)

=== Packaging commands ===

The following variables all refer to shell commands, which must accept
some command line options that are detailed in the respective man pages.
(TODO: Find out which command line options are really used and which
ones are useful. Document them.)

* PKG_ADD
* PKG_ADMIN
* PKG_CREATE
* PKG_DELETE
* PKG_INFO
* PKG_VIEW
* LINKFARM
* PKG_BEST_EXISTS

The following variables must be defined so that they can be used in
shell commands. They may contain references to all other variables.

* PKG_FILELIST_CMD

XXX: Why isn't this variable in the previous list?

== Make targets ==

The following make targets must be implemented:

* _flavor-check-vulnerable
* _flavor-deinstall
* _flavor-show-depends
* _flavor-install-dependencies
* bootstrap-depends
* _flavor-register
* tarup (XXX: This doesn't sound like a target that should be defined
  here.)
* tarup-pkg
* package-install
* _flavor-replace
* _flavor-undo-replace

= Bugs =

The name "flavor" is badly chosen, especially since flavor is such a
broad term that OpenBSD ports collection has chosen to implement
something entirely different using the same name. (This has happended
before pkgsrc has chosen to use this word, though, so no blame on them.)