Commit graph

275 commits

Author SHA1 Message Date
jlam
98e1e541d0 Run pkg_add(1) and pkg_delete(1) using ${SETENV} ${PKGTOOLS_ENV}.
PKGTOOLS_ENV allows for passing environment variables to the
package install and deinstall scripts.
2017-08-19 00:30:19 +00:00
jlam
c22b34a349 Check, don't assert, that INSTALLATION_DIRS are all in ${PREFIX}.
Change the assertion into an install-time check that the paths
listed in INSTALLATION_DIRS are relative paths or are in ${PREFIX}.
This delays the check so that some common variables used when
listing directories in INSTALLATION_DIRS are fully-expanded.
2017-08-08 17:17:25 +00:00
jlam
176d83c4aa Assert INSTALLATION_DIRS begin with ${PREFIX} or are relative.
Add an assertion that all paths listed in INSTALLATION_DIRS must
either begin with ${PREFIX}/ or are relative paths.  Clarify in the
documentation that INSTALLATION_DIRS can list either type of path.

Some packages are using INSTALLATION_DIRS to create directory trees
outside of ${PREFIX}, e.g., under ${PKG_SYSCONFBASE} or ${VARBASE}.
However, these directories are only created as part of the
"install" target, which causes them to only be created during the
staged installation into ${DESTDIR} and not at all if their binary
packages are installed.  These packages should be fixed to use
MAKE_DIRS or OWN_DIRS to create these directory trees at the proper
time.
2017-08-07 15:49:44 +00:00
jlam
0a676f1f26 Provide switch to activate new frameworks to replace "pkginstall".
If ${_USE_NEW_PKGINSTALL} is "yes", then use the new "pkgtasks",
"init", and "pkgformat/pkg"-scripts frameworks instead of the
existing "pkginstall" framework.
2017-06-01 02:15:10 +00:00
jperkin
9900231406 Support NetBSD man/html entries. Fixes deforaos-*. 2016-07-26 08:41:36 +00:00
mspo
9f870b7185 add ftp6 to binpkg_sites, at request of joerg, since cdn is ipv4 only 2016-06-16 18:28:45 +00:00
mspo
1a0cbbdc8d set cdn.netbsd.org as the bin install site for netbsd 2016-06-16 00:14:55 +00:00
joerg
639d5b402f Remove support for USE_DESTDIR=no. 2016-04-10 15:58:02 +00:00
jperkin
9b32afd280 Support compressed manual pages with 3am and 3f suffixes. 2015-10-12 09:08:22 +00:00
gdt
553cac4a33 Remove warning about 'make replace' being experimental.
Lots of people have been using make replace for many years, at least
since 2006.  It hasn't been experimental for most of those years, and
there have been no reports of "data loss".
2015-09-07 19:23:47 +00:00
agc
4b9f0a9c84 Add a new definition, PKGSRC_KEEP_BIN_PKGS, which defaults to "no".
This definition controls whether the binary package which is built
during package installation will be copied to pkgsrc/packages/All.

To retain binary packages in pkgsrc/packages/All, set

	PKGSRC_KEEP_BIN_PKGS=yes

in environment or MAKECONF. If this is not set, binary packages
will not be preserved after their WRKDIR is removed. This may not
be what you want.

To preserve the status quo since 2013/05/22, and just delete the
binary package after it's built, the default for PKGSRC_KEEP_BIN_PKGS
is "no", or it can be explicitly set.

As reviewed on tech-pkg.
2014-12-06 23:28:18 +00:00
jperkin
dec55c5130 Use the standard 75 x '=' print format. 2014-07-28 10:05:53 +00:00
jperkin
e393ce6d94 Introduce infrastructure support for SMF.
SMF is the Service Management Facility, the default init system in
Solaris and derivatives since version 10.  This adds "smf" to the list
of supported INIT_SYSTEM types, and makes it the default init system on
platforms where it is available.

Packages can introduce SMF support by providing a manifest file, by
default located in ${FILESDIR}/smf/manifest.xml but manifests under
${WRKSRC} can be used too if the package source includes one.

SMF method scripts are supported too if required, using SMF_METHODS in a
similar manner to RCD_SCRIPTS.

