mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
Improve Lout package: improved directory layout, and documentation is now installed.
svn path=/nixpkgs/trunk/; revision=10708
This commit is contained in:
parent
4122366233
commit
4fd7a30a36
@ -1,18 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Prepare a makefile specifying the appropriate output directories.
|
||||
#
|
||||
# Written by Ludovic Courtès <ludo@gnu.org>.
|
||||
|
||||
source "$stdenv/setup" || exit 1
|
||||
|
||||
nixMakefile="nix-makefile"
|
||||
|
||||
# Build and install documentation, PS and PDF.
|
||||
installDoc ()
|
||||
{
|
||||
echo "building and installing documentation..."
|
||||
for doc in design expert slides user
|
||||
do
|
||||
echo "building \`$doc' document..."
|
||||
if [ ! -f "doc/$doc/outfile.ps" ]
|
||||
then
|
||||
( PATH="$PWD:$PATH" ; \
|
||||
cd "doc/$doc" && lout -r4 -o outfile.ps all ) \
|
||||
|| return 1
|
||||
fi
|
||||
cp "doc/$doc/outfile.ps" "$out/doc/lout/$doc.ps" && \
|
||||
ps2pdf "doc/$doc/outfile.ps" "$out/doc/lout/$doc.pdf"
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
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|^LOUTLIBDIR[[:blank:]]*=.*$|LOUTLIBDIR = \$(PREFIX)/lib/lout|g ; \
|
||||
s|^LOUTDOCDIR[[:blank:]]*=.*$|LOUTDOCDIR = \$(PREFIX)/doc/lout|g ; \
|
||||
s|^MANDIR[[:blank:]]*=.*$|MANDIR = \$(PREFIX)/man|g" \
|
||||
> "$nixMakefile" && \
|
||||
mkdir -p "$out/bin" && \
|
||||
make -f "$nixMakefile" install
|
||||
mkdir -p "$out/bin" && mkdir -p "$out/lib" \
|
||||
mkdir -p "$out/man" && mkdir -p "$out/doc/lout" && \
|
||||
make -f "$nixMakefile" install installman && \
|
||||
installDoc
|
||||
|
@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl}:
|
||||
{stdenv, fetchurl, ghostscript}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "lout-3.36";
|
||||
@ -7,6 +7,7 @@ stdenv.mkDerivation {
|
||||
sha256 = "b689cbe12074be8817c90070b162593fc9cc51f2f8868701833ff599b24fd4ad";
|
||||
};
|
||||
|
||||
buildInputs = [ ghostscript ];
|
||||
builder = ./builder.sh;
|
||||
|
||||
meta = {
|
||||
|
@ -656,7 +656,7 @@ rec {
|
||||
};
|
||||
|
||||
lout = import ../tools/typesetting/lout {
|
||||
inherit fetchurl stdenv;
|
||||
inherit fetchurl stdenv ghostscript;
|
||||
};
|
||||
|
||||
lzma = import ../tools/compression/lzma {
|
||||
|
Loading…
Reference in New Issue
Block a user