; Syllable Linux core system

; Root tree structure to build the distribution in

tree
;	Virtual file system mount points

	dev
	proc
	sys

;	Main directory structure

	system/config

	system/index/settings
	system/index/programs
	system/index/system-programs
	system/index/framework
	system/index/data
	system/index/tasks/setup
	system/index/tasks/start
	system/index/manuals

	system/development/headers
	system/development/resources

	usr/index/settings
	usr/index/programs
	usr/index/bin
	usr/index/applications
	usr/index/system-programs
	usr/index/sbin
	usr/index/framework
	usr/index/lib
	usr/index/include
	usr/index/data
	usr/index/tasks/setup
	usr/index/tasks/start
	usr/index/manuals

;	For compatibility:

	bin
	sbin

	usr/bin
	usr/sbin
	usr/lib
	usr/include
;	For GhostScript:
	usr/include/sys

	users/system home.png

	media/data

;	From LFS

	etc/default
;	etc/opt
	etc/profile.d
	etc/sysconfig/network-devices/ifconfig.eth0

	var/log
;	For inetd and such:
	var/run

	var/lock
;	Server:
	var/state/dhcp
	var/mail
;	For DHCP:
;	var/db
	var/spool
;	var/opt
	var/cache
;	var/lib/misc
;	var/lib/locate
;	var/local

	lib/modules

	lib/firmware
;	For UDevices <= 142:
	lib/udev/rules.d
	lib/udev/devices
	lib/udev/devices/pts
	lib/udev/devices/shm

prepare
	sudo mknod -m 600 dev/console c 5 1 &&
	sudo mknod -m 666 dev/null c 1 3 &&

;	mount --bind /dev dev &&

;	mount -t devpts	devpts	dev/pts &&
;	mount -t tmpfs	shm		dev/shm &&
;	mount -t proc	proc	proc &&
;	mount -t sysfs	sysfs	sys &&

;	install -d -m 0750 system &&
	sudo install -d -m 1777 tmp var/tmp &&

;	Compatibility link:
	sudo ln -s usr/ resources &&

	sudo touch		var/run/utmp var/log/{btmp,lastlog,wtmp} &&
	sudo chgrp utmp	var/run/utmp var/log/lastlog &&
	sudo chmod 664	var/run/utmp var/log/lastlog &&

;	touch etc/mtab &&

	sudo mknod -m0666			lib/udev/devices/null c 1 3 &&
;	For UDevices 145 ?
	sudo mknod -m0600			lib/udev/devices/kmesg c 1 11 &&
	sudo ln -s /proc/self/fd	lib/udev/devices/fd &&
	sudo ln -s /proc/self/fd/0	lib/udev/devices/stdin &&
	sudo ln -s /proc/self/fd/1	lib/udev/devices/stdout &&
	sudo ln -s /proc/self/fd/2	lib/udev/devices/stderr &&
	sudo ln -s /proc/kcore		lib/udev/devices/core &&

;	For sshd:
	sudo install -m700 -d		var/lib/sshd &&
	sudo chown system:system	var/lib/sshd &&

;	For LFS bootscripts:
	sudo ln -s /system/index/system-programs/cupsd			usr/sbin/ &&
	sudo ln -s /resources/index/system-programs/named		usr/sbin/ &&
;	ln -s /system/index/system-programs/sshd				usr/sbin/ &&
	sudo ln -s /resources/index/programs/apachectl			usr/sbin/ &&
	sudo ln -s /resources/index/programs/httpd				usr/sbin/ &&
	sudo ln -s /resources/index/system-programs/vsftpd		usr/sbin/ &&
	sudo ln -s /resources/index/programs/rsync				usr/bin/ &&
	sudo ln -s /resources/index/system-programs/nmbd		usr/sbin/ &&
	sudo ln -s /resources/index/system-programs/smbd		usr/sbin/ &&
	sudo ln -s /resources/index/system-programs/winbindd	usr/sbin/ &&

;	For OpenSSL and others:
	sudo ln -s /resources/index/programs/perl	usr/bin/ &&
;	For OpenSSL?
;	ln -s /resources/index/programs/perl		usr/local/bin/ &&
;	From BinaryUtilities, for building OpenSSL:
	sudo ln -s /resources/index/programs/ranlib	usr/bin/ &&

;	For Python:
	sudo ln -s /resources/index/programs/python				usr/bin/

