I've ported Apple Calendar and Contacts Server to MacPorts. See macports/macports-ports#4978
ccs-calendarserver does not provide a standard GNU-like/compliant DESTDIR capability for staged installs.
PREFIX (or --prefix) tells the compiler to build everything for the ultimate destination.
DESTDIR tells the compiler to install its builds in this (typically temporary, staged) location.
A package manager like MacPorts or Brew can then copy everything from DESTDIR to PREFIX, or archive everything in DESTDIR, to track and control what’s been installed, and how to uninstall or upgrade.
Without both DESTDIR and PREFIX options, there’s no reliable way for the package manager to manage its packages. E.g. see MacPorts’s destroot stage in https://guide.macports.org/chunked/reference.phases.html.
Sometime it’s possible to hack around this limitation (calendar-contacts-server example, ihaskell example), but it’s pretty awful. There is rudimentary --prefix capability in _build.sh, but this doesn't work like a standard package PREFIX or --prefix does.
In my own tests, running ./bin/package -F ${DESTDIR} hard codes the build directory within all the virtualenv compiled Python code and object libraries, and therefore does not work. Even hacky workarounds like creating symbolic links to DESTDIR and building within the symlinks don't work.
Now that Server.app has deprecated Calendar and Contacts Server to open source projects, the only reasonable approach is using a package manager like MacPorts to handle installs and upgrades, and that means having DESTDIR and PREFIX capabilities.
I've ported Apple Calendar and Contacts Server to MacPorts. See macports/macports-ports#4978
ccs-calendarserver does not provide a standard GNU-like/compliant
DESTDIRcapability for staged installs.PREFIX(or--prefix) tells the compiler to build everything for the ultimate destination.DESTDIRtells the compiler to install its builds in this (typically temporary, staged) location.A package manager like MacPorts or Brew can then copy everything from
DESTDIRtoPREFIX, or archive everything inDESTDIR, to track and control what’s been installed, and how to uninstall or upgrade.Without both
DESTDIRandPREFIXoptions, there’s no reliable way for the package manager to manage its packages. E.g. see MacPorts’sdestrootstage in https://guide.macports.org/chunked/reference.phases.html.Sometime it’s possible to hack around this limitation (
calendar-contacts-serverexample,ihaskellexample), but it’s pretty awful. There is rudimentary--prefixcapability in _build.sh, but this doesn't work like a standard packagePREFIXor--prefixdoes.In my own tests, running
./bin/package -F ${DESTDIR}hard codes the build directory within all the virtualenv compiled Python code and object libraries, and therefore does not work. Even hacky workarounds like creating symbolic links toDESTDIRand building within the symlinks don't work.Now that Server.app has deprecated Calendar and Contacts Server to open source projects, the only reasonable approach is using a package manager like MacPorts to handle installs and upgrades, and that means having
DESTDIRandPREFIXcapabilities.