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
19 graphics/drm-legacy-kmod
20 graphics/drm-stable-kmod
33 x11-drivers/xf86-video-vmware
38 # If NOPORTS is set for the release, do not attempt to build pkg(8).
39 if [ ! -f ${PORTSDIR}/Makefile ]; then
40 echo "*** ${PORTSDIR} is missing! ***"
41 echo "*** Skipping pkg-stage.sh ***"
42 echo "*** Unset NOPORTS to fix this ***"
46 if [ ! -x /usr/local/sbin/pkg ]; then
47 /etc/rc.d/ldconfig restart
48 /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean
51 export DVD_DIR="dvd/packages"
52 export PKG_ABI=$(pkg config ABI)
53 export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null)
54 export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}"
56 /bin/mkdir -p ${PKG_REPODIR}
57 if [ ! -z "${PKG_ALTABI}" ]; then
58 (cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI})
61 # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the
63 for _P in ${_DVD_PACKAGES}; do
64 if [ -d "${PORTSDIR}/${_P}" ]; then
65 DVD_PACKAGES="${DVD_PACKAGES} ${_P}"
67 echo "*** Skipping nonexistent port: ${_P}"
71 # Make sure the package list is not empty.
72 if [ -z "${DVD_PACKAGES}" ]; then
73 echo "*** The package list is empty."
74 echo "*** Something is very wrong."
75 # Exit '0' so the rest of the build process continues
76 # so other issues (if any) can be addressed as well.
80 # Print pkg(8) information to make debugging easier.
83 ${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES}
85 # Create the 'Latest/pkg.txz' symlink so 'pkg bootstrap' works
86 # using the on-disc packages.
87 mkdir -p ${PKG_REPODIR}/Latest
88 (cd ${PKG_REPODIR}/Latest && \
89 ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).txz pkg.txz)
91 ${PKGCMD} repo ${PKG_REPODIR}
93 # Always exit '0', even if pkg(8) complains about conflicts.