2013-11-18 15:22:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2014-05-22 19:22:03 +00:00
|
|
|
export ASSUME_ALWAYS_YES="YES"
|
2014-01-16 16:12:09 +00:00
|
|
|
export PKG_DBDIR="/tmp/pkg"
|
|
|
|
export PERMISSIVE="YES"
|
|
|
|
export REPO_AUTOUPDATE="NO"
|
|
|
|
export PKGCMD="/usr/sbin/pkg -d"
|
|
|
|
|
2015-01-08 15:42:10 +00:00
|
|
|
_DVD_PACKAGES="archivers/unzip
|
2014-01-16 16:12:09 +00:00
|
|
|
devel/subversion
|
|
|
|
devel/subversion-static
|
2016-05-27 18:20:07 +00:00
|
|
|
emulators/linux_base-c6
|
2014-01-16 16:12:09 +00:00
|
|
|
misc/freebsd-doc-all
|
|
|
|
net/mpd5
|
|
|
|
net/rsync
|
|
|
|
ports-mgmt/pkg
|
|
|
|
ports-mgmt/portmaster
|
|
|
|
shells/bash
|
|
|
|
shells/zsh
|
|
|
|
security/sudo
|
|
|
|
sysutils/screen
|
|
|
|
www/firefox
|
|
|
|
www/links
|
|
|
|
x11-drivers/xf86-video-vmware
|
2015-01-08 15:50:10 +00:00
|
|
|
x11/gnome3
|
2014-01-16 16:12:09 +00:00
|
|
|
x11/kde4
|
|
|
|
x11/xorg"
|
2013-11-18 15:22:55 +00:00
|
|
|
|
2013-12-12 05:49:27 +00:00
|
|
|
# If NOPORTS is set for the release, do not attempt to build pkg(8).
|
|
|
|
if [ ! -f /usr/ports/Makefile ]; then
|
2015-01-08 14:29:03 +00:00
|
|
|
echo "*** /usr/ports is missing! ***"
|
|
|
|
echo "*** Skipping pkg-stage.sh ***"
|
|
|
|
echo "*** Unset NOPORTS to fix this ***"
|
2013-12-12 05:49:27 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2013-11-18 15:22:55 +00:00
|
|
|
if [ ! -x /usr/local/sbin/pkg ]; then
|
2015-01-08 14:39:53 +00:00
|
|
|
/etc/rc.d/ldconfig restart
|
2013-12-02 14:28:30 +00:00
|
|
|
/usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean
|
2013-11-18 15:22:55 +00:00
|
|
|
fi
|
|
|
|
|
2015-01-06 20:42:50 +00:00
|
|
|
export DVD_DIR="dvd/packages"
|
2014-09-12 22:20:07 +00:00
|
|
|
export PKG_ABI=$(pkg config ABI)
|
2015-01-06 20:42:50 +00:00
|
|
|
export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null)
|
|
|
|
export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}"
|
2014-01-16 16:12:09 +00:00
|
|
|
|
2014-09-12 22:20:07 +00:00
|
|
|
/bin/mkdir -p ${PKG_REPODIR}
|
2015-01-06 20:42:50 +00:00
|
|
|
if [ ! -z "${PKG_ALTABI}" ]; then
|
2015-01-06 20:46:29 +00:00
|
|
|
(cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI})
|
2015-01-06 20:42:50 +00:00
|
|
|
fi
|
2013-11-18 15:22:55 +00:00
|
|
|
|
2015-01-08 15:42:10 +00:00
|
|
|
# Ensure the ports listed in _DVD_PACKAGES exist to sanitize the
|
|
|
|
# final list.
|
|
|
|
for _P in ${_DVD_PACKAGES}; do
|
|
|
|
if [ -d "/usr/ports/${_P}" ]; then
|
|
|
|
DVD_PACKAGES="${DVD_PACKAGES} ${_P}"
|
|
|
|
else
|
|
|
|
echo "*** Skipping nonexistent port: ${_P}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Make sure the package list is not empty.
|
|
|
|
if [ -z "${DVD_PACKAGES}" ]; then
|
|
|
|
echo "*** The package list is empty."
|
|
|
|
echo "*** Something is very wrong."
|
|
|
|
# Exit '0' so the rest of the build process continues
|
|
|
|
# so other issues (if any) can be addressed as well.
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2014-01-16 16:12:09 +00:00
|
|
|
# Print pkg(8) information to make debugging easier.
|
|
|
|
${PKGCMD} -vv
|
2013-11-18 15:22:55 +00:00
|
|
|
${PKGCMD} update -f
|
2014-09-12 22:20:07 +00:00
|
|
|
${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES}
|
2013-11-18 15:22:55 +00:00
|
|
|
|
2014-09-19 17:23:44 +00:00
|
|
|
# Create the 'Latest/pkg.txz' symlink so 'pkg bootstrap' works
|
|
|
|
# using the on-disc packages.
|
|
|
|
mkdir -p ${PKG_REPODIR}/Latest
|
|
|
|
(cd ${PKG_REPODIR}/Latest && \
|
|
|
|
ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).txz pkg.txz)
|
|
|
|
|
2014-09-12 18:52:01 +00:00
|
|
|
${PKGCMD} repo ${PKG_REPODIR}
|
2013-11-18 15:22:55 +00:00
|
|
|
|
|
|
|
# Always exit '0', even if pkg(8) complains about conflicts.
|
|
|
|
exit 0
|