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