resources
	system/											scripts/user-*.sh

	etc/											linux/ld.so.conf
	etc/											linux/inittab
	etc/sysconfig/									linux/clock
	etc/											linux/fstab
	etc/											linux/syslog.conf
	etc/sysconfig/									linux/console
	etc/											linux/passwd
	etc/											linux/group
	etc/											linux/inputrc
	etc/											linux/profile
	etc/											linux/hosts
	etc/											configuration/resolv.conf
	etc/sysconfig/									linux/network
	etc/sysconfig/network-devices/ifconfig.eth0/	linux/ipv4
	etc/											linux/dhclient.conf

;	Servers:
	etc/											linux/dhcpd.conf
	var/state/dhcp/									linux/dhcpd.leases

	users/											binaries/home-directories

	etc/profile.d/									linux/glib2-locale.sh

modules
;	Toolchain for bootstrapping

;	bootstrap apps/gnu/BinaryUtilities-2.19.1
;	Uses headers and runtime linker from the host!
;	bootstrap apps/gnu/GNU-CompilerCollection-4.1.2-bootstrap


;	Syllable Linux core system

	system linux/Linux-2.6.27.44-headers
;	For bootstrapping from a depmod with a different kernel modules location:
;	bootstrap linux/module-init-tools--bootstrap
	system linux/Linux-2.6.27.44-system


;	Kernel modules

	system linux/KernelQEmulator-1.3.0pre11


	system libs/glibc-2.7-system
	system libs/zlib-1.2.3

	linux/IPTables-1.4.6
;	system linux/Linux--cleanup


;	stage libraries/gettext-0.17
;	stage libraries/flex-2.5.33
;	stage libraries/bison-2.3
;	stage libraries/BinaryUtilities-2.19.1

	libraries libraries/GNU-CompilerCollection-4.1.2-system
;	For bootstrapping:
;	system apps/gnu/GNU-CompilerCollection-4.1.2-system


;	Extra requirements for bootstrapping

;	apps/gnu/BinaryUtilities-2.19.1
;	apps/gnu/make-3.81
;	apps/other/Ruby-1.8.7p248
;	apps/gnu/nano--curses


;	GrUB can use Curses:
	sys/boot/grub-0.97

	system linux/LFS-BootScripts-6.5
	linux/BLFS-BootScripts-2009.3.2

;	For init scripts:
	system apps/gnu/GRep-2.5.4

	system linux/sysvinit-2.86
	system linux/UDevices-142
	system linux/UDevices-config--current
	stage libs/zlib-1.2.3-static
	system linux/module-init-tools-3.2.2
;	Uses headers from /usr/include/!
;	system linux/util-linux-2.12r
	system linux/UtilLinuxNG-2.16.2
	system linux/E2FSPrograms-1.41.9
	system linux/sysklogd-1.4.1
	system linux/shadow-4.0.18.1
	libraries libraries/db-4.6.21-libraries
	system linux/iproute2-2.6.25
	linux/reiserfsprogs-3.6.19

	system apps/other/SUDo-1.7.2p2

;	Needs ranlib and perl symlinks in /usr/bin/!
	system libraries/OpenSSL--system


;	May be considered essential:

	system apps/other/OpenSSH-5.2p1
	apps/other/dhcp-3.0.5


;	Syllable Linux base distribution, in addition to core system

	system linux/procps-3.2.7


;	Binaries
	REBOL/REBOL2-Core--current


;	REBOL stacks
	REBOL/REBOL-Services--current
	REBOL/UniServe--current
	REBOL/Cheyenne--current
	REBOL/Cheyenne--QuarterMaster-current
	REBOL/captcha--current
	REBOL/rebol-mysql-1.2.0


;	Amazon tools
	apps/other/Ruby-1.8.7p248
	apps/other/s3sync--current


;	Extra goodies

	apps/other/S-Lang-2.2.2
	apps/other/glib-2.18.4
	apps/gnu/MidnightCommander-4.7.0.2

;	apps/other/rsync-2.6.9

finish
	sudo mv users/root/ users/administrator &&

;	Prevent anonymous CVS warning:
	sudo touch users/.template/.cvspass users/administrator/.cvspass &&

;	Clean out Desktop stuff for now:
	sudo rm -r users/.template/Settings/ users/administrator/Settings/ users/.template/Desktop/ users/administrator/Desktop/ users/.template/Bookmarks/ users/administrator/Bookmarks/
