# ports と pkg とは別のラッパープログラム用 export PSPKGDIR="${HOME}/usr" export __MAKE_CONF="/dev/null" export INSTALL_AS_USER="yes" # pkg が /usr/local/ を prefix としてインストールしていく都合上、localを挟んだ方が都合がよい export PREFIX="${HOME}/usr/local" export EPREFIX="${PREFIX}" export LOCALBASE="${PREFIX}" export PKG_DBDIR="${LOCALBASE}/var/db/pkg" export PORT_DBDIR="${LOCALBASE}/var/db/pkg" export DISTDIR="${LOCALBASE}/tmp/dist" export WRKDIRPREFIX="${LOCALBASE}/tmp/work" export PORTSDIR="${HOME}/usr/ports" export PKGTOOLS_CONF="${LOCALBASE}/etc/pkgtools.conf" export DEPENDS_TARGET='install clean' export LDCONFIG="/sbin/ldconfig -f ${LOCALBASE}/var/run/ld-elf.so.hints -i -R ${LOCALBASE}/etc/ld-elf.so.conf" export LOCAL_LD_LIBRARY_PATH="${LOCALBASE}/lib" export LD_LIBRARY_PATH="${LOCAL_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}" export LD_RUN_PATH="${LOCALBASE}/lib" export PATH="${LOCALBASE}/bin:${LOCALBASE}/sbin:${PATH}" export MANPATH_MAP="${LOCALBASE}/bin ${LOCALBASE}/man" export ALLOW_UNSUPPORTED_SYSTEM=1 export FORCE_PKG_REGISTER=1 export PACMAN_ROOT="${PREFIX}/pacman" mkdir -p "${LD_RUN_PATH}" mkdir -p "${LOCAL_LD_LIBRARY_PATH}" mkdir -p "${PORTSDIR}" mkdir -p "${DISTDIR}" mkdir -p "${WRKDIRPREFIX}" mkdir -p "${PORT_DBDIR}" mkdir -p "${PKG_DBDIR}" mkdir -p "${LOCALBASE}/var/run" mkdir -p "${LOCALBASE}/etc" mkdir -p "${LOCALBASE}/bin" mkdir -p "${LOCALBASE}/man" test '!' -f "${LOCALBASE}/etc/ld-elf.so.conf" && { ldconfig -r | awk '/search/ {print $3}' | tr ":" "\n" > "${LOCALBASE}/etc/ld-elf.so.conf" echo "${LOCAL_LD_LIBRARY_PATH}" >> "${LOCALBASE}/etc/ld-elf.so.conf" }; # ユーザー権限でpkgとportsを使おうとするシステム # つかわない false && { bash -c "$(curl -fsSL https://raw.githubusercontent.com/bellflower2015/pspkg/master/setup.bash)" && cd ${PORTSDIR} && make index } # つかわない false && { pspkg --install graphics/librsvg2 } # 展開 --strip-components 1 # cd ~ ; xzcat local.tar.xz | tar -xf - # 圧縮 # tar -cJf local.tar.xz --exclude '*/man/*' --exclude '*.pyc$' --exclude '*/doc/*' /usr/local/ # multimedia/ffmpeg # # つかわない # # rmdir "${PORT_DBDIR}" # # test '!' -d "${PORTSDIR}" && { # # git clone --depth 1 https://github.com/freebsd/freebsd-ports.git "${PORTSDIR}" # # }; # sysctl -n kern.osreldate # # つかわない # #$ fetch 'http://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.xz' # #ports.tar.xz 40 MB 28 MBps 02s # #$ ls # #ports.tar.xz set_env.plain_sh.sh usr # #$ cd usr/ # #$ xzcat ../ports.tar.xz | tar x # #$ ls ports/