local ENTDIR=$INSTALL_ROOT/usr/share/sgml/entities/iso8879     &&

install --directory     $ENTDIR                                &&

install -m 644  ISO*    $ENTDIR                                &&
install -m 644  *.gml   $ENTDIR                                &&

# we won't provide entities catalog, instead we make symlinks in docbook-dtd's
# directories and docbook catalogs provide mappings for us
mkdir -p $INSTALL_ROOT/usr/share/sgml/definitions/docbook/dtd  &&
cd $INSTALL_ROOT/usr/share/sgml/definitions/docbook/dtd        &&

for dir in *; do
    pushd $dir                                                 &&
    for entity in ../../../../entities/iso8879/*.gml; do
        ln -s $entity
    done                                                       &&
    popd
done
