2006-08-23 17:09:03 +01:00
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
preBuild() {
|
|
|
|
cd src
|
|
|
|
}
|
|
|
|
|
|
|
|
preInstall() {
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2006-08-23 17:09:03 +01:00
|
|
|
}
|
|
|
|
|
2008-03-26 23:42:29 +00:00
|
|
|
postInstall() {
|
|
|
|
# Install the "prefabs".
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/ploticus/prefabs && \
|
2008-03-26 23:42:29 +00:00
|
|
|
cd .. && \
|
|
|
|
cp -rv prefabs/* $out/share/ploticus/prefabs
|
|
|
|
|
|
|
|
# Create a wrapper that knows where to find them. Debian's package
|
|
|
|
# does something similar by patching directly the C file that looks
|
|
|
|
# for `$PLOTICUS_PREFABS'.
|
|
|
|
cat > $out/bin/ploticus <<EOF
|
|
|
|
#! $SHELL -e
|
|
|
|
PLOTICUS_PREFABS="$out/share/ploticus/prefabs"
|
|
|
|
export PLOTICUS_PREFABS
|
|
|
|
exec "$out/bin/pl" \$@
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/ploticus
|
|
|
|
|
|
|
|
# Install the man pages.
|
|
|
|
cp -rv man $out
|
|
|
|
ln -s "$out/man/man1/pl.1" "$out/man/man1/ploticus.1"
|
|
|
|
}
|
|
|
|
|
2006-08-23 17:09:03 +01:00
|
|
|
genericBuild
|