8 export ASSUME_ALWAYS_YES="YES"
9 export PKG_DBDIR="/tmp/pkg"
10 export PERMISSIVE="YES"
11 export REPO_AUTOUPDATE="NO"
12 export PKGCMD="/usr/sbin/pkg -d"
13 export PORTSDIR="${PORTSDIR:-/usr/ports}"
15 _DVD_PACKAGES="archivers/unzip
17 devel/subversion-static
18 emulators/linux_base-c6
31 x11-drivers/xf86-video-vmware
36 # If NOPORTS is set for the release, do not attempt to build pkg(8).
37 if [ ! -f ${PORTSDIR}/Makefile ]; then
38 echo "*** ${PORTSDIR} is missing! ***"
39 echo "*** Skipping pkg-stage.sh ***"
40 echo "*** Unset NOPORTS to fix this ***"
44 if [ ! -x /usr/local/sbin/pkg ]; then
45 /etc/rc.d/ldconfig restart
46 /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean
49 export DVD_DIR="dvd/packages"
50 export PKG_ABI=$(pkg config ABI)
51 export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null)
52 export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}"
54 /bin/mkdir -p ${PKG_REPODIR}
55 if [ ! -z "${PKG_ALTABI}" ]; then
56 (cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI})
59 # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the
61 for _P in ${_DVD_PACKAGES}; do
62 if [ -d "${PORTSDIR}/${_P}" ]; then
63 DVD_PACKAGES="${DVD_PACKAGES} ${_P}"
65 echo "*** Skipping nonexistent port: ${_P}"
69 # Make sure the package list is not empty.
70 if [ -z "${DVD_PACKAGES}" ]; then
71 echo "*** The package list is empty."
72 echo "*** Something is very wrong."
73 # Exit '0' so the rest of the build process continues
74 # so other issues (if any) can be addressed as well.
78 # Print pkg(8) information to make debugging easier.
81 ${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES}
83 # Create the 'Latest/pkg.txz' symlink so 'pkg bootstrap' works
84 # using the on-disc packages.
85 mkdir -p ${PKG_REPODIR}/Latest
86 (cd ${PKG_REPODIR}/Latest && \
87 ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).txz pkg.txz)
89 ${PKGCMD} repo ${PKG_REPODIR}
91 # Always exit '0', even if pkg(8) complains about conflicts.