88166ad6f5
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.
54 lines
1.8 KiB
Makefile
54 lines
1.8 KiB
Makefile
# $NetBSD: deinstall.mk,v 1.11 2011/10/15 00:23:09 reed Exp $
|
|
|
|
# DEINSTALLDEPENDS controls whether dependencies and dependents are also
|
|
# removed when a package is de-installed. The valid values are:
|
|
#
|
|
# no only the package is removed (if dependencies allow it)
|
|
# yes dependent packages are also removed
|
|
# all dependent packages and unused dependencies are also removed
|
|
#
|
|
DEINSTALLDEPENDS?= no
|
|
|
|
######################################################################
|
|
### deinstall, su-deinstall (PUBLIC)
|
|
######################################################################
|
|
### deinstall is a public target to remove an installed package.
|
|
### It will acquire elevated privileges just-in-time.
|
|
###
|
|
.PHONY: deinstall su-deinstall
|
|
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
|
|
. if !target(deinstall)
|
|
deinstall: su-deinstall
|
|
@${PHASE_MSG} "Deinstalling for ${PKGNAME}"
|
|
. endif
|
|
.else
|
|
. if !target(deinstall)
|
|
deinstall: su-target
|
|
@${PHASE_MSG} "Deinstalling for ${PKGNAME}"
|
|
. endif
|
|
.endif
|
|
|
|
_SU_DEINSTALL_TARGETS= acquire-deinstall-lock
|
|
_SU_DEINSTALL_TARGETS+= _pkgformat-deinstall
|
|
_SU_DEINSTALL_TARGETS+= release-deinstall-lock
|
|
.if ${_USE_DESTDIR} == "no"
|
|
_SU_DEINSTALL_TARGETS+= install-clean
|
|
.endif
|
|
su-deinstall: ${_SU_DEINSTALL_TARGETS}
|
|
|
|
.PHONY: acquire-deinstall-lock release-deinstall-lock
|
|
acquire-deinstall-lock: acquire-localbase-lock
|
|
release-deinstall-lock: release-localbase-lock
|
|
|
|
MAKEFLAGS.su-deinstall+= DEINSTALLDEPENDS=${DEINSTALLDEPENDS}
|
|
|
|
######################################################################
|
|
### reinstall (PUBLIC)
|
|
######################################################################
|
|
### reinstall is a special target to re-run the install target.
|
|
### It will acquire elevated privileges just-in-time.
|
|
###
|
|
.PHONY: reinstall
|
|
.if !target(reinstall)
|
|
reinstall: install-clean install
|
|
.endif
|