kill INSTALL/DEINSTALL link fest, do this at post-install, as should

be done. And sort out the resulting mess into PFRAGs...
This commit is contained in:
espie 2004-10-08 10:37:24 +00:00
parent 2dec5e9879
commit e2bf57aed3
6 changed files with 32 additions and 120 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.18 2004/06/13 10:36:58 sturm Exp $
# $OpenBSD: Makefile,v 1.19 2004/10/08 10:37:24 espie Exp $
# $FreeBSD: ports/math/grace/Makefile,v 1.18 2001/04/25 05:59:19 lkoeller Exp $
# Original from: Lars Koeller <Lars.Koeller@Uni-Bielefeld.de>
@ -73,4 +73,21 @@ CONFIGURE_ARGS+= --enable-netcdf
CONFIGURE_ARGS+= --disable-netcdf
.endif
GRACE_DIR=${TRUEPREFIX}/grace
post-install:
.if ${FLAVOR:L:Mno_x11}
ln -sf ${GRACE_DIR}/bin/grace ${PREFIX}/bin/grace
ln -sf ${GRACE_DIR}/bin/grace ${PREFIX}/bin/gracebat
.else
ln -sf ${GRACE_DIR}/bin/xmgrace ${PREFIX}/bin/grace
ln -sf ${GRACE_DIR}/bin/xmgrace ${PREFIX}/bin/gracebat
ln -sf ${GRACE_DIR}/bin/xmgrace ${PREFIX}/bin/xmgrace
ln -sf ${GRACE_DIR}/doc/xmgrace.1 ${PREFIX}/man/man1/xmgrace.1
.endif
ln -sf ${GRACE_DIR}/include/grace_np.h ${PREFIX}/include/grace_np.h
ln -sf ${GRACE_DIR}/lib/libgrace_np.a ${PREFIX}/lib/libgrace_np.a
ln -sf ${GRACE_DIR}/doc/grace.1 ${PREFIX}/man/man1/grace.1
ln -sf ${GRACE_DIR}/doc/gracebat.1 ${PREFIX}/man/man1/gracebat.1
ln -sf ${GRACE_DIR}/doc/grconvert.1 ${PREFIX}/man/man1/grconvert.1
.include <bsd.port.mk>

View File

@ -1,47 +0,0 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.1.1.1 2001/07/13 18:53:55 pvalchev Exp $
#
# grace de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
NO_X11=`echo "$1" | sed -e "s/.*-no_x11/no_x11/"`
LINKS="$PREFIX/bin/grace \
$PREFIX/bin/gracebat \
$PREFIX/include/grace_np.h \
$PREFIX/lib/libgrace_np.a \
$PREFIX/man/man1/grace.1 \
$PREFIX/man/man1/gracebat.1 \
$PREFIX/man/man1/grconvert.1"
if [ ! $NO_X11 == "no_x11" ]; then
LINKS="$LINKS $PREFIX/bin/xmgrace \
$PREFIX/man/man1/xmgrace.1"
fi
for LINK in $LINKS; do
if [ -L $LINK ]; then
rm -f $LINK
else
echo
echo "+---------------"
echo "| Did not delete $LINK, not a link to a $1"
echo "| file. Please have a look at the file."
echo "+---------------"
echo
ERROR=1
fi
done
if [ ! $ERROR ]; then
echo
echo "+---------------"
echo "| All links to $1 files are deleted."
echo "+---------------"
echo
fi
exit 0

View File

@ -1,68 +0,0 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1.1.1 2001/07/13 18:53:55 pvalchev Exp $
#
# Pre/post-installation setup of grace
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
GRACE_DIR=${PREFIX}/grace
NO_X11=`echo "$1" | sed -e "s/.*-no_x11/no_x11/"`
do_notice()
{
echo
echo "+---------------"
echo "| A file/link $PREFIX/bin/grace has been found."
echo "| Links to grace files will not be set!"
echo "+---------------"
echo
}
do_install()
{
if [ $NO_X11 == "no_x11" ]; then
ln -s $GRACE_DIR/bin/grace $PREFIX/bin/grace
ln -s $GRACE_DIR/bin/grace $PREFIX/bin/gracebat
else
ln -s $GRACE_DIR/bin/xmgrace $PREFIX/bin/grace
ln -s $GRACE_DIR/bin/xmgrace $PREFIX/bin/gracebat
ln -s $GRACE_DIR/bin/xmgrace $PREFIX/bin/xmgrace
ln -s $GRACE_DIR/doc/xmgrace.1 $PREFIX/man/man1/xmgrace.1
fi
ln -s $GRACE_DIR/include/grace_np.h $PREFIX/include/grace_np.h
ln -s $GRACE_DIR/lib/libgrace_np.a $PREFIX/lib/libgrace_np.a
ln -s $GRACE_DIR/doc/grace.1 $PREFIX/man/man1/grace.1
ln -s $GRACE_DIR/doc/gracebat.1 $PREFIX/man/man1/gracebat.1
ln -s $GRACE_DIR/doc/grconvert.1 $PREFIX/man/man1/grconvert.1
}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
if [ -x $PREFIX/bin/grace ]; then
do_notice $1
else
do_install $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

View File

@ -1,2 +1,5 @@
@comment $OpenBSD: PFRAG.no-no_x11,v 1.1.1.1 2001/07/13 18:53:55 pvalchev Exp $
@comment $OpenBSD: PFRAG.no-no_x11,v 1.2 2004/10/08 10:37:24 espie Exp $
bin/xmgrace
grace/bin/xmgrace
grace/doc/xmgrace.1
@man man/man1/xmgrace.1

View File

@ -1 +1,2 @@
@comment $OpenBSD: PFRAG.no_x11,v 1.2 2004/09/15 09:11:59 espie Exp $
@comment $OpenBSD: PFRAG.no_x11,v 1.3 2004/10/08 10:37:24 espie Exp $
grace/bin/grace

View File

@ -1,4 +1,6 @@
@comment $OpenBSD: PLIST,v 1.5 2004/09/15 09:11:59 espie Exp $
@comment $OpenBSD: PLIST,v 1.6 2004/10/08 10:37:24 espie Exp $
bin/grace
bin/gracebat
grace/
grace/auxiliary/
grace/auxiliary/README
@ -35,7 +37,6 @@ grace/doc/mygraph.png
grace/doc/nohelp.html
grace/doc/philosophical-gnu-sm.jpg
grace/doc/shiftdata.sh
grace/doc/xmgrace.1
grace/examples/
grace/examples/altaxis.par
grace/examples/arrows.agr
@ -142,3 +143,8 @@ grace/templates/
grace/templates/Default.agr
%%no_x11%%
!%%no_x11%%
include/grace_np.h
lib/libgrace_np.a
@man man/man1/grace.1
@man man/man1/gracebat.1
@man man/man1/grconvert.1