Files
BMLFS/build-scripts/sgml-common.build

90 lines
2.9 KiB
Bash

#! /bin/bash
# SGML Common 0.6.3
# Source: https://sourceware.org/ftp/docbook-tools/new-trials/SOURCES/sgml-common-0.6.3.tgz
# http://www.linuxfromscratch.org/patches/blfs/svn/sgml-common-0.6.3-manpage-1.patch
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: NONE
patch -Np1 -i ../patches/sgml-common-lfs/sgml-common-0.6.3-manpage-1.patch &&
autoreconf -f -i -v &&
./configure --prefix=/usr --sysconfdir=/etc $BUILDTRUPLE &&
read -p "Compile? " && make -j2 &&
read -p "Press Enter to install" &&
# if not using a package manager:
# make docdir=/usr/share/doc 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
# if using pkgtools from Slackware, then:
sudo -S make DESTDIR=${BUILD} docdir=/usr/share/doc install &&
sudo -S mkdir -pv /BMAN/install
sudo -S mkdir -pv /BMAN/usr/share
sudo -S mv $BUILD/usr/share/doc /BMAN/usr/share/
sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/
read -p "Press Enter to create pakage description." &&
cd $BUILD && sudo mkdir -v install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in. You must make
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
sgml-common: sgml-common (SGML Common)
sgml-common:
sgml-common: The SGML Common package contains install-catalog. This is useful
sgml-common: for creating and maintaining centralized SGML catalogs
sgml-common:
sgml-common: Homepage: https://sourceware.org/ftp/docbook-tools/
sgml-common:
sgml-common:
sgml-common:
sgml-common:
sgml-common:
EOF
cat > /tmp/doinst.sh << "EOF"
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
EOF
sudo -S mv /tmp/doinst.sh install/ &&
sudo -S mv /tmp/slack-desc install/ &&
read -p "Enter to build and install package" &&
sudo makepkg -l y -c n $PKGS/sgml-common-0.6.3-$(uname -m)-mlfs.txz &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
sgml-common-doc: Manuals for sgml-common (SGML Common)
sgml-common-doc:
sgml-common-doc: The SGML Common package contains install-catalog. This is useful
sgml-common-doc: for creating and maintaining centralized SGML catalogs
sgml-common-doc:
sgml-common-doc: Homepage: https://sourceware.org/ftp/docbook-tools/
sgml-common-doc:
EOF
sudo -S mv /tmp/slack-desc install/
sudo makepkg -l y -c n $PKGS/sgml-common-doc-0.6.3-noarch-mlfs.txz
sudo rm -rf $BUILD/*
sudo rm -rf /BMAN/*