Install on macOS

4 min read Original article ↗
#
# Copy and paste the lines below to install a Big Sur (11.3) set.
#
# Make sure to only paste the lines for either the arm64 or x86_64 set!  These
# packages are no longer updated.
#
# Select the ARM64 set:
#
BOOTSTRAP_TAR="bootstrap-macos11-trunk-arm64-20240212.tar.gz"
BOOTSTRAP_SHA="3d2a31e1f3eb026bb9ed0b3a63787355ad73a958"
#
# OR select the x86_64 set:
#
BOOTSTRAP_TAR="bootstrap-macos11-trunk-x86_64-20240212.tar.gz"
BOOTSTRAP_SHA="c4b71fe9bf0ef89cc8d38909496a75693050cd96"

# Download the bootstrap kit to the current directory.
curl -O https://pkgsrc.smartos.org/packages/Darwin/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
echo "${BOOTSTRAP_SHA}  ${BOOTSTRAP_TAR}" | shasum -c-

# Verify PGP signature.  This step is optional, and requires gpg.
# curl -O https://pkgsrc.smartos.org/packages/Darwin/bootstrap/${BOOTSTRAP_TAR}.asc
# curl -sS https://pkgsrc.smartos.org/pgp/1F32A9AD.asc | gpg2 --import
# gpg2 --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/pkg
sudo tar -zxpf ${BOOTSTRAP_TAR} -C /

# Reload PATH/MANPATH (pkgsrc installs /etc/paths.d/10-pkgsrc for new sessions)
eval $(/usr/libexec/path_helper)
#
# Copy and paste the lines below to install the 64-bit Mojave set.
#
# These packages are suitable for anyone running Mojave (10.14.6) or Catalina
# (10.15.x), however they are no longer updated.
#
BOOTSTRAP_TAR="bootstrap-macos14-trunk-x86_64-20210717.tar.gz"
BOOTSTRAP_SHA="a23fed860e7f515e7405fcfea9595049b9ea6634"

# Download the bootstrap kit to the current directory.
curl -O https://pkgsrc.smartos.org/packages/Darwin/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
echo "${BOOTSTRAP_SHA}  ${BOOTSTRAP_TAR}" | shasum -c-

# Verify PGP signature.  This step is optional, and requires gpg.
# curl -O https://pkgsrc.smartos.org/packages/Darwin/bootstrap/${BOOTSTRAP_TAR}.asc
# curl -sS https://pkgsrc.smartos.org/pgp/1F32A9AD.asc | gpg2 --import
# gpg2 --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/pkg
sudo tar -zxpf ${BOOTSTRAP_TAR} -C /

# Reload PATH/MANPATH (pkgsrc installs /etc/paths.d/10-pkgsrc for new sessions)
eval $(/usr/libexec/path_helper)
#
# Copy and paste the lines below to install the 64-bit Sierra set.
#
# These packages are suitable for anyone running Sierra (10.12.6) or newer,
# however they are no longer updated.  Note that the repository URL has
# changed since publishing, so a couple of config files need updating.
#
BOOTSTRAP_TAR="bootstrap-trunk-x86_64-20190524.tar.gz"
BOOTSTRAP_SHA="1c554a806fb41dcc382ef33e64841ace13988479"
REPO_URL="https://us-central.manta.mnx.io/pkgsrc/public/packages/Darwin/10.12"

# Download the bootstrap kit to the current directory.
curl -O ${REPO_URL}/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
echo "${BOOTSTRAP_SHA}  ${BOOTSTRAP_TAR}" | shasum -c-

# Verify PGP signature.  This step is optional, and requires gpg.
# curl -O ${REPO_URL}/bootstrap/${BOOTSTRAP_TAR}.asc
# curl -sS https://pkgsrc.smartos.org/pgp/1F32A9AD.asc | gpg2 --import
# gpg2 --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/pkg
sudo tar -zxpf ${BOOTSTRAP_TAR} -C /

# Rewrite config file paths for updated repository URL.
sed -i \
    -e "s,https://pkgsrc.joyent.*All,${REPO_URL}/trunk/x86_64/All," \
    /opt/pkg/etc/pkg_install.conf \
    /opt/pkg/etc/pkgin/repositories.conf

# Reload PATH/MANPATH (pkgsrc installs /etc/paths.d/10-pkgsrc for new sessions)
eval $(/usr/libexec/path_helper)
#
# Copy and paste the lines below to install the 64-bit Mavericks set.
#
# These packages are suitable for anyone running Mavericks (10.9.5) or newer,
# however they are no longer updated.  Note that the repository URL has
# changed since publishing, so a couple of config files need updating.
#
BOOTSTRAP_TAR="bootstrap-trunk-x86_64-20181001.tar.gz"
BOOTSTRAP_SHA="7209132a657582cf87897a2ad280c587e3d6bff0"
REPO_URL="https://us-central.manta.mnx.io/pkgsrc/public/packages/Darwin/10.9"

# Download the bootstrap kit to the current directory.
curl -O ${REPO_URL}/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
echo "${BOOTSTRAP_SHA}  ${BOOTSTRAP_TAR}" | shasum -c-

# Verify PGP signature.  This step is optional, and requires gpg.
# curl -O ${REPO_URL}/bootstrap/${BOOTSTRAP_TAR}.asc
# curl -sS https://pkgsrc.smartos.org/pgp/1F32A9AD.asc | gpg2 --import
# gpg2 --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/pkg
sudo tar -zxpf ${BOOTSTRAP_TAR} -C /

# Rewrite config file paths for updated repository URL.
sed -i \
    -e "s,https://pkgsrc.joyent.*All,${REPO_URL}/trunk/x86_64/All," \
    /opt/pkg/etc/pkg_install.conf \
    /opt/pkg/etc/pkgin/repositories.conf

# Reload PATH/MANPATH (pkgsrc installs /etc/paths.d/10-pkgsrc for new sessions)
eval $(/usr/libexec/path_helper)
#
# Copy and paste the lines below to install the 32-bit 10.6+ set.
#
# These packages are suitable for anyone running Snow Leopard (10.6.8) or
# newer, however they are no longer updated.  Note that the repository URL
# has changed since publishing, so a couple of config files need updating.
#
BOOTSTRAP_TAR="bootstrap-trunk-i386-20180812.tar.gz"
BOOTSTRAP_SHA="283b88b13c75e8f92de8376532ccf4f4b9443f9d"
REPO_URL="https://us-central.manta.mnx.io/pkgsrc/public/packages/Darwin/10.6"

# Download the bootstrap kit to the current directory.
curl -O ${REPO_URL}/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
echo "${BOOTSTRAP_SHA}  ${BOOTSTRAP_TAR}" | shasum -c-

# Verify PGP signature.  This step is optional, and requires gpg.
# curl -O ${REPO_URL}/bootstrap/${BOOTSTRAP_TAR}.asc
# curl -sS https://pkgsrc.smartos.org/pgp/1F32A9AD.asc | gpg2 --import
# gpg2 --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/pkg
sudo tar -zxpf ${BOOTSTRAP_TAR} -C /

# Rewrite config file paths for updated repository URL.
sed -i \
    -e "s,https://pkgsrc.joyent.*All,${REPO_URL}/trunk/i386/All," \
    /opt/pkg/etc/pkg_install.conf \
    /opt/pkg/etc/pkgin/repositories.conf

# Reload PATH/MANPATH (pkgsrc installs /etc/paths.d/10-pkgsrc for new sessions)
eval $(/usr/libexec/path_helper)