nixpkgs/pkgs/tools/typesetting/lout/builder.sh
Ludovic Courtès c3096df3d0 Add Lout, a document layout system based on a purely functional language.
svn path=/nixpkgs/trunk/; revision=10634
2008-02-12 09:58:57 +00:00

19 lines
577 B
Bash
Executable file

#!/bin/sh
# Prepare a makefile specifying the appropriate output directories.
source "$stdenv/setup" || exit 1
nixMakefile="nix-makefile"
unpackPhase && \
cd lout-*.* && \
cat makefile | \
sed -e "s|^PREFIX[[:blank:]]*=.*\$|PREFIX = $out|g ; \
s|^LOUTLIBDIR[[:blank:]]*=.*$|LOUTLIBDIR = \$(PREFIX)/include|g ; \
s|^LOUTDOCDIR[[:blank:]]*=.*$|LOUTDOCDIR = \$(PREFIX)/doc|g ; \
s|^MANDIR[[:blank:]]*=.*$|MANDIR = \$(PREFIX)/man|g" \
> "$nixMakefile" && \
mkdir -p "$out/bin" && \
make -f "$nixMakefile" install