Many parts of the SMF infrastructure are configurable, see mk/smf.mk for
the full details.
2014-03-11 14:07:04 +00:00
obache
5f5e2d61ad prevent to generate binary package in ${PACKAGES} from the side effect of
`install' with USE_DESTDIR=yes.
This changes prevent to unwanted overwite of existing binary packages with
test installation (`stage-install', `replace' & `undo-replace', and so on).

To do both `install' and `package', you can still use `package-install' target,
same as USE_DESTDIR=no.
2013-05-23 13:18:56 +00:00
sbd
a0f4340e1d Modify mk/plist/plist-gnu.mk to convert gnu/man to ${PKGGNUDIR}${PKGMANDIR}.
Also modify mk/install/install.mk to make the conversion when using
AUTO_MKDIRS.
2013-01-05 07:32:49 +00:00
jperkin
c6fe57f401 Introduce PKGGNUDIR as a way to control gnu prefix.
By default pkgsrc uses LOCABASE/gnu as a prefix for packages to install
native versions of GNU tools, which are them symbolically linked back to
the 'g' versions of the files in LOCALBASE, and users can then add
LOCALBASE/gnu/bin to PATH to pick up those tools.

On systems where the GNU environment is desired, PKGGNUDIR now allows
users to install the non-'g' files directly into LOCALBASE, making them
the default without having to alter PATH, whilst retaining the 'g' files
in order to ensure dependencies and tool paths remain the same.
2012-12-06 11:36:30 +00:00
reed
9d682ff4a3 fix typo in comment 2012-07-28 21:33:48 +00:00
tcort
0d61091aa7 When using Minix, set BINPKG_SITES to the official Minix binary package site. 2011-11-05 17:04:42 +00:00
reed
88166ad6f5 Rename "flavor" to "pkgformat".
This is from Anton Panev's GSoC 2011 project to add RPM and DPKG
support to pkgsrc. (I am not adding that further support in this
commit.)

This is just a rename of the existing functionality. Now it will
be easy to test the GSoC work by simply putting in a single
directory (such as "rpm" or "deb"). See
http://addpackageforma.sourceforge.net/ for some details.

This is from Anton's CVS, but I made some minor changes:

- changed plural pkgformats to singular pkgformat (to be consistent)

- fixed a few places (in comments) that were missed

- catch up on some additions to flavor not in the pkgforma cvs:
PKGSRC_SETENV and _flavor-destdir-undo-replace and
undo-destdir-replace-install.
2011-10-15 00:23:07 +00:00
abs
fc3bada41a Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i
to santise environment
2011-09-08 20:17:15 +00:00
apb
336c7dbc5e Pass PKGNAME_REQD through to the make process on the other side
of the "su" command.  This fixes {cd math/py-networkx;
env PYTHON_VERSION_DEFAULT=25 PKGNAME_REQD='py24-networkx-*' make replace;}
2011-08-01 11:00:13 +00:00
obache
6fdfe64f7c Add support undo-replace with USE_DESTDIR.
fixes PR#43689.
2011-06-04 10:05:00 +00:00
obache
e557e7ec48 remove quote from "DESTDIR". 2011-03-21 08:55:12 +00:00
obache
b55eed7e05 Introduce DESTDIR_VARNAME package-settable variable.
A variable name that should be set as staged installation location
	presented as ${DESTDIR} at installation phase.
	"DESTDIR" is set by default.

for packages using different variable for staged installation prefix,
and/or using DESTDIR variable for different purpose.
2011-03-21 04:52:18 +00:00
wiz
092f8f9305 Add default binpkg site for DragonFly. From Justin Sherrill in PR 44526. 2011-02-07 10:33:27 +00:00
sbd
91555f4138 syncing BINPKG_SITES with reality.
Originally suggested by hubertf@
2010-04-18 21:48:39 +00:00
joerg
aeb2523a2e Rename internal package-clean target to package-eat-cookie. 2010-02-25 01:03:44 +00:00
joerg
99151b3674 Rename the install phase to stage-install. Introduce a new install
target that defaults to either stage-install or package-install,
depending on whether DESTDIR support is active and supported by the
package or not.
2010-02-24 22:53:34 +00:00
joerg
453a72a147 Use the correct variable names. 2009-10-06 13:34:53 +00:00
joerg
ed25fdba32 Fix syntax. Mea culpra 2009-09-20 10:44:33 +00:00
joerg
d515df3aab Deal with strip idiosyncracies:
- sometimes creates the temporary file, but fails
- sometimes it is successful, but still keeps the temporary file
- sometimes it crashes when called with more than one argument
Bite the bullet and call it individually with explicit output file
and clean up after it.
2009-09-18 10:11:48 +00:00
joerg
2793535127 Use filtered plist for install-strip-debug and install-man-handling,
simplifying the latter.
2009-09-02 22:05:42 +00:00
joerg
e58a7789d9 Add STRIP_DEBUG option, which removes debug information from all files,
leaving basic symbol tables intact. Document that INSTALL_UNSTRIPPED
doesn't work for all packages.
2009-09-02 14:40:40 +00:00
joerg
5fc98f11b5 Make sure that _UPDATE_RUNNING=YES is passed down to su-deinstall for
PKG_PRESERVE packages (e.g. pkg_install). Otherwise an old version of
pkg_install is not removed from pkgdb.
2009-06-17 12:54:57 +00:00
joerg
4e1bd80afd Add support for using USE_DESTDIR=yes and replace together.
Based on the patch send to tech-pkg in 2008, but less intrusive.
2009-06-09 08:40:27 +00:00
rillig
4c49bb28b8 Documented INSTALL_UNSTRIPPED. 2008-11-18 22:03:56 +00:00
obache
a73dc64b7e Honor PKGLOCALEDIR for AUTO_MKDIRS. 2008-06-11 07:30:33 +00:00
wiz
e1411f898a Add colon in comment to aid "make help" in finding help
for the bin-install target.
2008-02-20 09:58:04 +00:00
rillig
decac331e0 Eliminated some code duplication, provided a default definition for
PKGNAME_REQD and documented it a little bit.
2008-02-19 22:53:34 +00:00
rillig
d3624fdf10 Made the .include directives simpler, since the directory of the
including file is always the first in the search path.
2008-01-04 01:46:24 +00:00
rillig
4290fb40eb Added compatibility code for INSTALLATION_DIRS_FROM_PLIST. I had
intended that all the time, but didn't test enough. :(

Thanks to wiz for catching this one.
2007-12-10 22:49:19 +00:00
rillig
a2f9aae352 Added AUTO_MKDIRS as an alias for INSTALLATION_DIRS_FROM_PLIST. The
variable is much more comfortable than specifying all the directories in
INSTALLATION_DIRS that using such a long name for it feels like a
punishment. It also doesn't look nice in the package Makefiles, for
example:

old:
INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8

new:
AUTO_MKDIRS=		yes

The variable INSTALLATION_DIRS_FROM_PLIST will be deprecated slowly.
2007-12-07 05:25:25 +00:00
rillig
9fab8079e7 Removed _INTERACTIVE_COOKIE, after asking on tech-pkg if anyone needs
it. It had only been used to change the "nerrors" variable in bulk
builds, but this variable is not used further anyway.
2007-12-01 11:11:53 +00:00
rillig
2db8b70075 Moved common commands into a variable. This saves 15 lines. 2007-11-03 10:25:33 +00:00
rillig
5fa3759ae6 Simpler includes. 2007-11-03 09:12:46 +00:00
rillig
9993d0aa30 BINPKG_SITES may be empty, and most shells don't like syntactically
empty for loops.
2007-09-21 23:59:30 +00:00
rillig
7c0cf0016c Renamed pkgpath to pkg_path, since there exists a completely independent
variable PKGPATH. I hope this will avoid some confusion.
2007-09-19 13:32:59 +00:00
rillig
93100472de When using bin-install, the version of the installed package was checked
twice: First against the required package pattern (PKGNAME_REQD), and
then against the current version (PKGNAME). When only a binary package
for an old (but sufficient) version of a package was available, that
version had been installed and the current version been built
afterwards, which was unnecessary.

This problem was mentioned in PR 36146, and is hereby fixed.

By the way, the code was really ugly: The messages that had been printed
didn't reflect what the code was actually doing. This is fixed, too.
2007-09-19 13:26:19 +00:00
rillig
c7873e00e2 It has always annoyed be that package authors had to write ${PKGMANDIR}/
in the definition of INSTALLATION_DIRS, where a short man/ would be much
shorter. Since we already have that man-transforming magic in some other
places of pkgsrc, it's also here.

While here, documented INSTALLATION_DIRS and
INSTALLATION_DIRS_FROM_PLIST so they are found by "bmake help".
2007-09-13 09:44:58 +00:00
joerg
0f838e964b pkg_add can figure out the suffix itself, thanks. 2007-08-23 08:59:24 +00:00