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"
14 _DVD_PACKAGES="archivers/unzip
16 devel/subversion-static
17 emulators/linux_base-c6
30 x11-drivers/xf86-video-vmware
35 # If NOPORTS is set for the release, do not attempt to build pkg(8).
36 if [ ! -f /usr/ports/Makefile ]; then
37 echo "*** /usr/ports is missing! ***"
38 echo "*** Skipping pkg-stage.sh ***"
39 echo "*** Unset NOPORTS to fix this ***"
43 if [ ! -x /usr/local/sbin/pkg ]; then
44 /etc/rc.d/ldconfig restart
45 /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean
48 export DVD_DIR="dvd/packages"
49 export PKG_ABI=$(pkg config ABI)
50 export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null)
51 export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}"
53 /bin/mkdir -p ${PKG_REPODIR}
54 if [ ! -z "${PKG_ALTABI}" ]; then
55 (cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI})
58 # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the
60 for _P in ${_DVD_PACKAGES}; do
61 if [ -d "/usr/ports/${_P}" ]; then
62 DVD_PACKAGES="${DVD_PACKAGES} ${_P}"
64 echo "*** Skipping nonexistent port: ${_P}"
68 # Make sure the package list is not empty.
69 if [ -z "${DVD_PACKAGES}" ]; then
70 echo "*** The package list is empty."
71 echo "*** Something is very wrong."
72 # Exit '0' so the rest of the build process continues
73 # so other issues (if any) can be addressed as well.
77 # Print pkg(8) information to make debugging easier.
80 ${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES}
82 # Create the 'Latest/pkg.txz' symlink so 'pkg bootstrap' works
83 # using the on-disc packages.
84 mkdir -p ${PKG_REPODIR}/Latest
85 (cd ${PKG_REPODIR}/Latest && \
86 ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).txz pkg.txz)
88 ${PKGCMD} repo ${PKG_REPODIR}
90 # Always exit '0', even if pkg(8) complains about conflicts.