freebsd-ports/Mk
Baptiste Daroussin cf099c77fa Add support for staging area in the ports tree
The ports tree is now staged by default. With pkgng the sequence hasn't
changed, the main difference is that creating package is now independent
from installing it. With pkg_install, the package is now created first
and make install, do install the package.

New macros:
- STAGEDIR: PATH to the directory where the port will be staged.
- NO_STAGE: Keep the old behaviour of the ports tree (aka no staging area)

Unsupported macro if NO_STAGE is not set:
- MAN* with staging man page compression and handling of hardlinks and
symlinks is automatically done in the stage. the manpages becomes then a
"normal" plist files and should be tracked in pkg-plist.
- MANCOMPRESSED the compress-man target is able to only compress when it
needed.

New target:
- stage: this installs everything into the stage directory
- makeplist: this will create a pkg-plist and print it to stdout. This is
a sample plist and it should always be _reviewed_ not directly used.

NOTE: with staging only what is in the plist will be installed, nothing more,
meaning a port staged cannot have leftovers exect directories left. It is
really important to double check the pkg-plist to make sure all the files
the maintainer want to package are in! make makeplist can help in that area.

The goal is to handle as quickly as possible a full removal of the NO_STAGE
support.

More features can be added once the full ports tree is converted to using the
staging area

Conversion notes:
- Remove NO_STAGE
- in {pre,do,post}-install
  * Before any usage of ${PREFIX}, ${ETCDIR}, ${PORTSDIR}, ${PORTEXAMPLES}
    prepend ${STAGEDIR}
  * Remove any thing that is done by @exec or +INSTALL script it will be
    done automatically when syncing packages
  * Remove any code to show PKG-MESSAGE it will be done automatically when
    syncing packages
  * Directory creation should remain in post-install (in particular because
    pkgng doesn't work like pkg_install in that area and pkgng ignores the
    @exec mkdir but directly pack the directory even if empty)
- PORTDOCS/PORTEXAMPELS
  To support PORTDOCS, PORTEXAMPLES most of the time there is no more need
  for hacks. just add the right %%PORTDOCS%% or %%PORTEXAMPLES%% in your
  plist then the given files from the stagedir will or will not sync
  according to NOPORTDOCS and NOPORTEXAMPLES.

