sortix-mirror/ports/perl/perl.post-install
Jonas 'Sortie' Termansen 9588b0d3db Add ports to the Sortix repository.
This change imports the ports collection from the former porttix and srctix
repositories and converts them to port(5) files with metadata pointing to
the upstream release tarballs with patches checked into this repository.
Ports are now developed and versioned along with the operating system and
are automatically built per the PACKAGES environment variable. The patches
are licensed under the same license as the relevant ports.

Tix has gained support for the new port(5) format. tix-port(8) is the new
high level ports build even point that handles downloading pstream releases
into the new mirror cache directory, applying the patches, building the port
with the lower-level tix-build(8), and finally installing the binary
package. The new tix-vars(8) program parses port(5) files and the new
tix-rmdiff(8) program produces input for tix-rmpatch(8).

The old doc/ directory is discontinued in favor of manual pages documenting
the new ports system.

The obsolete porttix-create(8) and srctix-create(8) programs are removed.
2022-06-13 22:29:53 +02:00

25 lines
1.2 KiB
Bash
Executable file

#!/bin/sh
# The default perl installation is quite large (62 MB) but a lot of it isn't
# actually needed and there's a lot of value in keeping the Sortix build lean.
# This script isn't safe to run on an actual installation so make sure it's in
# the temporary destination directory.
if [ -n "$TIX_INSTALL_DIR" ]; then
# Retain only the section 1 manuals for the actual programs. There are also
# other useful manuals in that section, but there's a whole lot of stuff that
# don't need to be installed and take up space (11 MB).
for manpage in "$TIX_INSTALL_DIR$PREFIX/share/man/man1"/*; do
program=$(basename -- "$manpage" | sed -E 's/\.1$//')
if [ ! -e "$TIX_INSTALL_DIR$EXEC_PREFIX/bin/$program" ]; then
rm -f -- "$manpage"
fi
done
# The section 3 manuals are a whole lot and don't need to be installed and
# take up a bunch space (6 MB).
rm -rf -- "$TIX_INSTALL_DIR$PREFIX/share/man/man3"
# The pod documentation takes up space (9 MB).
PERLDIR="$TIX_INSTALL_DIR$PREFIX/lib/perl5/5."*
find -- "$PERLDIR" -name '*.pod' -delete
# The per-architecture statically linked modules aren't needed (16MB).
rm -rf -- "$PERLDIR/$HOST"/{CORE,auto}
fi