1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-06 01:57:40 +00:00
freebsd-ports/emulators/linux_base-f8/pkg-install
Boris Samorodov 7ecfed784d Prepare for linux infrostructure ports transition from FC3 to FC4:
o  move dealing with linux locale files (creating empty ones) for
   other linux ports to linux_base-fc4;
o  remove all empty directories creation from pkg-plist to pkg-install
   (which is executed when installing from ports tree and thus not only
   installing from a package will create empty directories);
o  substitute all @dirrmtry by @dirrm -- from package building point
   of view this package (linux_base) should be removed after all other
   linux ports. (approved in principle by mentor)

Approved by:	netchild (mentor, implicit)
2006-07-09 20:50:07 +00:00

147 lines
5.6 KiB
Bash

#!/bin/sh
# an installation script for linux_base
case "$2" in
PRE-INSTALL)
if [ -z "`kldstat -v | grep -E 'linux(aout|elf)'`" ]; then
echo 'Linux mode is not enabled.'
echo 'Loading linux kernel module now...'
if ! kldload linux; then
echo 'The linux kernel module could not be loaded.'
echo 'Please enable linux mode manually and retry.'
exit 1
fi
fi
;;
POST-INSTALL)
if [ -z "`grep ^linproc /etc/fstab`" ]; then
echo ''
echo '+++ Some programs may need linprocfs, please add it to /etc/fstab! +++'
else
if [ -z "`mount | grep -w ^linprocfs`" ]; then
echo ''
echo '+++ Please mount linprocfs manually! +++'
fi
fi
if [ ! -f ${PKG_PREFIX}/etc/nsswitch.conf ]; then
cp ${PKG_PREFIX}/etc/nsswitch.conf.dist \
${PKG_PREFIX}/etc/nsswitch.conf
fi
if [ ! -f ${PKG_PREFIX}/etc/yp.conf ]; then
cp ${PKG_PREFIX}/etc/yp.conf.sample ${PKG_PREFIX}/etc/yp.conf
fi
#
# This is needed when updating to ensure that already installed libraries
# are recorded in ${PKG_PREFIX}/etc/ld.so.cache
#
echo ''
echo 'Running linux ldconfig...'
${PKG_PREFIX}/sbin/ldconfig -r ${PKG_PREFIX}
#
# Create linux mtree
#
mkdir -p ${PKG_PREFIX}/var/yp
mkdir -p ${PKG_PREFIX}/var/spool/repackage
mkdir -p ${PKG_PREFIX}/var/spool/mail
mkdir -p ${PKG_PREFIX}/var/spool/lpd
mkdir -p ${PKG_PREFIX}/var/preserve
mkdir -p ${PKG_PREFIX}/var/opt
mkdir -p ${PKG_PREFIX}/var/nis
mkdir -p ${PKG_PREFIX}/var/lock/subsys
mkdir -p ${PKG_PREFIX}/var/local
mkdir -p ${PKG_PREFIX}/var/lib/misc
mkdir -p ${PKG_PREFIX}/var/lib/games
mkdir -p ${PKG_PREFIX}/var/empty
mkdir -p ${PKG_PREFIX}/var/db
mkdir -p ${PKG_PREFIX}/var/cache
mkdir -p ${PKG_PREFIX}/usr/src
mkdir -p ${PKG_PREFIX}/usr/share/xsessions
mkdir -p ${PKG_PREFIX}/usr/share/pixmaps
mkdir -p ${PKG_PREFIX}/usr/share/misc
mkdir -p ${PKG_PREFIX}/usr/share/man/mann
mkdir -p ${PKG_PREFIX}/usr/share/man/man9
mkdir -p ${PKG_PREFIX}/usr/share/man/man6
mkdir -p ${PKG_PREFIX}/usr/share/man/man4
mkdir -p ${PKG_PREFIX}/usr/share/man/man2
mkdir -p ${PKG_PREFIX}/usr/share/locale/zh_CN.GB2312/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/yi/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/xh/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/vi/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/uz@Latn/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/uz/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/tl/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/tk/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/th/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/te/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/ta/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/sr@ije/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/sr@Latn/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/sq/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/pa/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/or/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/nso/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/nn/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/ne/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/mr/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/mn/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/ml/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/mk/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/mi/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/lv/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/lt/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/li/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/kn/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/ia/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/hy/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/hi/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/he/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/gu/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/fa/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/eu/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/en_CA/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/en/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/cy/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/bs/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/br/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/bn/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/bg/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/az_IR/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/az/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/as/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/ar/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/locale/am/LC_MESSAGES
mkdir -p ${PKG_PREFIX}/usr/share/games
mkdir -p ${PKG_PREFIX}/usr/share/empty
mkdir -p ${PKG_PREFIX}/usr/share/dict
mkdir -p ${PKG_PREFIX}/usr/share/applications
mkdir -p ${PKG_PREFIX}/usr/lib/gcc-lib
mkdir -p ${PKG_PREFIX}/usr/lib/games
mkdir -p ${PKG_PREFIX}/usr/games
mkdir -p ${PKG_PREFIX}/usr/doc
mkdir -p ${PKG_PREFIX}/usr/etc
mkdir -p ${PKG_PREFIX}/usr/X11R6/share
mkdir -p ${PKG_PREFIX}/usr/X11R6/man
mkdir -p ${PKG_PREFIX}/usr/X11R6/lib/tls
mkdir -p ${PKG_PREFIX}/usr/X11R6/include
mkdir -p ${PKG_PREFIX}/usr/X11R6/bin
mkdir -p ${PKG_PREFIX}/sys
mkdir -p ${PKG_PREFIX}/srv
mkdir -p ${PKG_PREFIX}/selinux
mkdir -p ${PKG_PREFIX}/proc
mkdir -p ${PKG_PREFIX}/opt
mkdir -p ${PKG_PREFIX}/mnt
mkdir -p ${PKG_PREFIX}/media
mkdir -p ${PKG_PREFIX}/lib/modules
mkdir -p ${PKG_PREFIX}/etc/xinetd.d
mkdir -p ${PKG_PREFIX}/etc/rpm
mkdir -p ${PKG_PREFIX}/etc/opt
mkdir -p ${PKG_PREFIX}/etc/ld.so.conf.d
mkdir -p ${PKG_PREFIX}/etc/X11/sysconfig
mkdir -p ${PKG_PREFIX}/etc/X11/starthere
mkdir -p ${PKG_PREFIX}/etc/X11/serverconfig
mkdir -p ${PKG_PREFIX}/etc/X11/applnk
;;
esac
exit 0