Skip to content
This repository was archived by the owner on Feb 13, 2020. It is now read-only.
This repository was archived by the owner on Feb 13, 2020. It is now read-only.

Add DESTDIR and PREFIX capabilities for packaged installs #540

@essandess

Description

@essandess

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.

  1. PREFIX (or --prefix) tells the compiler to build everything for the ultimate destination.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions