X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fcis-sgml-common;h=91e66a5535c984228b28344513694d872821c046;hb=2f337c932e5c659d31b4860d4414dde540cb74bb;hp=e0c5695a092b63a6b8381edbff07e5e229900400;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage3/cis-sgml-common b/stage3/cis-sgml-common index e0c5695..91e66a5 100755 --- a/stage3/cis-sgml-common +++ b/stage3/cis-sgml-common @@ -1,41 +1,49 @@ #!/bin/sh -# First argument of this script is the package name +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 -v 1> /dev/null 2>&1 -if [ $? -eq 0 ]; then - # The following commands may fail if this is the first time - # that this package is installed. So we do not check the return value. - install-catalog --remove /etc/sgml/sgml-ent.cat \ - /usr/share/sgml/sgml-iso-entities-8879.1986/catalog - install-catalog --remove /etc/sgml/sgml-docbook.cat \ - /etc/sgml/sgml-ent.cat +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 -# Applying patches (if any) -apply_patches ${1} && - -cd ${LFS_TMP}/${1} && -# Autotools used with this package are very old, so we regenerate the autotools files. -aclocal && -automake -acf && -autoconf && +cd ${LFS_TMP}/${PACKAGE} +autoreconf -f -i ./configure \ --prefix=/usr \ --sysconfdir=/etc \ - --mandir=/usr/share/man && -make && -make install && -install-catalog --add /etc/sgml/sgml-ent.cat \ - /usr/share/sgml/sgml-iso-entities-8879.1986/catalog && -install-catalog --add /etc/sgml/sgml-docbook.cat \ - /etc/sgml/sgml-ent.cat - -# Return last error + ${CONFIGURE_OPTS} +make +make install + +${INSTALL_CATALOG} --add ${CAT1} ${CAT2} +${INSTALL_CATALOG} --add ${CAT3} ${CAT4} + exit $?