Files
BMLFS/build-scripts/sgml-common.build
2020-09-12 17:02:04 -05:00

70 lines
2.3 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
patch -Np1 -i ../patches/gml-common-lfs/gml-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 &&
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/ &&
sudo -S mkdir -pv usr/share &&
sudo -S mv -v usr/man usr/share
read -p "Enter to build and install package" &&
sudo makepkg -l y -c n $PKGS/unzip-6.0-$(uname -m)-mlfs.txz &&
sudo rm -rf $BUILD/*