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
|
#!/bin/sh
|
||||||
|
|
||||||
# Prepare a makefile specifying the appropriate output directories.
|
# Prepare a makefile specifying the appropriate output directories.
|
||||||
|
#
|
||||||
|
# Written by Ludovic Courtès <ludo@gnu.org>.
|
||||||
|
|
||||||
source "$stdenv/setup" || exit 1
|
source "$stdenv/setup" || exit 1
|
||||||
|
|
||||||
nixMakefile="nix-makefile"
|
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 && \
|
unpackPhase && \
|
||||||
cd lout-*.* && \
|
cd lout-*.* && \
|
||||||
cat makefile | \
|
cat makefile | \
|
||||||
sed -e "s|^PREFIX[[:blank:]]*=.*\$|PREFIX = $out|g ; \
|
sed -e "s|^PREFIX[[:blank:]]*=.*\$|PREFIX = $out|g ; \
|
||||||
s|^LOUTLIBDIR[[:blank:]]*=.*$|LOUTLIBDIR = \$(PREFIX)/include|g ; \
|
s|^LOUTLIBDIR[[:blank:]]*=.*$|LOUTLIBDIR = \$(PREFIX)/lib/lout|g ; \
|
||||||
s|^LOUTDOCDIR[[:blank:]]*=.*$|LOUTDOCDIR = \$(PREFIX)/doc|g ; \
|
s|^LOUTDOCDIR[[:blank:]]*=.*$|LOUTDOCDIR = \$(PREFIX)/doc/lout|g ; \
|
||||||
s|^MANDIR[[:blank:]]*=.*$|MANDIR = \$(PREFIX)/man|g" \
|
s|^MANDIR[[:blank:]]*=.*$|MANDIR = \$(PREFIX)/man|g" \
|
||||||
> "$nixMakefile" && \
|
> "$nixMakefile" && \
|
||||||
mkdir -p "$out/bin" && \
|
mkdir -p "$out/bin" && mkdir -p "$out/lib" \
|
||||||
make -f "$nixMakefile" install
|
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 {
|
stdenv.mkDerivation {
|
||||||
name = "lout-3.36";
|
name = "lout-3.36";
|
||||||
|
@ -7,6 +7,7 @@ stdenv.mkDerivation {
|
||||||
sha256 = "b689cbe12074be8817c90070b162593fc9cc51f2f8868701833ff599b24fd4ad";
|
sha256 = "b689cbe12074be8817c90070b162593fc9cc51f2f8868701833ff599b24fd4ad";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildInputs = [ ghostscript ];
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -656,7 +656,7 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
lout = import ../tools/typesetting/lout {
|
lout = import ../tools/typesetting/lout {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv ghostscript;
|
||||||
};
|
};
|
||||||
|
|
||||||
lzma = import ../tools/compression/lzma {
|
lzma = import ../tools/compression/lzma {
|
||||||
|
|
Loading…
Reference in New Issue