OK, this last one pretty much wraps up HP-UX for now. I can provide
packages for the next release (or sooner if anybody wants 'em).
I turned off UNIX_CAN_BUILD_DYNAMIC, since packages with dynamic
libraries won't necessarily run anywhere other than on the box
they were built on.
Thanks for all the help, everybody!
--
- Kevin Vajk
<[EMAIL PROTECTED]>
Index: abi/src/pkg/hpux/Makefile
===================================================================
RCS file: /cvsroot/abi/src/pkg/hpux/Makefile,v
retrieving revision 1.2
diff -u -u -r1.2 Makefile
--- abi/src/pkg/hpux/Makefile 2000/05/21 14:44:03 1.2
+++ abi/src/pkg/hpux/Makefile 2001/03/15 23:42:23
@@ -55,10 +55,26 @@
DIST_DEPS += tbz
endif
+# If depot is inside $ABI_DIST_TARGET
+ifneq ($(findstring depot,$(ABI_DIST_TARGET)),)
+ DIST_DEPS += depot
+endif
+
+
# Tgz target is provided by a common Unix makefile
include $(ABI_ROOT)/src/pkg/common/unix/tgz.mk
include $(ABI_ROOT)/src/pkg/common/unix/tbz.mk
+
+depot: install
+ @echo "Creating native HP-UX SD depot..."
+ @echo "Creating package at $(DIST)/abiword-$(ABI_BUILD_VERSION).depot"
+ @mkdir -p $(DIST)
+ @( cd $(ABI_ROOT)/src/pkg/hpux/scripts/ ; \
+ TARGET=$(prefix)/AbiSuite BINDIR=$(prefix)/bin \
+ ./hpux.abiword.mkdepot.sh \
+ $(ABI_BUILD_VERSION) \
+ $(DIST)/abiword-$(ABI_BUILD_VERSION).depot )
########################################################################
Index: abi/src/pkg/hpux/scripts/hpux.abiword.configure
===================================================================
RCS file: /cvsroot/abi/src/pkg/hpux/scripts/hpux.abiword.configure,v
retrieving revision 1.1
diff -u -u -r1.1 hpux.abiword.configure
--- abi/src/pkg/hpux/scripts/hpux.abiword.configure 2001/03/14 07:14:09 1.1
+++ abi/src/pkg/hpux/scripts/hpux.abiword.configure 2001/03/15 23:42:23
@@ -6,9 +6,9 @@
# @(#) $Revision: 1.1 $
########
#
-# HP-UX abiword configure script, written by Kevin Vajk
+# HP-UX abiword SD configure script, written by Kevin Vajk
#
-# This script adds /usr/local/AbiSuite/fonts to /etc/X11/fs/config
+# This script adds ${TARGET}/fonts to /etc/X11/fs/config
# and edits /usr/lib/nls/iconv/config.iconv to add an alias for
# ISO-8859-1 (iso81) and UCS-2 (ucs2)
# (I don't like editing config.iconv, but abiword doesn't seem to work
@@ -16,22 +16,33 @@
#
########
-###############################################################################
+# This next line (defining $TARGET) is edited by hpux.abiword.mkdepot.sh
+# automatically, so please don't change its format. (I know this is
+# hackish, but it works well enough for now.)
+# Where abiword is installed:
+TARGET=/usr/local/AbiSuite
+
+# Make sure we can find everything we'll need:
+PATH=/usr/sbin:/sbin:/usr/bin:${PATH} ; export PATH
-fontdir=/usr/local/AbiSuite/fonts
+###############################################################################
+FONTDIR=${TARGET}/fonts
FILE=/etc/X11/fs/config
+
if [ ! -f "$FILE" ] ; then
echo "WARNING: $FILE not found"
+elif [ ! -d "$FONTDIR" ] ; then
+ echo "WARNING: $FONTDIR not found"
else
[ -f "${FILE}.abisave" ] || cp -p $FILE ${FILE}.abisave
- grep '^[[:space:]]*catalogue[[:space:]]*=' $FILE | grep -q "$fontdir"
+ grep '^[[:space:]]*catalogue[[:space:]]*=' $FILE | grep -q "$FONTDIR"
if [ $? -ne 0 ] ; then
rm -rf /tmp/config.$$ ; mkdir /tmp/config.$$
- sed 's@\(^[[:space:]]*catalogue[[:space:]]*=.*\)$@\1,'${fontdir}'@' < $FILE >
/tmp/config.$$/config
+ sed 's@\(^[[:space:]]*catalogue[[:space:]]*=.*\)$@\1,'${FONTDIR}'@' < $FILE >
+/tmp/config.$$/config
cat < /tmp/config.$$/config > $FILE
rm -rf /tmp/config.$$
- echo "NOTE: Added entry for $fontdir to ${FILE}."
+ echo "NOTE: Added entry for $FONTDIR to ${FILE}."
echo " You may need to run \"/sbin/init.d/xfs restart\"."
echo " You may also need to re-start the X Window System."
fi
Index: abi/src/pkg/hpux/scripts/hpux.abiword.mkdepot.sh
===================================================================
RCS file: /cvsroot/abi/src/pkg/hpux/scripts/hpux.abiword.mkdepot.sh,v
retrieving revision 1.1
diff -u -u -r1.1 hpux.abiword.mkdepot.sh
--- abi/src/pkg/hpux/scripts/hpux.abiword.mkdepot.sh 2001/03/14 07:14:09 1.1
+++ abi/src/pkg/hpux/scripts/hpux.abiword.mkdepot.sh 2001/03/15 23:42:23
@@ -1,14 +1,6 @@
#!/bin/sh
#
-# Check that we're on HP-UX:
-#
-if [ "`uname -s`" != "HP-UX" ] ; then
- echo "$0: Error: This is intended for HP-UX systems only" >&2
- exit 1
-fi
-
-#
# Get command-line arguments:
#
if [ $# -ne 2 ] ; then
@@ -20,18 +12,27 @@
ABIWORDDEPOT="$2"
#
-# Set $TARGET and $BINDIR, if they're not already set:
+# Check that we're on HP-UX:
#
-: ${TARGET:=/usr/local/AbiSuite}
-: ${BINDIR:=/usr/local/bin}
+if [ "`uname -s`" != "HP-UX" ] ; then
+ echo "$0: Error: This is intended for HP-UX systems only" >&2
+ exit 1
+fi
#
-# Other variables:
+# Miscellaneous variables:
#
-TMPABIWORDPSF=`mktemp -c` || exit 1
+PATH=/usr/sbin:/sbin:/usr/bin:${PATH} ; export PATH
+TMPABIWORDPSF=`mktemp -c` || exit 1 # Note: HP-UX-specific mktemp command
HPUXCONFIGURE=hpux.abiword.configure
#
+# Set $TARGET and $BINDIR, if they're not already set (they should be!):
+#
+: ${TARGET:=/usr/local/AbiSuite}
+: ${BINDIR:=/usr/local/bin}
+
+#
# Check that the files to be packaged have been installed:
#
if [ ! -d "$TARGET" ] ; then
@@ -48,6 +49,22 @@
fi
#
+# Edit the configure script to set $TARGET properly:
+# (Yes, this is rather hackish...)
+#
+if grep -q '^TARGET=' "$HPUXCONFIGURE"
+then
+ (
+ echo '/^TARGET='
+ echo 's,=.*$,='${TARGET}','
+ echo 'wq!'
+ ) | ex "$HPUXCONFIGURE" >/dev/null 2>&1
+else
+ echo "$0: Error: Cannot find TARGET= line to edit in $HPUXCONFIGURE" >&2
+ exit 1
+fi
+
+#
#
# Check os_release compatibility:
case "`uname -r`" in
@@ -113,13 +130,14 @@
os_name HP-UX
fileset
tag AbiWord
+ revision $ABIWORDREVISION
# The name of the configure script:
configure $HPUXCONFIGURE
file_permissions -o root -g root
- file /usr/local/bin/AbiWord
- file /usr/local/bin/abiword
+ file ${BINDIR}/AbiWord
+ file ${BINDIR}/abiword
# Note: "file *" isn't really a glob pattern, despite appearances.
- directory /usr/local/AbiSuite
+ directory $TARGET
file *
end
end
@@ -128,7 +146,6 @@
#
# Make the package:
#
-PATH=/usr/sbin:/sbin:${PATH} ; export PATH
rm -f -- $ABIWORDDEPOT
swpackage -x create_target_acls=false -x target_type=tape \
-d $ABIWORDDEPOT -s $TMPABIWORDPSF
Index: abi/src/config/platforms/hpux.mk
===================================================================
RCS file: /cvsroot/abi/src/config/platforms/hpux.mk,v
retrieving revision 1.10
diff -u -u -r1.10 hpux.mk
--- abi/src/config/platforms/hpux.mk 2001/03/03 22:13:52 1.10
+++ abi/src/config/platforms/hpux.mk 2001/03/15 23:42:23
@@ -78,7 +78,10 @@
# Which links can this platform create. Define one or
# both of these options.
-UNIX_CAN_BUILD_DYNAMIC=1
+# (On HP-UX, we *can* build dynamic, but it's safer not to, since other
+# systems we distribute HP-UX packages to may not have all the shared
+# libraries in the same locations.)
+UNIX_CAN_BUILD_DYNAMIC=0
UNIX_CAN_BUILD_STATIC=1
# Compiler options for static and dynamic linkage