With hat:	portmgr
Reviewed by:	bdrewery
2013-09-23 05:56:35 +00:00
..
Uses Add a new PERL_MANDIR substitution pattern to PLIST_SUB to easier staging p5- ports 2013-09-23 05:34:18 +00:00
bsd.apache.mk - prepare for apache24 2013-03-26 21:31:27 +00:00
bsd.autotools.mk Fix spelling mistake 2013-09-01 01:18:05 +00:00
bsd.commands.mk Two imake related changes: 2013-09-02 13:26:34 +00:00
bsd.cran.mk - Add Archive path to MASTER_SITES to fetch archived CRAN tar ball 2012-11-21 14:31:35 +00:00
bsd.database.mk Sqlite 3.4 is not in the ports tree anymore 2013-09-16 15:19:15 +00:00
bsd.default-versions.mk - Fix typo 2013-09-20 13:13:30 +00:00
bsd.destdir.mk - Remove emacs mode, -*- mode: ...; -*- [1] 2012-05-23 08:17:49 +00:00
bsd.drupal.mk - Remove CVS reference 2013-05-20 00:45:26 +00:00
bsd.efl.mk - Remove edb from valid evas loaders, since it's invalid for almost a year 2013-07-04 20:31:44 +00:00
bsd.emacs.mk GNU Emacs updates 2013-03-30 05:13:30 +00:00
bsd.fpc.mk - Remove CVS reference 2013-05-20 00:45:26 +00:00
bsd.gcc.mk Merge two loops and initialize _GCC_FOUND${v} and check whether USE_GCC 2013-03-29 11:26:14 +00:00
bsd.gecko.mk - update firefox, thunderbird and libxul to 24.0 2013-09-18 22:40:57 +00:00
bsd.gnome.mk Repo copy libgda4 ports to libgda5 and libgdamm to libgdamm5. 2013-09-06 11:43:34 +00:00
bsd.gnustep.mk Fix a copy-and-paste error and a reversed condition in bsd.gnustep.mk 2013-08-29 13:03:20 +00:00
bsd.gstreamer.mk Update to 1.0.9. 2013-08-21 11:24:07 +00:00
bsd.java.mk - Remove CVS reference 2013-05-20 00:45:26 +00:00
bsd.kde4.mk Update the KDE Software Compilation to 4.10.5. 2013-07-04 23:34:32 +00:00
bsd.ldap.mk bmake is quite strict with != make it really happy 2013-05-02 17:12:43 +00:00
bsd.licenses.db.mk - The APACHE license is specifically rejected by copyfree at: 2013-05-20 12:24:43 +00:00
bsd.licenses.mk Add support for staging area in the ports tree 2013-09-23 05:56:35 +00:00
bsd.linux-apps.mk Remove support for QT 3.3 now that we have QT 4.5 2013-07-12 18:34:22 +00:00
bsd.linux-rpm.mk - Finish removal of support for Linux 2.4 in bsd.linux-apps.mk and 2013-05-30 09:11:52 +00:00
bsd.local.mk - Remove emacs mode, -*- mode: ...; -*- [1] 2012-05-23 08:17:49 +00:00
bsd.lua.mk - Remove emacs mode, -*- mode: ...; -*- [1] 2012-05-23 08:17:49 +00:00
bsd.ocaml.mk - Fix svn properties for Mk/bsd.ocaml.mk 2013-09-20 12:16:14 +00:00
bsd.octave.mk - USE_GMAKE to USES=gmake. 2013-07-06 01:48:53 +00:00
bsd.openssl.mk Adjust the LDFLAGS from USE_NCURSES and USE_OPENSSL to fix build with clang: 2012-12-10 17:51:48 +00:00
bsd.options.desc.mk - Add shared COOKIE description 2013-09-13 14:31:11 +00:00
bsd.options.mk Document the new bsd.options.mk knobs. 2013-08-01 12:32:52 +00:00
bsd.pbi.mk - Fix bsd.pbi.mk being processed twice when including both 2013-03-11 00:51:39 +00:00
bsd.php.mk Welcome PHP 5.5! 2013-06-24 14:32:11 +00:00
bsd.pkgng.mk Add support for staging area in the ports tree 2013-09-23 05:56:35 +00:00
bsd.port.mk Add support for staging area in the ports tree 2013-09-23 05:56:35 +00:00
bsd.port.options.mk - Remove emacs mode, -*- mode: ...; -*- [1] 2012-05-23 08:17:49 +00:00
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk Replicate r321735 fix to bsd.port.subdir.mk as it suffers the same bug 2013-06-25 12:34:12 +00:00
bsd.python.mk Add support for staging area in the ports tree 2013-09-23 05:56:35 +00:00
bsd.qt.mk KDE3 and QT3 expired on 2013-07-01, remove these ports. 2013-07-26 19:19:20 +00:00
bsd.ruby.mk Introduce the one-true-way to handle multi version ports 2013-09-19 08:16:43 +00:00
bsd.sanity.mk Add support for staging area in the ports tree 2013-09-23 05:56:35 +00:00
bsd.scons.mk - Remove emacs mode, -*- mode: ...; -*- [1] 2012-05-23 08:17:49 +00:00
bsd.sdl.mk Welcome SDL2 to the FreeBSD ports system! 2013-06-21 19:56:27 +00:00
bsd.sites.mk Bring the Python PyPi MASTERSITES list back to the future - Part I 2013-09-01 09:09:00 +00:00
bsd.ssp.mk - Rename public name of SSP support to WITH_SSP_PORTS as /usr/src 2013-09-22 00:26:05 +00:00
bsd.stage.mk Add support for staging area in the ports tree 2013-09-23 05:56:35 +00:00
bsd.tcl.mk - Switch default version of Tcl/Tk from 8.5 to 8.6 2013-05-21 08:59:02 +00:00
bsd.tex.mk - Update ls-R after fmtutil. 2013-06-08 11:48:04 +00:00
bsd.wx.mk - Revert file erroneously included in my previous commit 2013-09-19 09:58:00 +00:00
bsd.xfce.mk - sysutils/garcon update to 0.2.1 2013-05-08 16:18:57 +00:00
bsd.xorg.mk The FreeBSD x11 team proudly presents 2013-05-25 14:37:02 +00:00