Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # skip if we already have the env set up
- if [[ ! -e /content/pkgsrc ]]; then
- PKGSRC_REPO_URL=$(awk '{ print $2 }' FS='=' /opt/local/etc/pkg_install.conf)
- PKGSRC_BRANCH=$(awk '{ print $(NF-2) }' FS='/' /opt/local/etc/pkg_install.conf)
- PKGSRC_BINPKG_SITES=${PKGSRC_REPO_URL%/*}
- pkgin -y in gcc47 git-base
- mkdir -p /content/{distfiles,packages}
- ( cd /content
- git clone git://github.com/joyent/pkgsrc.git
- cd pkgsrc
- git checkout joyent/release/${PKGSRC_BRANCH}
- git submodule init
- git submodule update
- )
- cat >> /opt/local/etc/mk.conf << EOF
- #
- #
- DISTDIR= /content/distfiles
- PACKAGES= /content/packages
- WRKOBJDIR= /var/tmp/pkgsrc-build
- #
- ALLOW_VULNERABLE_PACKAGES= yes
- SKIP_LICENSE_CHECK= yes
- #
- MAKE_JOBS= 8
- #
- FETCH_USING= curl
- #
- # Adjust BINPKG_SITES, depending upon the dataset chosen, it should be the URL
- # from /opt/local/etc/pkgin/repositories.conf without the trailing 'All'.
- #
- BINPKG_SITES= ${PKGSRC_BINPKG_SITES}/
- DEPENDS_TARGET= bin-install
- EOF
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement