From: gobo72 Date: Thu, 3 Mar 2011 02:24:07 +0000 (+0000) Subject: Fini la conversion du stage3 (nouveau format répertoire pkg) X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=9e3f8101a7e4d974db8e9afeb9c90c13a43ae8d7;p=hvlinux.git Fini la conversion du stage3 (nouveau format répertoire pkg) --- diff --git a/TODO b/TODO index d26a9ad..cbefc6f 100644 --- a/TODO +++ b/TODO @@ -4,8 +4,6 @@ -Vérifier option du kernel pour créér automatiquement /dev au démarrage (Generic Driver Options) --Remplacer hv_useradd par adduser? - -Dans le fichier packages-list, utiliser un array pour définir le nom du module et l'hyperlien pour le télécharger: BASH[0]=bash-3.0.2 @@ -13,8 +11,6 @@ BZIP2[0]=bzip2-1.0.1 BZIP2[1]=http://www.bzip.org/$(get_pkg_ver ${BZIP2}) --packages-list: prefixer chaque variabler avec "HVPKG_" pour eviter les bugs - -Enlever automatiquement les patches antérieures du style: [module]-[version]-[nom_patch]-[version_patch] @@ -36,13 +32,6 @@ -uw-imap: use config files instead of modifying Makefiles. -SPIP: mysql database name: - localhost :( - localhost.localdomain :) - --bc-1.06 : plus de patches disponibles sur le site lfs (ils ont - seulement la nouvelle version)... - -Compiler certains packages en parallèle (système de dependences) -Combiner stageX-install et packages-update. stageX-install devrait accepter @@ -57,9 +46,6 @@ SPIP: mysql database name: -stageX-install: si un package n'est pas disponible, le downloader automatiquement? --ldconfig et source /etc/profile: éxécuter automatiquement après chaque installation - d'un package. - -BIND: run in IPV4 mode only (option "-4") Mounting network volumes: check if networking is up. diff --git a/functions b/functions index ea18ae2..17dcbdb 100644 --- a/functions +++ b/functions @@ -759,17 +759,16 @@ ipkg_display_build_infos() # gnome # xorg # pm -# -s Name of script to execute or name of definition file (default is -# to source ipkg.def) +# -s Name of script to source (default is from name of package) ipkg() { START_TIME=$(echo `date +%s`) + unset ALT_SCRIPT_NAME export IPKG_MODE="ac" export HVLABEL="" # Global variable - local SCRIPT=${DEFAULT_IPKG_SCRIPT} - while getopts "hl:m:" flag ;do + while getopts "hl:m:s:" flag ;do case ${flag} in l) # Alternate label @@ -789,13 +788,7 @@ ipkg() ;; s) # Alternate script name - SCRIPT=${OPTARG} - - # Checking if script is valid and executable - if [ ! -x ${SCRIPT} ]; then - echo "${FUNCNAME}(): cannot execute script: ${SCRIPT}" - exit ${EXIT_FAILURE} - fi + ALT_SCRIPT_NAME=${OPTARG} ;; ?) echo "${FUNCNAME}(): Invalid option: ${OPTARG}." @@ -834,7 +827,7 @@ ipkg() 1> /dev/null 2>&1; then return $EXIT_SUCCESS fi - + # Displaying label MSGSTRING="Installing ${HVLABEL}" display_checkbox_msg ${MSGSTRING} @@ -853,15 +846,10 @@ ipkg() # All output from commands in this block sent to file $PACKAGE_LOG. exec > ${PACKAGE_LOG} 2>&1 - if [ "x${SCRIPT}" = "x${DEFAULT_IPKG_SCRIPT}" ]; then - # Executing standard ac script. - source ${SCRDIR}/../functions-ac - source ${SCRDIR}/${DEFAULT_IPKG_SCRIPT} - ipkg_script - else - # Executing custom script. - ${SCRIPT} ${PACKAGE} ${CONFIGURE_OPTS} - fi + # Sourcing standard ac script. + source ${SCRDIR}/../functions-ac + source ${SCRDIR}/${DEFAULT_IPKG_SCRIPT} + ipkg_script ${ALT_SCRIPT_NAME} # Make sure we are at a known location cd ${SCRDIR} diff --git a/functions-ac b/functions-ac index 0b056a3..89c7313 100644 --- a/functions-ac +++ b/functions-ac @@ -66,7 +66,9 @@ hvconfig() # Default build function hvbuild() { - if [ "x${IPKG_MODE}" = "xacnb" -o "x${IPKG_MODE}" = "xpm" ]; then + if [ "x${IPKG_MODE}" = "xacnb" -o \ + "x${IPKG_MODE}" = "xnoac" -o \ + "x${IPKG_MODE}" = "xpm" ]; then # Broken autoconf package that must build in source dir, or Perl module. cd ${LFS_TMP}/${PACKAGE} fi @@ -106,11 +108,19 @@ ipkg_finish() } # This is the main function doing all the work +# Arg #1: alternate script name (optional) ipkg_script() { - ipkg_decompress_package + if [ $# -eq 1 ]; then + # Use supplied script name + PACKAGE_DEF=${SCRDIR}/pkg/${1} + else + # Use default script name + PACKAGE_DEF=${SCRDIR}/pkg/$(get_pkg_name ${PACKAGE}) - PACKAGE_DEF=${SCRDIR}/pkg/$(get_pkg_name ${PACKAGE}) + fi + + ipkg_decompress_package if [ -f ${PACKAGE_DEF} ]; then echo "Load custom package functions and definitions" diff --git a/packages-list b/packages-list index b4bf9b4..56ecc20 100644 --- a/packages-list +++ b/packages-list @@ -224,7 +224,7 @@ INETUTILS="inetutils-1.7" INKSCAPE="inkscape-0.47" INTLTOOL="intltool-0.40.6" IPROUTE2="iproute2-2.6.35" -IPTABLES="iptables-1.3.8" +IPTABLES="iptables-1.4.7" ISO_CODES="iso-codes-3.11" JACK="jack-audio-connection-kit-0.118.0" @@ -287,10 +287,11 @@ LIBUSB="libusb-1.0.2" LIBUSB_COMPAT="libusb-compat-0.1.3" LIBWNCK="libwnck-2.28.0" LIBXKLAVIER="libxklavier-5.0" -LIBXML2="libxml2-2.7.6" +LIBXML2="libxml2-2.7.7" LIBXSLT="libxslt-1.1.26" LILYPOND="lilypond-2.12.3" LTSP_UTILS="ltsp-utils-0.25-0" +LYNX="lynx2.8.7rel.2" MAILMAN="mailman-2.1.8" MAKE_PACKAGE="make-3.82" @@ -309,16 +310,15 @@ MYSQL="mysql-5.1.42" NANO="nano-2.2.1" NCURSES="ncurses-5.7" NEON="neon-0.29.1" -NET_TOOLS="net-tools-1.60" NEWLIB="newlib-1.16.0" -NFS_UTILS="nfs-utils-1.1.5" +NFS_UTILS="nfs-utils-1.2.3" NMAP="nmap-4.20" NSS="nss-3.12-with-nspr-4.7" OPENJADE="openjade-1.3.2" OPENLDAP="openldap-2.3.38" OPENSP="OpenSP-1.5.2" -OPENSSH="openssh-5.1p1" +OPENSSH="openssh-5.6p1" OPENSSL="openssl-1.0.0b" OPENSSL_ROOT_CERTS="BLFS-ca-bundle-3.12.8.0" @@ -451,6 +451,7 @@ LUIT=luit-1.0.5 XORG_SERVER=xorg-server-1.8.2 XDM=xdm-1.1.10 +XINETD="xinetd-2.3.14" XMLTO="xmlto-0.0.23" XMLTOMAN="xmltoman-0.4" XTERM="xterm-253" diff --git a/stage3/INSTALL b/stage3/INSTALL index dccb97e..4741fee 100644 --- a/stage3/INSTALL +++ b/stage3/INSTALL @@ -2,4 +2,4 @@ Installation instructions ------------------------- -1. ./stage3-install +1. ./install-1 diff --git a/stage3/bootscripts/fcron b/stage3/bootscripts/fcron index f6b1c46..d26e880 100755 --- a/stage3/bootscripts/fcron +++ b/stage3/bootscripts/fcron @@ -10,15 +10,15 @@ log_script_name "$0 $*" # See how we were called. case "$1" in start) - cmd_run_log_box_warn "FCRON start" loadproc fcron -b -c /etc/fcron/fcron.conf + cmd_run_log_box_warn "Starting fcron" loadproc fcron -b -c /etc/fcron/fcron.conf ;; stop) - cmd_run_log_box_warn "FCRON stop" killproc fcron + cmd_run_log_box_warn "Stopping fcron" killproc fcron ;; reload) - cmd_run_log_box_warn "FCRON reload" reloadproc fcron + cmd_run_log_box_warn "reloading fcron" reloadproc fcron ;; restart) diff --git a/stage3/bootscripts/inetd b/stage3/bootscripts/inetd deleted file mode 100755 index 94fe326..0000000 --- a/stage3/bootscripts/inetd +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -# Source functions library -source /etc/rc.d/init.d/functions - -case "$1" in - start) - cmd_run_log_box_warn "Starting inetd daemon" loadproc inetd - ;; - - stop) - cmd_run_log_box_warn "Stopping inetd daemon" killproc inetd - ;; - - restart) - $0 stop - sleep 1 - $0 start - ;; - - status) - statusproc inetd - ;; - - *) - echo "Usage: $0 {start|stop|restart|status}" - exit ${EXIT_CODE_FAILURE} - ;; - -esac - -exit $? diff --git a/stage3/bootscripts/named b/stage3/bootscripts/named index db97748..80c9dc6 100755 --- a/stage3/bootscripts/named +++ b/stage3/bootscripts/named @@ -16,12 +16,12 @@ init_resolver() case $1 in start) - cmd_run_log_box_warn "named start" loadproc /usr/sbin/named -u named -t /home/named -c /etc/named.conf && + cmd_run_log_box_warn "Starting named" loadproc /usr/sbin/named -u named -t /home/named -c /etc/named.conf && init_resolver ;; stop) - cmd_run_log_box_warn "named stop" killproc named + cmd_run_log_box_warn "Stopping named" killproc named ;; restart) diff --git a/stage3/bootscripts/nfs b/stage3/bootscripts/nfs index e8621b7..e20b2b5 100755 --- a/stage3/bootscripts/nfs +++ b/stage3/bootscripts/nfs @@ -18,16 +18,21 @@ source /etc/sysconfig/network/network-parameters # Check that networking is up. #[ ${NETWORKING} = "no" ] && exit ${EXIT_CODE_WARNING} +# Check if NFS server functionality is desired +if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" -a "x${NFS_SERVER_ENA}" != "xYES" ]; then + exit ${EXIT_CODE_SUCCESS} +fi + # Check for presence of executables -if [ ! -x /usr/sbin/rpc.nfsd ]; then +if [ ! -x /sbin/rpc.nfsd ]; then echo "Missing rpc.nfsd executable" exit ${EXIT_CODE_WARNING} fi -if [ ! -x /usr/sbin/rpc.mountd ]; then +if [ ! -x /sbin/rpc.mountd ]; then echo "Missing rpc.mountd executable" exit ${EXIT_CODE_WARNING} fi -if [ ! -x /usr/sbin/exportfs ]; then +if [ ! -x /sbin/exportfs ]; then echo "Missing exportfs executable" exit ${EXIT_CODE_WARNING} fi @@ -36,11 +41,6 @@ if [ ! -s /etc/exports ]; then exit ${EXIT_CODE_WARNING} fi -if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" -a "x${NFS_SERVER_ENA}" != "xYES" ]; then - msg_log "NFS server disabled in '/etc/sysconfig/network/network-parameters'" - exit ${EXIT_CODE_WARNING} -fi - # Check for and source configuration file otherwise set defaults # TUNE_QUEUE: controls whether to up the size of input queues [ -f /etc/sysconfig/network/nfs ] && . /etc/sysconfig/network/nfs @@ -72,19 +72,19 @@ nfsd_start() { /sbin/sysctl -w net.core.rmem_default=$NFSD_QS >/dev/null 2>&1 /sbin/sysctl -w net.core.rmem_max=$NFSD_QS >/dev/null 2>&1 fi - cmd_run_log_box "Starting NFS services" loadproc /usr/sbin/exportfs -ra + cmd_run_log_box "Starting NFS services" loadproc /sbin/exportfs -ra if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then cmd_run_log_box "Starting NFS quotas" loadproc rpc.rquotad fi cmd_run_log_box "Starting NFS daemon" loadproc rpc.nfsd $NFSDCOUNT - + [ -n "$MOUNTD_PORT" ] \ && MOUNTD_OPTIONS="$MOUNTD_OPTIONS -p $MOUNTD_PORT" [ "$MOUNTD_TCP" = "no" -o "$MOUNTD_TCP" = "NO" ] \ && MOUNTD_OPTIONS="$MOUNTD_OPTIONS --no-tcp" - + cmd_run_log_box "Starting NFS mountd" loadproc rpc.mountd $MOUNTD_OPTIONS - + touch /var/lock/subsys/nfs # reset input queue for rest of network services if [ "$TUNE_QUEUE" = "yes" ]; then @@ -103,7 +103,7 @@ nfsd_stop() { # Do it the last so that clients can still access the server # when the server is running. echo "Refreshing NFS Exported Filesystems..." - /usr/sbin/exportfs -au + /sbin/exportfs -au rm -f /var/lock/subsys/nfs } @@ -114,16 +114,16 @@ case "$1" in start) cmd_run_log_box_warn "NFS server start" nfsd_start ;; - + stop) cmd_run_log_box_warn "NFS server stop" nfsd_stop ;; - + reload) - /usr/sbin/exportfs -ra + /sbin/exportfs -ra touch /var/lock/subsys/nfs ;; - + restart) $0 stop sleep 1 @@ -137,7 +137,7 @@ case "$1" in statusproc rpc.rquotad fi ;; - + *) echo "Usage: $0 {reload|restart|start|status|stop}" exit ${EXIT_CODE_FAILURE} diff --git a/stage3/bootscripts/portmap b/stage3/bootscripts/portmap index 9a54dc4..3daf753 100755 --- a/stage3/bootscripts/portmap +++ b/stage3/bootscripts/portmap @@ -7,6 +7,14 @@ source /etc/rc.d/init.d/functions log_script_name "$0 $*" +# Load global network parameters +source /etc/sysconfig/network/network-parameters + +# Check if NFS server must be enabled +if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" -a "x${NFS_SERVER_ENA}" != "xYES" ]; then + exit ${EXIT_CODE_SUCCESS} +fi + # See how we were called case "$1" in start) @@ -16,11 +24,11 @@ case "$1" in stop) cmd_run_log_box_warn "portmap stop" killproc portmap ;; - + reload) reloadproc portmap ;; - + restart) $0 stop sleep 1 @@ -30,7 +38,7 @@ case "$1" in status) statusproc portmap ;; - + *) echo "Usage: $0 {reload|restart|start|status|stop}" exit ${EXIT_CODE_FAILURE} diff --git a/stage3/bootscripts/sshd b/stage3/bootscripts/sshd index 83e4349..58060d1 100755 --- a/stage3/bootscripts/sshd +++ b/stage3/bootscripts/sshd @@ -44,11 +44,11 @@ sshd_start() { # See how we were called case "$1" in start) - cmd_run_log_box_warn "sshd start" sshd_start + cmd_run_log_box_warn "Starting sshd" sshd_start ;; stop) - cmd_run_log_box_warn "sshd stop" killproc sshd + cmd_run_log_box_warn "Stopping sshd" killproc sshd ;; reload) diff --git a/stage3/bootscripts/xinetd b/stage3/bootscripts/xinetd new file mode 100755 index 0000000..75e1221 --- /dev/null +++ b/stage3/bootscripts/xinetd @@ -0,0 +1,34 @@ +#!/bin/bash + +# Source functions library +source /etc/rc.d/init.d/functions + +DAEMON=xinetd + +case "$1" in + start) + cmd_run_log_box_warn "Starting xinetd daemon" loadproc ${DAEMON} + ;; + + stop) + cmd_run_log_box_warn "Stopping xinetd daemon" killproc ${DAEMON} + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc ${DAEMON} + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit ${EXIT_CODE_FAILURE} + ;; + +esac + +exit $? diff --git a/stage3/install-1 b/stage3/install-1 index 5e9469d..c5d0f7c 100755 --- a/stage3/install-1 +++ b/stage3/install-1 @@ -26,38 +26,41 @@ ipkg -m acnb ${LIBUSB} ipkg ${LIBUSB_COMPAT} ipkg ${USBUTILS} ipkg ${FCRON} - -exit 1 - ipkg ${OPENSSH} +ipkg ${LYNX} ipkg ${EXPAT} ipkg ${APR} "--with-installbuilddir=/usr/lib/apr-1/build" ipkg ${APR_UTIL} "--with-apr=/usr/bin/apr-1-config" ipkg ${NEON} "--with-ssl" -ipkg ${TCL} +ipkg -s tcl ${TCL} ipkg ${SQLITE} -ipkg ${SUBVERSION} +ipkg ${SUBVERSION} "--without-berkeley-db" ipkg ${SUDO} ipkg ${STRACE} -ipkg ${PCRE} \ - --docdir=/usr/share/doc/pcre \ +ipkg ${PCRE} "--docdir=/usr/share/doc/pcre \ --enable-utf8 \ --enable-unicode-properties \ --enable-pcregrep-libz \ - --enable-pcregrep-libbz2 + --enable-pcregrep-libbz2" # Networking -ipkg ${TCPWRAPPERS} -ipkg ${PORTMAP} -ipkg ${NFS_UTILS} -ipkg ${INETUTILS} +ipkg -m noac -s tcp_wrappers ${TCPWRAPPERS} +ipkg -m noac ${PORTMAP} +ipkg -m acnb ${NFS_UTILS} "--disable-nfsv4 \ + --sbindir=/sbin \ + --disable-tirpc \ + --disable-gss" +ipkg ${XINETD} if [ "x${USE_DYNAMIC_DNS}" = "xyes" ]; then ipkg ${DDCLIENT} fi ipkg -m acnb ${LIBPCAP} ipkg ${TCPDUMP} ipkg -m acnb ${NMAP} "--without-nmapfe" -ipkg ${BIND} +ipkg ${BIND} "--localstatedir=/var \ + --mandir=/usr/share/man \ + --enable-threads \ + --with-libtool" ipkg ${IPTABLES} ipkg ${CURL} ipkg ${RSYNC} @@ -67,9 +70,9 @@ if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then fi # Archiving -ipkg ${ZIP} -ipkg ${UNZIP} -ipkg ${UNRAR} +ipkg -m noac ${ZIP} +ipkg -m noac ${UNZIP} +ipkg -m noac ${UNRAR} ipkg ${CPIO} ipkg ${PARTED} "--disable-device-mapper" @@ -77,8 +80,8 @@ ipkg ${ED} ipkg ${BC} "--with-readline" INIT_D_PATH=/etc/rc.d/init.d \ ipkg -m acnb ${FUSE} -ipkg ${DOSFSTOOLS} -ipkg ${GIT} +ipkg -m noac ${DOSFSTOOLS} +ipkg -m acnb ${GIT} # Perl modules ipkg -m pm ${PERL_MOD_PDL} @@ -89,24 +92,24 @@ ipkg ${INTLTOOL} ipkg ${PYTHON} "--enable-shared" # DocBook -ipkg ${SGML_COMMON} -ipkg ${SGML_DTD3} -ipkg ${SGML_DTD4} -ipkg ${OPENSP} -ipkg ${OPENJADE} -ipkg ${DOCBOOK_DSSSL} -ipkg -m pm ${SGML_SPM} -ipkg ${DOCBOOK_UTILS} +ipkg -m acnb ${SGML_COMMON} +ipkg -m noac -s sgml-dtd3 ${SGML_DTD3} +ipkg -m noac -s sgml-dtd4 ${SGML_DTD4} +ipkg ${OPENSP} +ipkg -m acnb ${OPENJADE} +ipkg -m noac ${DOCBOOK_DSSSL} +ipkg -m noac ${SGML_SPM} +ipkg ${DOCBOOK_UTILS} ipkg -m acnb ${LIBXML2} ipkg -m acnb ${LIBXSLT} -ipkg ${DOCBOOK_XML} -ipkg ${DOCBOOK_XSL} -ipkg ${XMLTOMAN} +ipkg -m noac ${DOCBOOK_XML} +ipkg -m noac ${DOCBOOK_XSL} +ipkg -m noac ${XMLTOMAN} ipkg ${XMLTO} # Graphic libraries ipkg ${LIBJPEG} "--enable-static --enable-shared" -ipkg ${LIBOPENJPEG} +ipkg -m noac ${LIBOPENJPEG} ipkg ${LIBPNG} ipkg ${LIBART} ipkg ${LIBEXIF} @@ -115,7 +118,7 @@ ipkg -m acnb ${HICOLOR_ICON_THEME} ipkg ${TIFF} ipkg ${GIFLIB} ipkg -m acnb ${LCMS} -ipkg ${LIBMNG} +ipkg -m noac ${LIBMNG} ipkg ${FREETYPE} ipkg ${FONTCONFIG} diff --git a/stage3/packages-update b/stage3/packages-update index 60d825d..0ebc51c 100755 --- a/stage3/packages-update +++ b/stage3/packages-update @@ -19,9 +19,6 @@ fi # These packages were already downloaded for stage1: lpkg 1 ${NANO} -# These packages were already downloaded for stage2: -lpkg 2 ${INETUTILS} - # These packages are only for stage3 fpkg_gnu ${WHICH} fpkg ${PCIUTILS} ftp://ftp.kernel.org/pub/software/utils/pciutils @@ -35,6 +32,7 @@ fpkg -e "tar.gz" -f "${FCRON}.src" ${FCRON} http://fcron.free.fr/archives fpkg ${OPENSSL} ftp://ftp.openssl.org/source fpkg ${OPENSSL_ROOT_CERTS} http://anduin.linuxfromscratch.org/files/BLFS fpkg ${OPENSSH} ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable +fpkg ${LYNX} http://lynx.isc.org/current fpkg_sf ${EXPAT} fpkg ${APR} http://apache.sunsite.ualberta.ca/apr fpkg ${APR_UTIL} http://apache.sunsite.ualberta.ca/apr @@ -50,6 +48,7 @@ fpkg_gnu ${WGET} fpkg ${TCPWRAPPERS} ftp://ftp.porcupine.org/pub/security fpkg ${PORTMAP} http://neil.brown.name/portmap fpkg ${NFS_UTILS} ftp://ftp.kernel.org/pub/linux/utils/nfs +fpkg ${XINETD} "http://www.xinetd.org" fpkg_sf ${DDCLIENT} fpkg ${LIBPCAP} "http://www.tcpdump.org/release" fpkg ${TCPDUMP} "http://www.tcpdump.org/release" diff --git a/stage3/pkg/Linux-PAM b/stage3/pkg/Linux-PAM index 26e4915..9a9f766 100644 --- a/stage3/pkg/Linux-PAM +++ b/stage3/pkg/Linux-PAM @@ -10,7 +10,7 @@ hvconfig_pre() --sbindir=/lib/security \ --enable-securedir=/lib/security \ --enable-shared \ - --docdir=/usr/share/doc/${1}" + --docdir=/usr/share/doc/${PACKAGE}" } hvbuild_post() diff --git a/stage3/pkg/OpenSP b/stage3/pkg/OpenSP new file mode 100644 index 0000000..9ee4aef --- /dev/null +++ b/stage3/pkg/OpenSP @@ -0,0 +1,51 @@ +#!/bin/bash + +hvconfig_pre() +{ + CAT1="/etc/sgml/${PACKAGE}.cat" + CAT2="/usr/share/sgml/${PACKAGE}/catalog" + + CAT3="/etc/sgml/sgml-docbook.cat" + CAT4="/etc/sgml/${PACKAGE}.cat" + + # Remove the old catalog items prior to upgrading... + # First test for presence of 'install-catalog' program + INSTALL_CATALOG=/usr/bin/install-catalog + if [ -x ${INSTALL_CATALOG} ]; then + if [ -f ${CAT1} ]; then + ${INSTALL_CATALOG} --remove ${CAT1} ${CAT2} + fi + if [ -f ${CAT4} ]; then + ${INSTALL_CATALOG} --remove ${CAT3} ${CAT4} + fi + fi + + cd ${LFS_TMP}/${PACKAGE} + sed -i 's:32,:253,:' lib/Syntax.cxx + sed -i 's:LITLEN 240 :LITLEN 8092:' \ + unicode/{gensyntax.pl,unicode.syn} + + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --disable-static \ + --disable-doc-build \ + --enable-default-catalog=/etc/sgml/catalog \ + --enable-http \ + --enable-default-search-path=/usr/share/sgml" + + export pkgdatadir=/usr/share/sgml/${PACKAGE} +} + +hvbuild_post() +{ + unset pkgdatadir + + ln -v -sf onsgmls /usr/bin/nsgmls + ln -v -sf osgmlnorm /usr/bin/sgmlnorm + ln -v -sf ospam /usr/bin/spam + ln -v -sf ospcat /usr/bin/spcat + ln -v -sf ospent /usr/bin/spent + ln -v -sf osx /usr/bin/sx + ln -v -sf osx /usr/bin/sgml2xml + ln -v -sf libosp.so /usr/lib/libsp.so +} diff --git a/stage3/pkg/SGMLSpm b/stage3/pkg/SGMLSpm new file mode 100644 index 0000000..d03e850 --- /dev/null +++ b/stage3/pkg/SGMLSpm @@ -0,0 +1,10 @@ +#!/bin/bash + +hvconfig_pre() +{ + cd ${LFS_TMP}/${PACKAGE} + sed -i -e "s@/usr/local/bin@/usr/bin@" \ + -e "s@/usr/local/lib/perl5@/usr/lib/perl5/site_perl/$(get_pkg_ver ${PERL})@" \ + -e "s@/usr/local/lib/www/docs@/usr/share/doc/perl5@" \ + Makefile +} diff --git a/stage3/pkg/bind b/stage3/pkg/bind index a908d68..39f549d 100644 --- a/stage3/pkg/bind +++ b/stage3/pkg/bind @@ -1,79 +1,60 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -groupadd -f named -hv_useradd -c BindOwner -g named -m -s /bin/false named - -cd ${LFS_TMP}/${1} -./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --enable-threads \ - --with-libtool -# Use updated address for L.ROOT-SERVERS.NET. -sed -i "s@198.32.64.12@199.7.83.42@" lib/dns/rootns.c -make -make install - -# Enable the execute bit to prevent a warning when using ldd to check library dependencies. -chmod 755 /usr/lib/lib{bind9,isc{,cc,cfg},lwres,dns}.so.*.?.? - -cd doc -install -d -m755 /usr/share/doc/${1}/{arm,draft,misc,rfc} -install -m644 arm/*.html /usr/share/doc/${1}/arm -install -m644 draft/*.txt /usr/share/doc/${1}/draft -install -m644 rfc/* /usr/share/doc/${1}/rfc -install -m644 misc/{dnssec,ipv6,migrat*,options,rfc-compliance,roadmap,sdb} \ - /usr/share/doc/${1}/misc - -# Generation of a key for use in the named.conf and rdnc.conf files using the rndc-confgen command. -BINDKEY=$(rndc-confgen -b 512 | grep -m 1 "secret" | cut -d '"' -f 2) - -cd /home/named -mkdir -p dev etc/namedb/{pz,slave} var/run -rm -f /home/named/dev/null -mknod /home/named/dev/null c 1 3 -rm -f /home/named/dev/random -mknod /home/named/dev/random c 1 8 -chmod 666 /home/named/dev/{null,random} -cp /etc/localtime /home/named/etc - -# Creating the named.conf file from which named will read the location of zone files, -# root name servers and secure DNS keys. -cat > /home/named/etc/named.conf << "EOF" - options { - directory "/etc/namedb"; +#!/bin/bash + +hvconfig_pre() +{ + groupadd -f named + hv_useradd -c BindOwner -g named -m -s /bin/false named +} + +hvconfig_post() +{ + # Use updated address for L.ROOT-SERVERS.NET. + sed -i "s@198.32.64.12@199.7.83.42@" ${LFS_TMP}/${PACKAGE}/lib/dns/rootns.c +} + +hvbuild_post() +{ + # Enable the execute bit to prevent a warning when using ldd to check + # library dependencies. + chmod 755 /usr/lib/lib{bind9,isc{,cc,cfg},lwres,dns}.so.*.?.? + + # Generation of a key for use in the named.conf and rdnc.conf files using + # the rndc-confgen command. + BINDKEY=$(rndc-confgen -b 512 | grep -m 1 "secret" | cut -d '"' -f 2) + + cd /home/named + mkdir -p dev etc/namedb/{pz,slave} var/run + rm -f /home/named/dev/null + mknod /home/named/dev/null c 1 3 + rm -f /home/named/dev/random + mknod /home/named/dev/random c 1 8 + chmod 666 /home/named/dev/{null,random} + cp /etc/localtime /home/named/etc + + # Creating the named.conf file from which named will read the location of + # zone files, root name servers and secure DNS keys. + cat > /home/named/etc/named.conf << "EOF" +options { + directory "/etc/namedb"; pid-file "/var/run/named.pid"; statistics-file "/var/run/named.stats"; - - }; - controls { - inet 127.0.0.1 allow { localhost; } keys { rndc_key; }; - }; - key "rndc_key" { - algorithm hmac-md5; - secret "_BIND_KEY_"; - }; - zone "." { - type hint; - file "root.hints"; - }; - zone "0.0.127.in-addr.arpa" { - type master; - file "pz/127.0.0"; - }; + +}; +controls { + inet 127.0.0.1 allow { localhost; } keys { rndc_key; }; +}; +key "rndc_key" { + algorithm hmac-md5; + secret "_BIND_KEY_"; +}; +zone "." { + type hint; + file "root.hints"; +}; +zone "0.0.127.in-addr.arpa" { + type master; + file "pz/127.0.0"; +}; // Bind 9 now logs by default through syslog (except debug). // These are the default logging rules. @@ -112,9 +93,9 @@ logging { }; }; EOF -sed -i -e "s!_BIND_KEY_!${BINDKEY}!g" /home/named/etc/named.conf + sed -i -e "s!_BIND_KEY_!${BINDKEY}!g" /home/named/etc/named.conf -cat > /etc/rndc.conf << "EOF" + cat > /etc/rndc.conf << "EOF" key rndc_key { algorithm "hmac-md5"; secret @@ -125,9 +106,9 @@ options { default-key rndc_key; }; EOF -sed -i -e "s!_BIND_KEY_!${BINDKEY}!g" /etc/rndc.conf + sed -i -e "s!_BIND_KEY_!${BINDKEY}!g" /etc/rndc.conf -cat > /home/named/etc/namedb/pz/127.0.0 << "EOF" + cat > /home/named/etc/namedb/pz/127.0.0 << "EOF" $TTL 3D @ IN SOA ns.local.domain. hostmaster.local.domain. ( 1 ; Serial @@ -139,7 +120,7 @@ $TTL 3D 1 PTR localhost. EOF -cat > /home/named/etc/namedb/root.hints << "EOF" + cat > /home/named/etc/namedb/root.hints << "EOF" . 6D IN NS A.ROOT-SERVERS.NET. . 6D IN NS B.ROOT-SERVERS.NET. . 6D IN NS C.ROOT-SERVERS.NET. @@ -168,12 +149,11 @@ L.ROOT-SERVERS.NET. 6D IN A 198.32.64.12 M.ROOT-SERVERS.NET. 6D IN A 202.12.27.33 EOF -chown -R named.named /home/named - -# Bootscript -install -v -m740 ${SCRDIR}/bootscripts/named /etc/rc.d/init.d + chown -R named.named /home/named -# script-name start stop -bootscript_add_rc3 named 25 65 + # Bootscript + install -v -m740 ${SCRDIR}/bootscripts/named /etc/rc.d/init.d -exit $? + # script-name start stop + bootscript_add_rc3 named 25 65 +} diff --git a/stage3/pkg/ddclient b/stage3/pkg/ddclient index 46de4af..2a3d29d 100644 --- a/stage3/pkg/ddclient +++ b/stage3/pkg/ddclient @@ -1,22 +1,13 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list +#!/bin/bash -# Applying patches (if any) -apply_patches ${1} +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + install ddclient /usr/sbin + mkdir -p /etc/ddclient + cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf -cd ${LFS_TMP}/${1} -install ddclient /usr/sbin -mkdir -p /etc/ddclient -cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf - -cat > /var/lib/dhcpc/dhcpcd.exe << "EOF" + cat > /var/lib/dhcpc/dhcpcd.exe << "EOF" #!/bin/sh ## Update the DNS server unless the IP address is a private address @@ -58,6 +49,5 @@ esac exit $? EOF -chmod 740 /var/lib/dhcpc/dhcpcd.exe - -exit $? + chmod 740 /var/lib/dhcpc/dhcpcd.exe +} diff --git a/stage3/pkg/docbook-dsssl b/stage3/pkg/docbook-dsssl index 835103a..0c4077d 100644 --- a/stage3/pkg/docbook-dsssl +++ b/stage3/pkg/docbook-dsssl @@ -1,27 +1,18 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} - -install -m755 bin/collateindex.pl /usr/bin -install -m644 bin/collateindex.pl.1 /usr/share/man/man1 -install -d -m755 /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER} -cp -R * /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER} -install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \ - /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER}/catalog -install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \ - /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER}/common/catalog -install-catalog --add /etc/sgml/sgml-docbook.cat \ - /etc/sgml/dsssl-docbook-stylesheets.cat - -exit $? + install -m755 bin/collateindex.pl /usr/bin + install -m644 bin/collateindex.pl.1 /usr/share/man/man1 + install -d -m755 \ + /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER} + cp -R * /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER} + install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \ + /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER}/catalog + install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \ + /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER}/common/catalog + install-catalog --add /etc/sgml/sgml-docbook.cat \ + /etc/sgml/dsssl-docbook-stylesheets.cat +} diff --git a/stage3/pkg/docbook-utils b/stage3/pkg/docbook-utils index 46636ec..f822667 100644 --- a/stage3/pkg/docbook-utils +++ b/stage3/pkg/docbook-utils @@ -1,25 +1,14 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} -sed -i 's:/html::' doc/HTML/Makefile.in -./configure \ - --prefix=/usr -make -make install - -for doctype in html ps dvi man pdf rtf tex texi txt; do - ln -sf docbook2$doctype /usr/bin/db2$doctype -done - -exit $? +#!/bin/bash + +hvconfig_pre() +{ + cd ${LFS_TMP}/${PACKAGE} + sed -i 's:/html::' doc/HTML/Makefile.in +} + +hvbuild_post() +{ + for doctype in html ps dvi man pdf rtf tex texi txt; do + ln -sf docbook2$doctype /usr/bin/db2$doctype + done +} diff --git a/stage3/pkg/docbook-xml b/stage3/pkg/docbook-xml index 98a1f6b..2810120 100644 --- a/stage3/pkg/docbook-xml +++ b/stage3/pkg/docbook-xml @@ -1,112 +1,99 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + install -d -m755 /usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER} + install -d -m755 /etc/xml + chown -R root:root . + cp -af docbook.cat *.dtd ent/ *.mod \ + /usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER} -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list + if [ ! -e /etc/xml/docbook ]; then + xmlcatalog --noout --create /etc/xml/docbook + fi + xmlcatalog --noout --add "public" "-//OASIS//DTD DocBook XML V${DOCBOOK_XML_VER}//EN" "http://www.oasis-open.org/docbook/xml/${DOCBOOK_XML_VER}/docbookx.dtd" /etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML CALS Table Model V${DOCBOOK_XML_VER}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/calstblx.dtd" \ + /etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/soextblx.dtd" \ + /etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Information Pool V${DOCBOOK_XML_VER}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbpoolx.mod" \ + /etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V${DOCBOOK_XML_VER}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbhierx.mod" \ + /etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML HTML Tables V${DOCBOOK_XML_VER}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/htmltblx.mod" \ + /etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Notations V${DOCBOOK_XML_VER}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbnotnx.mod" \ + /etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Character Entities V${DOCBOOK_XML_VER}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbcentx.mod" \ + /etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Additional General Entities V${DOCBOOK_XML_VER}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbgenent.mod" \ + /etc/xml/docbook + xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/${DOCBOOK_XML_VER}" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ + /etc/xml/docbook + xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/${DOCBOOK_XML_VER}" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ + /etc/xml/docbook -# Applying patches (if any) -apply_patches ${1} + if [ ! -e /etc/xml/catalog ]; then + xmlcatalog --noout --create /etc/xml/catalog + fi + xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//ENTITIES DocBook XML" \ + "file:///etc/xml/docbook" \ + /etc/xml/catalog + xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//DTD DocBook XML" \ + "file:///etc/xml/docbook" \ + /etc/xml/catalog + xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/" \ + "file:///etc/xml/docbook" \ + /etc/xml/catalog + xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/" \ + "file:///etc/xml/docbook" \ + /etc/xml/catalog -cd ${LFS_TMP}/${1} -install -d -m755 /usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER} -install -d -m755 /etc/xml -chown -R root:root . -cp -af docbook.cat *.dtd ent/ *.mod \ - /usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER} - -if [ ! -e /etc/xml/docbook ]; then - xmlcatalog --noout --create /etc/xml/docbook -fi -xmlcatalog --noout --add "public" \ - "-//OASIS//DTD DocBook XML V${DOCBOOK_XML_VER}//EN" \ - "http://www.oasis-open.org/docbook/xml/${DOCBOOK_XML_VER}/docbookx.dtd" \ - /etc/xml/docbook -xmlcatalog --noout --add "public" \ - "-//OASIS//DTD DocBook XML CALS Table Model V${DOCBOOK_XML_VER}//EN" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/calstblx.dtd" \ - /etc/xml/docbook -xmlcatalog --noout --add "public" \ - "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/soextblx.dtd" \ - /etc/xml/docbook -xmlcatalog --noout --add "public" \ - "-//OASIS//ELEMENTS DocBook XML Information Pool V${DOCBOOK_XML_VER}//EN" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbpoolx.mod" \ - /etc/xml/docbook -xmlcatalog --noout --add "public" \ - "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V${DOCBOOK_XML_VER}//EN" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbhierx.mod" \ - /etc/xml/docbook -xmlcatalog --noout --add "public" \ - "-//OASIS//ELEMENTS DocBook XML HTML Tables V${DOCBOOK_XML_VER}//EN" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/htmltblx.mod" \ - /etc/xml/docbook -xmlcatalog --noout --add "public" \ - "-//OASIS//ENTITIES DocBook XML Notations V${DOCBOOK_XML_VER}//EN" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbnotnx.mod" \ - /etc/xml/docbook -xmlcatalog --noout --add "public" \ - "-//OASIS//ENTITIES DocBook XML Character Entities V${DOCBOOK_XML_VER}//EN" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbcentx.mod" \ - /etc/xml/docbook -xmlcatalog --noout --add "public" \ - "-//OASIS//ENTITIES DocBook XML Additional General Entities V${DOCBOOK_XML_VER}//EN" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbgenent.mod" \ - /etc/xml/docbook -xmlcatalog --noout --add "rewriteSystem" \ - "http://www.oasis-open.org/docbook/xml/${DOCBOOK_XML_VER}" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ - /etc/xml/docbook -xmlcatalog --noout --add "rewriteURI" \ - "http://www.oasis-open.org/docbook/xml/${DOCBOOK_XML_VER}" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ - /etc/xml/docbook - -if [ ! -e /etc/xml/catalog ]; then - xmlcatalog --noout --create /etc/xml/catalog -fi -xmlcatalog --noout --add "delegatePublic" \ - "-//OASIS//ENTITIES DocBook XML" \ - "file:///etc/xml/docbook" \ - /etc/xml/catalog -xmlcatalog --noout --add "delegatePublic" \ - "-//OASIS//DTD DocBook XML" \ - "file:///etc/xml/docbook" \ - /etc/xml/catalog -xmlcatalog --noout --add "delegateSystem" \ - "http://www.oasis-open.org/docbook/" \ - "file:///etc/xml/docbook" \ - /etc/xml/catalog -xmlcatalog --noout --add "delegateURI" \ - "http://www.oasis-open.org/docbook/" \ - "file:///etc/xml/docbook" \ - /etc/xml/catalog - -for DTDVERSION in ${DOCBOOK_XML_VER_PREV}; do - xmlcatalog --noout --add "public" \ - "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \ - "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \ - /etc/xml/docbook - xmlcatalog --noout --add "rewriteSystem" \ - "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ - /etc/xml/docbook - xmlcatalog --noout --add "rewriteURI" \ - "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ - "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ - /etc/xml/docbook - xmlcatalog --noout --add "delegateSystem" \ - "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ - "file:///etc/xml/docbook" \ - /etc/xml/catalog - xmlcatalog --noout --add "delegateURI" \ - "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ - "file:///etc/xml/docbook" \ - /etc/xml/catalog -done - -exit $? + for DTDVERSION in ${DOCBOOK_XML_VER_PREV}; do + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \ + "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \ + /etc/xml/docbook + xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ + /etc/xml/docbook + xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ + "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ + /etc/xml/docbook + xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ + "file:///etc/xml/docbook" \ + /etc/xml/catalog + xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ + "file:///etc/xml/docbook" \ + /etc/xml/catalog + done +} diff --git a/stage3/pkg/docbook-xsl b/stage3/pkg/docbook-xsl index 1068189..f613c0a 100644 --- a/stage3/pkg/docbook-xsl +++ b/stage3/pkg/docbook-xsl @@ -1,50 +1,43 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + install -v -m 755 -d \ + /usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION} + chown -R root:root . + cp -v -R VERSION common eclipse extensions fo highlighting html \ + htmlhelp images javahelp lib manpages params profiling \ + slides template tools website xhtml \ + /usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION} + install -v -m644 -D README \ + /usr/share/doc/docbook-xsl-${DOCBOOK_XSL_VERSION}/README.XSL && + install -v -m755 RELEASE-NOTES* NEWS* \ + /usr/share/doc/docbook-xsl-${DOCBOOK_XSL_VERSION} -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list + if [ ! -f /etc/xml/catalog ]; then + mkdir -p /etc/xml + xmlcatalog --noout --create /etc/xml/catalog + fi + if [ ! -e /etc/xml/docbook ]; then + xmlcatalog --noout --create /etc/xml/docbook + fi + xmlcatalog --noout --add "rewriteSystem" \ + "http://docbook.sourceforge.net/release/xsl/current" \ + "/usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION}" \ + /etc/xml/catalog + xmlcatalog --noout --add "rewriteURI" \ + "http://docbook.sourceforge.net/release/xsl/current" \ + "/usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION}" \ + /etc/xml/catalog + xmlcatalog --noout --add "delegateSystem" \ + "http://docbook.sourceforge.net/release/xsl/" \ + "file:///etc/xml/docbook" /etc/xml/catalog + xmlcatalog --noout --add "delegateURI" \ + "http://docbook.sourceforge.net/release/xsl/" \ + "file:///etc/xml/docbook" /etc/xml/catalog -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} -install -v -m 755 -d /usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION} -chown -R root:root . -cp -v -R VERSION common eclipse extensions fo highlighting html \ - htmlhelp images javahelp lib manpages params profiling \ - slides template tools website xhtml \ - /usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION} -install -v -m644 -D README \ - /usr/share/doc/docbook-xsl-${DOCBOOK_XSL_VERSION}/README.XSL && -install -v -m755 RELEASE-NOTES* NEWS* \ - /usr/share/doc/docbook-xsl-${DOCBOOK_XSL_VERSION} - -if [ ! -f /etc/xml/catalog ]; then - mkdir -p /etc/xml - xmlcatalog --noout --create /etc/xml/catalog -fi -if [ ! -e /etc/xml/docbook ]; then - xmlcatalog --noout --create /etc/xml/docbook -fi -xmlcatalog --noout --add "rewriteSystem" \ - "http://docbook.sourceforge.net/release/xsl/current" \ - "/usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION}" /etc/xml/catalog -xmlcatalog --noout --add "rewriteURI" \ - "http://docbook.sourceforge.net/release/xsl/current" \ - "/usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION}" /etc/xml/catalog -xmlcatalog --noout --add "delegateSystem" \ - "http://docbook.sourceforge.net/release/xsl/" \ - "file:///etc/xml/docbook" /etc/xml/catalog -xmlcatalog --noout --add "delegateURI" \ - "http://docbook.sourceforge.net/release/xsl/" \ - "file:///etc/xml/docbook" /etc/xml/catalog - -var_add_str "XML_CATALOG_FILES" /etc/profile \ - "/usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION}/catalog.xml /etc/xml/catalog" -var_export "XML_CATALOG_FILES" /etc/profile - -exit $? + var_add_str "XML_CATALOG_FILES" /etc/profile \ + "/usr/share/xml/docbook/xsl-stylesheets-${DOCBOOK_XSL_VERSION}/catalog.xml /etc/xml/catalog" + var_export "XML_CATALOG_FILES" /etc/profile +} diff --git a/stage3/pkg/dosfstools b/stage3/pkg/dosfstools index 72498ae..c9e35f2 100644 --- a/stage3/pkg/dosfstools +++ b/stage3/pkg/dosfstools @@ -1,22 +1,8 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} -make -make PREFIX=/usr SBINDIR=/sbin install -ldconfig - -exit $? +#!/bin/bash + +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + make + make PREFIX=/usr SBINDIR=/sbin install +} diff --git a/stage3/pkg/fontconfig b/stage3/pkg/fontconfig index fd696a2..e3ff347 100644 --- a/stage3/pkg/fontconfig +++ b/stage3/pkg/fontconfig @@ -1,48 +1,31 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -if [ -z "${HV_FONTS_PATH}" ]; then - echo "Missing HV_FONTS_PATH environment variable" - exit 1 -fi - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE}-build -../${PACKAGE}/configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-docs \ - --without-add-fonts \ - --with-docdir=/usr/share/doc/${PACKAGE} \ - ${CONFIGURE_OPTS} -make -make install -ldconfig - -mkdir -v -p ${HV_FONTS_PATH}/{TrueType,Type1} -mkdir -v -p /etc/fonts - -if [ -f /etc/fonts/local.conf ]; then - mv -v /etc/fonts/local.conf /etc/fonts/local.conf.old -fi - -# Adding X and our local fonts directory to local configuration file -cat > /etc/fonts/local.conf << "EOF" +#!/bin/bash + +hvconfig_pre() +{ + if [ -z "${HV_FONTS_PATH}" ]; then + echo "Missing HV_FONTS_PATH environment variable" + exit 1 + fi + + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --localstatedir=/var \ + --disable-docs \ + --without-add-fonts \ + --with-docdir=/usr/share/doc/${PACKAGE}" +} + +hvbuild_post() +{ + mkdir -v -p ${HV_FONTS_PATH}/{TrueType,Type1} + mkdir -v -p /etc/fonts + + if [ -f /etc/fonts/local.conf ]; then + mv -v /etc/fonts/local.conf /etc/fonts/local.conf.old + fi + + # Adding X and our local fonts directory to local configuration file + cat > /etc/fonts/local.conf << "EOF" @@ -52,9 +35,8 @@ cat > /etc/fonts/local.conf << "EOF" EOF -sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/fonts/local.conf - -# Updating cache database. -fc-cache -f + sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/fonts/local.conf -exit $? + # Updating cache database. + fc-cache -f +} diff --git a/stage3/pkg/freetype b/stage3/pkg/freetype index 7aa6483..4d24af0 100644 --- a/stage3/pkg/freetype +++ b/stage3/pkg/freetype @@ -1,4 +1,9 @@ +#!/bin/bash +hvconfig_pre() +{ + cd ${LFS_TMP}/${PACKAGE} -sed -i -r 's:.*(#.*SUBPIXEL.*) .*:\1:' \ - include/freetype/config/ftoption.h && + sed -i -r 's:.*(#.*SUBPIXEL.*) .*:\1:' \ + include/freetype/config/ftoption.h +} diff --git a/stage3/pkg/git b/stage3/pkg/git index 5ae0711..8776b65 100644 --- a/stage3/pkg/git +++ b/stage3/pkg/git @@ -1,30 +1,6 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} -./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - ${CONFIGURE_OPTS} -make -make install -ldconfig - -decompress_package ${GIT_MANPAGES} /usr/share/man - -exit $? +hvbuild_post() +{ + decompress_package ${GIT_MANPAGES} /usr/share/man +} diff --git a/stage3/pkg/inetutils b/stage3/pkg/inetutils deleted file mode 100644 index 76ce396..0000000 --- a/stage3/pkg/inetutils +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1}-build -../${1}/configure \ - --prefix=/usr \ - --libexecdir=/usr/sbin \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --infodir=/usr/share/info \ - --mandir=/usr/share/man \ - --disable-dependancy-tracking \ - --disable-syslogd \ - --with-pam \ - --with-wrap -make -make install -mv /usr/bin/ping /bin - -# Creating /etc/inetd.conf -touch /etc/inetd.conf - -# Bootscript -install -v -m740 ${SCRDIR}/bootscripts/inetd /etc/rc.d/init.d - -# script-name start stop -bootscript_add_rc3 inetd 30 60 - -exit $? diff --git a/stage3/pkg/iptables b/stage3/pkg/iptables index e6f05fd..38b8ea7 100644 --- a/stage3/pkg/iptables +++ b/stage3/pkg/iptables @@ -1,22 +1,21 @@ -#!/bin/sh -# First argument of this script is the package name +#!/bin/bash -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list +hvconfig_pre() +{ + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --bindir=/sbin \ + --sbindir=/sbin \ + --libdir=/lib \ + --libexecdir=/lib \ + --with-pkgconfigdir=/usr/lib/pkgconfig" +} -# Applying patches (if any) -apply_patches ${1} +hvbuild_post() +{ + # Firewall boot script + install -v -m740 ${SCRDIR}/bootscripts/firewall /etc/rc.d/init.d -cd ${LFS_TMP}/${1} -make PREFIX=/usr -make PREFIX=/usr install - -# Firewall boot script -install -v -m740 ${SCRDIR}/bootscripts/firewall /etc/rc.d/init.d - -# script-name start stop -bootscript_add_rc3 firewall 35 55 - -exit $? + # script-name start stop + bootscript_add_rc3 firewall 35 55 +} diff --git a/stage3/pkg/libmng b/stage3/pkg/libmng index f161e60..a904ef4 100644 --- a/stage3/pkg/libmng +++ b/stage3/pkg/libmng @@ -1,39 +1,23 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} -cp makefiles/makefile.linux Makefile - -case "${HVL_TARGET}" in - "x86_64") - # -fPIC is required for x86_64 - sed -i -e "s!^CFLAGS=!CFLAGS=-fPIC !" Makefile - ;; -esac - -make prefix=/usr install - -# The documentation files are not installed by the installation procedure, -# so they are copied manually. -install -v -m644 doc/man/*.3 /usr/share/man/man3 -install -v -m644 doc/man/*.5 /usr/share/man/man5 -install -v -m755 -d /usr/share/doc/${PACKAGE} -install -v -m644 doc/*.{png,txt} /usr/share/doc/${PACKAGE} - -ldconfig - -exit $? +#!/bin/bash + +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + cp makefiles/makefile.linux Makefile + + case "${HVL_TARGET}" in + "x86_64") + # -fPIC is required for x86_64 + sed -i -e "s!^CFLAGS=!CFLAGS=-fPIC !" Makefile + ;; + esac + + make prefix=/usr install + + # The documentation files are not installed by the installation procedure, + # so they are copied manually. + install -v -m644 doc/man/*.3 /usr/share/man/man3 + install -v -m644 doc/man/*.5 /usr/share/man/man5 + install -v -m755 -d /usr/share/doc/${PACKAGE} + install -v -m644 doc/*.{png,txt} /usr/share/doc/${PACKAGE} +} diff --git a/stage3/pkg/libopenjpeg b/stage3/pkg/libopenjpeg deleted file mode 100644 index 07fce86..0000000 --- a/stage3/pkg/libopenjpeg +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} -make -make install - -exit $? diff --git a/stage3/pkg/lynx b/stage3/pkg/lynx new file mode 100644 index 0000000..3b53d58 --- /dev/null +++ b/stage3/pkg/lynx @@ -0,0 +1,31 @@ +#!/bin/bash + +LYNX_CFG_PATH=/etc/lynx.cfg + +hvconfig_pre() +{ + # --sysconfdir=/etc/lynx \ + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --datadir=/usr/share/doc/lynx \ + --with-zlib \ + --with-bzlib \ + --with-ssl \ + --with-screen=ncursesw \ + --enable-locale-charset" +} + +hvbuild_post() +{ + # The proper way to get the display character set is to examine the current + # locale. However, Lynx does not do this by default. Change this setting: + sed -i 's/#\(LOCALE_CHARSET\):FALSE/\1:TRUE/' ${LYNX_CFG_PATH} + + # The built-in editor in Lynx Breaks Multibyte Characters. Configure Lynx + # to use an external editor (bound to the “Ctrl+X e” key combination by + # default): + sed -i 's/#\(DEFAULT_EDITOR\):/\1:vi/' ${LYNX_CFG_PATH} + + # By default, Lynx doesn't save cookies between sessions. Change this: + sed -i 's/#\(PERSISTENT_COOKIES\):FALSE/\1:TRUE/' ${LYNX_CFG_PATH} +} diff --git a/stage3/pkg/mysql b/stage3/pkg/mysql index 08d9f88..aef7651 100644 --- a/stage3/pkg/mysql +++ b/stage3/pkg/mysql @@ -1,60 +1,55 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -groupadd -f mysql -hv_useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql - -cd ${LFS_TMP}/${1} -./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --libexecdir=/usr/sbin \ - --localstatedir=/srv/mysql \ - --enable-thread-safe-client \ - --enable-assembler \ - --enable-local-infile \ - --with-unix-socket-path=/var/run/mysql/mysql.sock \ - --without-debug \ - --without-readline \ - --with-plugins=innobase,myisam \ - --with-extra-charsets=all \ - --with-ssl -make -make benchdir_root=/tmp/mysql-bench install -rm -rf /tmp/mysql -cd /usr/lib -ln -v -sf mysql/libmysqlclient{,_r}.so* . - -# Copying default configuration file. -install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf -sed -i -e s/^skip-federated/#skip-federated/ /etc/my.cnf - -mysql_install_db --user=mysql -chgrp mysql /srv/mysql{,/test,/mysql} - -install -m750 -o mysql -g mysql -d /var/run/mysql - -# Further configuration requires that the MySQL server be running (see cis-postinstall) - -# Bootscript -install -v -m740 ${SCRDIR}/bootscripts/mysql /etc/rc.d/init.d - -# script-name start stop -bootscript_add_rc3 mysql 45 45 - -# Addition to /etc/ld.so.conf -string_add "/usr/lib/mysql" /etc/ld.so.conf - -ldconfig - -exit $? +#!/bin/bash + +hvconfig_pre() +{ + groupadd -f mysql + hv_useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql + + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --libexecdir=/usr/sbin \ + --localstatedir=/srv/mysql \ + --enable-thread-safe-client \ + --enable-assembler \ + --enable-local-infile \ + --with-unix-socket-path=/var/run/mysql/mysql.sock \ + --without-debug \ + --without-readline \ + --with-plugins=innobase,myisam \ + --with-extra-charsets=all \ + --with-ssl" +} + +hvbuild() +{ + make + make benchdir_root=/tmp/mysql-bench install +} + +hvbuild_post() +{ + rm -rf /tmp/mysql + cd /usr/lib + ln -v -sf mysql/libmysqlclient{,_r}.so* . + + # Copying default configuration file. + install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf + sed -i -e s/^skip-federated/#skip-federated/ /etc/my.cnf + + mysql_install_db --user=mysql + chgrp mysql /srv/mysql{,/test,/mysql} + + install -m750 -o mysql -g mysql -d /var/run/mysql + + # Further configuration requires that the MySQL server be running + # (see cis-postinstall) + + # Bootscript + install -v -m740 ${SCRDIR}/bootscripts/mysql /etc/rc.d/init.d + + # script-name start stop + bootscript_add_rc3 mysql 45 45 + + # Addition to /etc/ld.so.conf + string_add "/usr/lib/mysql" /etc/ld.so.conf +} diff --git a/stage3/pkg/nfs-utils b/stage3/pkg/nfs-utils index 6a5eeda..e1d6321 100644 --- a/stage3/pkg/nfs-utils +++ b/stage3/pkg/nfs-utils @@ -1,27 +1,8 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -# Problem with build directory -cd ${LFS_TMP}/${1} -./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --disable-nfsv4 \ - --disable-gss -make -j ${MAKEJOBS} -make install - -cat > /etc/exports << "EOF" +hvbuild_post() +{ + cat > /etc/exports << "EOF" # NFS file systems export list # # An entry in /etc/exports will typically look like this: @@ -31,7 +12,6 @@ cat > /etc/exports << "EOF" #/srv/www/htdocs 192.168.0.0/24(rw,sync) EOF -install -v -m740 ${SCRDIR}/bootscripts/nfs /etc/rc.d/init.d -bootscript_add_rc3 nfs 15 74 - -exit $? + install -v -m740 ${SCRDIR}/bootscripts/nfs /etc/rc.d/init.d + bootscript_add_rc3 nfs 15 74 +} diff --git a/stage3/pkg/openjade b/stage3/pkg/openjade index da5b36d..c4c2236 100644 --- a/stage3/pkg/openjade +++ b/stage3/pkg/openjade @@ -1,41 +1,32 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name +hvconfig_pre() +{ + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --enable-http \ + --disable-static \ + --enable-default-catalog=/etc/sgml/catalog \ + --enable-default-search-path=/usr/share/sgml \ + --datadir=/usr/share/sgml/${PACKAGE}" +} -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list +hvbuild_post() +{ + ln -sf openjade /usr/bin/jade + ln -sf libogrove.so /usr/lib/libgrove.so + ln -sf libospgrove.so /usr/lib/libspgrove.so + ln -sf libostyle.so /usr/lib/libstyle.so + install -m644 dsssl/catalog /usr/share/sgml/${PACKAGE}/ + install -m644 dsssl/*.{dtd,dsl,sgm} /usr/share/sgml/${PACKAGE} + install-catalog --add /etc/sgml/${PACKAGE}.cat \ + /usr/share/sgml/${PACKAGE}/catalog + install-catalog --add /etc/sgml/sgml-docbook.cat \ + /etc/sgml/${PACKAGE}.cat -# Applying patches (if any) -apply_patches ${1} + var_add_path "SGML_BASE_DIR" /etc/profile "/usr/share/sgml" + var_export "SGML_BASE_DIR" /etc/profile -cd ${LFS_TMP}/${1} -./configure \ - --prefix=/usr \ - --enable-http \ - --disable-static \ - --enable-default-catalog=/etc/sgml/catalog \ - --enable-default-search-path=/usr/share/sgml \ - --datadir=/usr/share/sgml/${1} -make -make install -ln -sf openjade /usr/bin/jade -ln -sf libogrove.so /usr/lib/libgrove.so -ln -sf libospgrove.so /usr/lib/libspgrove.so -ln -sf libostyle.so /usr/lib/libstyle.so -install -m644 dsssl/catalog /usr/share/sgml/${1}/ -install -m644 dsssl/*.{dtd,dsl,sgm} /usr/share/sgml/${1} -install-catalog --add /etc/sgml/${1}.cat \ - /usr/share/sgml/${1}/catalog -install-catalog --add /etc/sgml/sgml-docbook.cat \ - /etc/sgml/${1}.cat - -var_add_path "SGML_BASE_DIR" /etc/profile "/usr/share/sgml" -var_export "SGML_BASE_DIR" /etc/profile - -var_add_path "SGML_CATALOGS_DIR" /etc/profile "/etc/sgml" -var_export "SGML_CATALOGS_DIR" /etc/profile - -exit $? + var_add_path "SGML_CATALOGS_DIR" /etc/profile "/etc/sgml" + var_export "SGML_CATALOGS_DIR" /etc/profile +} diff --git a/stage3/pkg/opensp b/stage3/pkg/opensp deleted file mode 100644 index 577a8f7..0000000 --- a/stage3/pkg/opensp +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh - -set -o errexit - -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -CAT1="/etc/sgml/${PACKAGE}.cat" -CAT2="/usr/share/sgml/${PACKAGE}/catalog" - -CAT3="/etc/sgml/sgml-docbook.cat" -CAT4="/etc/sgml/${PACKAGE}.cat" - -# Remove the old catalog items prior to upgrading... -# First test for presence of 'install-catalog' program -INSTALL_CATALOG=/usr/bin/install-catalog -if [ -x ${INSTALL_CATALOG} ]; then - if [ -f ${CAT1} ]; then - ${INSTALL_CATALOG} --remove ${CAT1} ${CAT2} - fi - if [ -f ${CAT4} ]; then - ${INSTALL_CATALOG} --remove ${CAT3} ${CAT4} - fi -fi - -cd ${LFS_TMP}/${PACKAGE} -sed -i 's:32,:253,:' lib/Syntax.cxx -sed -i 's:LITLEN 240 :LITLEN 8092:' \ - unicode/{gensyntax.pl,unicode.syn} -./configure \ - --prefix=/usr \ - --disable-static \ - --disable-doc-build \ - --enable-default-catalog=/etc/sgml/catalog \ - --enable-http \ - --enable-default-search-path=/usr/share/sgml -make pkgdatadir=/usr/share/sgml/${PACKAGE} -make pkgdatadir=/usr/share/sgml/${PACKAGE} install -ln -v -sf onsgmls /usr/bin/nsgmls -ln -v -sf osgmlnorm /usr/bin/sgmlnorm -ln -v -sf ospam /usr/bin/spam -ln -v -sf ospcat /usr/bin/spcat -ln -v -sf ospent /usr/bin/spent -ln -v -sf osx /usr/bin/sx -ln -v -sf osx /usr/bin/sgml2xml -ln -v -sf libosp.so /usr/lib/libsp.so - -exit $? diff --git a/stage3/pkg/openssh b/stage3/pkg/openssh index 2e36ee0..726639d 100644 --- a/stage3/pkg/openssh +++ b/stage3/pkg/openssh @@ -1,49 +1,34 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -install -v -m700 -d /var/lib/sshd -chown -v root:sys /var/lib/sshd - -groupadd -f sshd -hv_useradd -c sshd-privsep -d /var/lib/sshd -g sshd -s /bin/false sshd - -cd ${LFS_TMP}/${1}-build -../${1}/configure \ - --prefix=/usr \ - --sysconfdir=/etc/ssh \ - --datadir=/usr/share/sshd \ - --with-pam \ - --libexecdir=/usr/lib/openssh \ - --with-md5-passwords \ - --with-privsep-path=/var/lib/sshd -make -j ${MAKEJOBS} -make -j ${MAKEJOBS} install - -cd ${LFS_TMP}/${1} -install -v -m755 -d /usr/share/doc/${1} -install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \ - /usr/share/doc/${1} - -# Disabling root logins -sed -i -e "s!^#PermitRootLogin.*!PermitRootLogin no!g" /etc/ssh/sshd_config - -# Enabling X11 forwarding -sed -i -e "s!^#X11Forwarding.*!X11Forwarding yes!g" /etc/ssh/sshd_config - -# Setting MaxAuthTries to 2 -sed -i -e "s!^[#]*MaxAuthTries.*!MaxAuthTries 3!g" /etc/ssh/sshd_config - -install -v -m740 ${SCRDIR}/bootscripts/sshd /etc/rc.d/init.d -bootscript_add_rc3 sshd 25 70 - -exit $? +#!/bin/bash + +hvconfig_pre() +{ + install -v -m700 -d /var/lib/sshd + chown -v root:sys /var/lib/sshd + + groupadd -f sshd + hv_useradd -c sshd-privsep -d /var/lib/sshd -g sshd -s /bin/false sshd + + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --sysconfdir=/etc/ssh \ + --datadir=/usr/share/sshd \ + --with-pam \ + --libexecdir=/usr/lib/openssh \ + --with-md5-passwords \ + --with-privsep-path=/var/lib/sshd" +} + +hvbuild_post() +{ + # Disabling root logins + sed -i -e "s!^#PermitRootLogin.*!PermitRootLogin no!g" /etc/ssh/sshd_config + + # Enabling X11 forwarding + sed -i -e "s!^#X11Forwarding.*!X11Forwarding yes!g" /etc/ssh/sshd_config + + # Setting MaxAuthTries to 2 + sed -i -e "s!^[#]*MaxAuthTries.*!MaxAuthTries 3!g" /etc/ssh/sshd_config + + install -v -m740 ${SCRDIR}/bootscripts/sshd /etc/rc.d/init.d + bootscript_add_rc3 sshd 25 70 +} diff --git a/stage3/pkg/portmap b/stage3/pkg/portmap index 6c45582..e09ed7b 100644 --- a/stage3/pkg/portmap +++ b/stage3/pkg/portmap @@ -1,21 +1,7 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} -make -j ${MAKEJOBS} -make install - -install -v -m740 ${SCRDIR}/bootscripts/portmap /etc/rc.d/init.d -bootscript_add_rc3 portmap 10 75 - -exit $? +hvbuild_post() +{ + install -v -m740 ${SCRDIR}/bootscripts/portmap /etc/rc.d/init.d + bootscript_add_rc3 portmap 10 75 +} diff --git a/stage3/pkg/sgml-common b/stage3/pkg/sgml-common index 91e66a5..137d072 100644 --- a/stage3/pkg/sgml-common +++ b/stage3/pkg/sgml-common @@ -1,49 +1,31 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -CAT1="/etc/sgml/sgml-ent.cat" -CAT2="/usr/share/sgml/sgml-iso-entities-8879.1986/catalog" - -CAT3="/etc/sgml/sgml-docbook.cat" -CAT4="/etc/sgml/sgml-ent.cat" - -# Remove the old catalog items prior to upgrading... -# First test for presence of 'install-catalog' program -INSTALL_CATALOG=/usr/bin/install-catalog -if [ -x ${INSTALL_CATALOG} ]; then - if [ -f ${CAT2} ]; then - ${INSTALL_CATALOG} --remove ${CAT1} ${CAT2} +#!/bin/bash + +hvconfig_pre() +{ + CAT1="/etc/sgml/sgml-ent.cat" + CAT2="/usr/share/sgml/sgml-iso-entities-8879.1986/catalog" + + CAT3="/etc/sgml/sgml-docbook.cat" + CAT4="/etc/sgml/sgml-ent.cat" + + # Remove the old catalog items prior to upgrading... + # First test for presence of 'install-catalog' program + INSTALL_CATALOG=/usr/bin/install-catalog + if [ -x ${INSTALL_CATALOG} ]; then + if [ -f ${CAT2} ]; then + ${INSTALL_CATALOG} --remove ${CAT1} ${CAT2} + fi + if [ -f ${CAT4} ]; then + ${INSTALL_CATALOG} --remove ${CAT3} ${CAT4} + fi fi - if [ -f ${CAT4} ]; then - ${INSTALL_CATALOG} --remove ${CAT3} ${CAT4} - fi -fi - -cd ${LFS_TMP}/${PACKAGE} -autoreconf -f -i -./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - ${CONFIGURE_OPTS} -make -make install -${INSTALL_CATALOG} --add ${CAT1} ${CAT2} -${INSTALL_CATALOG} --add ${CAT3} ${CAT4} + cd ${LFS_TMP}/${PACKAGE} + autoreconf -f -i +} -exit $? +hvbuild_post() +{ + ${INSTALL_CATALOG} --add ${CAT1} ${CAT2} + ${INSTALL_CATALOG} --add ${CAT3} ${CAT4} +} diff --git a/stage3/pkg/sgml-dtd3 b/stage3/pkg/sgml-dtd3 index 7a5c2a6..a18c11d 100644 --- a/stage3/pkg/sgml-dtd3 +++ b/stage3/pkg/sgml-dtd3 @@ -1,36 +1,28 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} -sed -i -e '/ISO 8879/d' \ - -e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' \ - docbook.cat -install -d /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER} -chown -R root:root . -install docbook.cat /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog -cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER} -install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD3_VER}.cat \ - /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog -install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD3_VER}.cat \ - /etc/sgml/sgml-docbook.cat - -# Using only the most current 3.x version of sgml-dtd requires the following: -cat >> /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog << "EOF" +#!/bin/bash + +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + sed -i -e '/ISO 8879/d' \ + -e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' \ + docbook.cat + install -d /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER} + chown -R root:root . + install docbook.cat \ + /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog + cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER} + install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD3_VER}.cat \ + /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog + install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD3_VER}.cat \ + /etc/sgml/sgml-docbook.cat + + # Using only the most current 3.x version of sgml-dtd requires the + # following: + cat >> /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog << "EOF" -- Begin Single Major Version catalog changes -- PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd" -- End Single Major Version catalog changes -- EOF - -exit $? +} diff --git a/stage3/pkg/sgml-dtd4 b/stage3/pkg/sgml-dtd4 index 192af58..5d41192 100644 --- a/stage3/pkg/sgml-dtd4 +++ b/stage3/pkg/sgml-dtd4 @@ -1,30 +1,23 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} -sed -i -e '/ISO 8879/d' \ - -e '/gml/d' docbook.cat -install -d /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER} -chown -R root:root . -install docbook.cat /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog -cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER} -install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD4_VER}.cat \ - /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog -install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD4_VER}.cat \ - /etc/sgml/sgml-docbook.cat - -# Using only the most current 4.x version of sgml-dtd requires the following: -cat >> /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog << "EOF" +#!/bin/bash + +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + sed -i -e '/ISO 8879/d' \ + -e '/gml/d' docbook.cat + install -d /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER} + chown -R root:root . + install docbook.cat \ + /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog + cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER} + install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD4_VER}.cat \ + /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog + install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD4_VER}.cat \ + /etc/sgml/sgml-docbook.cat + + # Using only the most current 4.x version of sgml-dtd requires the + # following: + cat >> /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog << "EOF" -- Begin Single Major Version catalog changes -- PUBLIC "-//OASIS//DTD DocBook V4.3//EN" "docbook.dtd" @@ -34,5 +27,4 @@ PUBLIC "-//OASIS//DTD DocBook V4.0//EN" "docbook.dtd" -- End Single Major Version catalog changes -- EOF - -exit $? +} diff --git a/stage3/pkg/sgml-spm b/stage3/pkg/sgml-spm deleted file mode 100644 index 029344b..0000000 --- a/stage3/pkg/sgml-spm +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} -sed -i -e "s@/usr/local/bin@/usr/bin@" \ - -e "s@/usr/local/lib/perl5@/usr/lib/perl5/site_perl/$(get_pkg_ver ${PERL})@" \ - -e "s@/usr/local/lib/www/docs@/usr/share/doc/perl5@" \ - Makefile -make install -ldconfig - -exit $? diff --git a/stage3/pkg/subversion b/stage3/pkg/subversion index 8a6e0aa..822867f 100644 --- a/stage3/pkg/subversion +++ b/stage3/pkg/subversion @@ -1,35 +1,16 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1}-build -../${1}/configure \ - --prefix=/usr \ - --with-apxs=/usr/sbin/apxs \ - --without-berkeley-db -make -make install - -cd ${LFS_TMP}/${1} -rm doc/doxygen.conf -find doc -type d -exec chmod 755 {} \; -find doc -type f -exec chmod 644 {} \; -install -v -m755 -d /usr/share/doc/${1} -cp -v -R doc/* /usr/share/doc/${1} - -# Creating repositories directory -mkdir -p /srv/svn -chown ${APACHE_USER}:${APACHE_USER} /srv/svn - -ldconfig - -exit $? +#!/bin/bash + +SVN_USER=svn + +hvconfig_pre() +{ + groupadd -f ${SVN_USER} + hv_useradd -c SvnServer -d /dev/null -g ${SVN_USER} -s /bin/false ${SVN_USER} +} + +hvbuild_post() +{ + # Creating repositories directory + mkdir -p /srv/svn + chown ${SVN_USER}:${SVN_USER} /srv/svn +} diff --git a/stage3/pkg/sudo b/stage3/pkg/sudo index dc2a573..3005332 100644 --- a/stage3/pkg/sudo +++ b/stage3/pkg/sudo @@ -1,24 +1,8 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1}-build -../${1}/configure \ - --prefix=/usr \ - --sysconfdir=/etc -make -j ${MAKEJOBS} -make install - -cat > /etc/sudoers << EOF +hvbuild_post() +{ + cat > /etc/sudoers << EOF # User alias specification User_Alias ADMIN = _REGUSER_ @@ -26,7 +10,6 @@ User_Alias ADMIN = _REGUSER_ ADMIN ALL = NOPASSWD: ALL EOF -sed -i -e "s!_REGUSER_!${REGUSER}!g" /etc/sudoers -chmod 600 /etc/sudoers - -exit $? + sed -i -e "s!_REGUSER_!${REGUSER}!g" /etc/sudoers + chmod 600 /etc/sudoers +} diff --git a/stage3/pkg/tcl b/stage3/pkg/tcl index 5be0be5..83243b1 100644 --- a/stage3/pkg/tcl +++ b/stage3/pkg/tcl @@ -1,41 +1,31 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} -cd unix -./configure --prefix=/usr \ - --enable-threads \ - --mandir=/usr/share/man -make - -# removes the references to the build directory and replaces them with saner -# system-wide locations: -sed -i \ - -e "s@^\(TCL_SRC_DIR='\).*@\1/usr/include'@" \ - -e "/TCL_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \ - -e "/SEARCH/s/=.*/=''/" \ - tclConfig.sh - -make install -make install-private-headers - -PKG_VER_BASE=$(echo ${PACKAGE} | sed "s!^tcl\([0-9]*\.[0-9]*\).*!\1!g") - -ln -svfT tclsh${PKG_VER_BASE} /usr/bin/tclsh - -exit $? +#!/bin/bash + +hvconfig() +{ + cd ${LFS_TMP}/${PACKAGE}/unix + ./configure \ + --prefix=/usr \ + --enable-threads \ + --mandir=/usr/share/man +} + +hvbuild() +{ + make + + # Removes references to the build directory and replaces them with saner + # system-wide locations: + sed -i \ + -e "s@^\(TCL_SRC_DIR='\).*@\1/usr/include'@" \ + -e "/TCL_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \ + -e "/SEARCH/s/=.*/=''/" \ + tclConfig.sh + + make install + make install-private-headers + + # Special case for TCL + PKG_VER_BASE=$(echo ${PACKAGE} | sed "s!^tcl\([0-9]*\.[0-9]*\).*!\1!g") + + ln -svfT tclsh${PKG_VER_BASE} /usr/bin/tclsh +} diff --git a/stage3/pkg/tcp-wrappers b/stage3/pkg/tcp-wrappers deleted file mode 100644 index 5a0adeb..0000000 --- a/stage3/pkg/tcp-wrappers +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} -sed -i -e "s,^extern char \*malloc();,/* & */," scaffold.c -make -j ${MAKEJOBS} REAL_DAEMON_DIR=/usr/sbin STYLE=-DPROCESS_OPTIONS linux -make install - -# Creating /etc/hosts.allow -cat > /etc/hosts.allow << "EOF" -ALL : LOCAL 192.168.0.0/255.255.255.0 : RFC931 -EOF - -# Creating /etc/hosts.deny -cat > /etc/hosts.deny << "EOF" -ALL: ALL: RFC931 -EOF - -exit $? diff --git a/stage3/pkg/tcp_wrappers b/stage3/pkg/tcp_wrappers new file mode 100644 index 0000000..70ff65f --- /dev/null +++ b/stage3/pkg/tcp_wrappers @@ -0,0 +1,26 @@ +#!/bin/bash + +hvconfig_pre() +{ + cd ${LFS_TMP}/${PACKAGE} + sed -i -e "s,^extern char \*malloc();,/* & */," scaffold.c +} + +hvbuild() +{ + make -j ${MAKEJOBS} REAL_DAEMON_DIR=/usr/sbin STYLE=-DPROCESS_OPTIONS linux + make install +} + +hvbuild_post() +{ + # Creating /etc/hosts.allow + cat > /etc/hosts.allow << "EOF" +ALL : LOCAL 192.168.0.0/255.255.255.0 : RFC931 +EOF + + # Creating /etc/hosts.deny + cat > /etc/hosts.deny << "EOF" +ALL: ALL: RFC931 +EOF +} diff --git a/stage3/pkg/unrar b/stage3/pkg/unrar index 6c007e3..51221be 100644 --- a/stage3/pkg/unrar +++ b/stage3/pkg/unrar @@ -1,23 +1,8 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} -make -f makefile.unix -install -v -m755 unrar /usr/bin - -exit $? +#!/bin/bash + +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + make -f makefile.unix + install -v -m755 unrar /usr/bin +} diff --git a/stage3/pkg/unzip b/stage3/pkg/unzip index 24295b2..d287e08 100644 --- a/stage3/pkg/unzip +++ b/stage3/pkg/unzip @@ -1,31 +1,16 @@ #!/bin/sh -set -o errexit -# First argument of this script is the package name +hvbuild() +{ + case "${HVL_TARGET}" in + "x86_64") + UNZIP_TARGET=linux_noasm + ;; + *) + UNZIP_TARGET=linux + esac -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -case "${HVL_TARGET}" in - "x86_64") - UNZIP_TARGET=linux_noasm - ;; - *) - UNZIP_TARGET=linux -esac - -cd ${LFS_TMP}/${PACKAGE} -make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 ${UNZIP_TARGET} -make prefix=/usr install -ldconfig - -exit $? + cd ${LFS_TMP}/${PACKAGE} + make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 ${UNZIP_TARGET} + make prefix=/usr install +} diff --git a/stage3/pkg/xinetd b/stage3/pkg/xinetd new file mode 100644 index 0000000..6267066 --- /dev/null +++ b/stage3/pkg/xinetd @@ -0,0 +1,37 @@ +#!/bin/bash + +hvconfig_pre() +{ + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --with-loadavg" +} + +hvbuild_post() +{ + cat > /etc/xinetd.conf << "EOF" +# Configuration file for xinetd +# + +defaults +{ + instances = 60 + log_type = SYSLOG daemon + log_on_success = HOST PID USERID + log_on_failure = HOST USERID + cps = 25 30 +} + +# All service files are stored in the /etc/xinetd.d directory +# +includedir /etc/xinetd.d +EOF + + install -v -d -m755 /etc/xinetd.d + + # Bootscript + install -v -m740 ${SCRDIR}/bootscripts/xinetd /etc/rc.d/init.d + + # script-name start stop + bootscript_add_rc3 xinetd 30 60 +} diff --git a/stage3/pkg/xmltoman b/stage3/pkg/xmltoman index 2127de5..be7ba06 100644 --- a/stage3/pkg/xmltoman +++ b/stage3/pkg/xmltoman @@ -1,28 +1,8 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} -make PREFIX=/usr -make install PREFIX=/usr - -exit $? +#!/bin/bash + +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + make PREFIX=/usr + make install PREFIX=/usr +} diff --git a/stage3/pkg/zip b/stage3/pkg/zip index f9fe719..8cc7696 100644 --- a/stage3/pkg/zip +++ b/stage3/pkg/zip @@ -1,21 +1,14 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} -sed -i -e 's@$(INSTALL) man/zip.1@$(INSTALL_PROGRAM) man/zip.1@' \ - unix/Makefile -make prefix=/usr -f unix/Makefile generic_gcc -make prefix=/usr -f unix/Makefile install -ldconfig - -exit $? +#!/bin/bash + +hvconfig_pre() +{ + cd ${LFS_TMP}/${PACKAGE} + sed -i -e 's@$(INSTALL) man/zip.1@$(INSTALL_PROGRAM) man/zip.1@' \ + unix/Makefile +} + +hvbuild() +{ + make prefix=/usr -f unix/Makefile generic_gcc + make prefix=/usr -f unix/Makefile install +} diff --git a/stage5/pkg/alsa-utils b/stage5/pkg/alsa-utils index 558b0c3..9ec4264 100644 --- a/stage5/pkg/alsa-utils +++ b/stage5/pkg/alsa-utils @@ -24,6 +24,6 @@ touch /etc/asound.state install -v -m740 ${SCRDIR}/bootscripts/alsa /etc/rc.d/init.d # script-name start stop -bootscript_add_rcS alsa 95 85 +bootscript_add_rcsysinit alsa 95 85 exit $?