pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/bootstrap-extras This package provides extra ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b1df8912e10e
branches: trunk
changeset: 516207:b1df8912e10e
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Jul 17 14:21:31 2006 +0000
description:
This package provides extra files and scripts needed to bootstrap pkgsrc
on this platform. These files come from pkgsrc/bootstrap.
diffstat:
pkgtools/bootstrap-extras/DESCR | 2 +
pkgtools/bootstrap-extras/Makefile | 53 ++++++++++++++++++++++++++++++++
pkgtools/bootstrap-extras/PLIST | 4 ++
pkgtools/bootstrap-extras/files/fakeldd | 6 +++
pkgtools/bootstrap-extras/files/mkdir-sh | 53 ++++++++++++++++++++++++++++++++
pkgtools/bootstrap-extras/files/strip-sh | 28 ++++++++++++++++
6 files changed, 146 insertions(+), 0 deletions(-)
diffs (170 lines):
diff -r 1159d1e95211 -r b1df8912e10e pkgtools/bootstrap-extras/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/bootstrap-extras/DESCR Mon Jul 17 14:21:31 2006 +0000
@@ -0,0 +1,2 @@
+This package provides extra files and scripts needed to bootstrap pkgsrc
+on this platform.
diff -r 1159d1e95211 -r b1df8912e10e pkgtools/bootstrap-extras/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/bootstrap-extras/Makefile Mon Jul 17 14:21:31 2006 +0000
@@ -0,0 +1,53 @@
+# $NetBSD: Makefile,v 1.1.1.1 2006/07/17 14:21:31 jlam Exp $
+
+DISTNAME= bootstrap-extra-files-20060714
+CATEGORIES= pkgtools
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+COMMENT= extra bootstrap files and scripts for ${OPSYS}
+
+NO_CHECKSUM= yes
+NO_MTREE= yes
+NO_CONFIGURE= yes
+NO_BUILD= yes
+
+.include "../../mk/bsd.prefs.mk"
+
+OPSYSVARS+= NEED_FAKELDD
+NEED_FAKELDD.IRIX= # empty
+NEED_FAKELDD.*= "@comment "
+PLIST_SUBST+= NEED_FAKELDD=${NEED_FAKELDD}
+
+OPSYSVARS+= NEED_MKDIR
+NEED_STRIP.UnixWare= # empty
+NEED_STRIP.*= "@comment "
+PLIST_SUBST+= NEED_MKDIR=${NEED_MKDIR}
+
+OPSYSVARS+= NEED_STRIP
+NEED_STRIP.AIX= # empty
+NEED_STRIP.*= "@comment "
+PLIST_SUBST+= NEED_STRIP=${NEED_STRIP}
+
+do-extract:
+ @${CP} -R ${FILESDIR} ${WRKSRC}
+
+do-install:
+ if ${TEST} -n ${NEED_FAKELDD:M*:Q}""; then \
+ ${INSTALL_SCRIPT_DIR} ${PREFIX}/sbin; \
+ ${INSTALL_SCRIPT} ${WRKSRC}/fakeldd \
+ ${PREFIX}/sbin/fakeldd; \
+ fi
+ if ${TEST} -n ${NEED_MKDIR:M*:Q}""; then \
+ ${INSTALL_SCRIPT_DIR} ${PREFIX}/bin; \
+ ${INSTALL_SCRIPT} ${WRKSRC}/mkdir-sh \
+ ${PREFIX}/bin/mkdir-sh; \
+ fi
+ if ${TEST} -n ${NEED_STRIP:M*:Q}""; then \
+ ${INSTALL_SCRIPT_DIR} ${PREFIX}/bin; \
+ ${INSTALL_SCRIPT} ${WRKSRC}/strip-sh \
+ ${PREFIX}/bin/strip; \
+ fi
+
+.include "../../mk/bsd.pkg.mk"
diff -r 1159d1e95211 -r b1df8912e10e pkgtools/bootstrap-extras/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/bootstrap-extras/PLIST Mon Jul 17 14:21:31 2006 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2006/07/17 14:21:31 jlam Exp $
+${NEED_MKDIR}bin/mkdir-sh
+${NEED_STRIP}bin/strip
+${NEED_FAKELDD}sbin/fakeldd
diff -r 1159d1e95211 -r b1df8912e10e pkgtools/bootstrap-extras/files/fakeldd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/bootstrap-extras/files/fakeldd Mon Jul 17 14:21:31 2006 +0000
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# $NetBSD: fakeldd,v 1.1.1.1 2006/07/17 14:21:31 jlam Exp $
+#
+/usr/bin/elfdump -Dl "$@" |
+/usr/bin/nawk 'NF == 7 || NF == 8 {printf "x x %s\n",$1}'
diff -r 1159d1e95211 -r b1df8912e10e pkgtools/bootstrap-extras/files/mkdir-sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/bootstrap-extras/files/mkdir-sh Mon Jul 17 14:21:31 2006 +0000
@@ -0,0 +1,53 @@
+#! /bin/sh
+#
+# $NetBSD: mkdir-sh,v 1.1.1.1 2006/07/17 14:21:31 jlam Exp $
+#
+
+PATH=/bin:/sbin:/usr/bin:/usr/sbin; export PATH
+
+MKDIRCMD=mkdir
+cmdargs="$@"
+
+# variable 'options' is unused
+for options in p m
+do
+ if [ $# -lt 1 ]
+ then
+ ${MKDIRCMD} ${cmdargs}
+ exit $?
+ fi
+
+ case $1 in
+ -p) pathopt=-p;
+ shift;;
+ -m) modeopt="-m ${2}"
+ shift;
+ if [ $# -ne 0 ]
+ then
+ shift
+ else
+ ${MKDIRCMD} ${cmdargs}
+ exit $?
+ fi
+ ;;
+ esac
+done
+
+if [ $# -gt 0 ]
+then
+ while [ $# -gt 0 ]
+ do
+ if [ -z "${pathopt}" ]
+ then
+ ${MKDIRCMD} ${modeopt} -- "$1"
+ elif [ ! -d $1 ]
+ then
+ ${MKDIRCMD} ${pathopt} ${modeopt} -- "$1"
+ else
+ : # directory exists, nothing to do
+ fi
+ shift
+ done
+else
+ ${MKDIRCMD} ${cmdargs}
+fi
diff -r 1159d1e95211 -r b1df8912e10e pkgtools/bootstrap-extras/files/strip-sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/bootstrap-extras/files/strip-sh Mon Jul 17 14:21:31 2006 +0000
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $NetBSD: strip-sh,v 1.1.1.1 2006/07/17 14:21:31 jlam Exp $
+#
+# On some platforms strip complains too much if the file is not writable,
+# or if it's already stripped.
+#
+for f in "$@" ; do
+ if ! /usr/bin/file "$f" | grep -q "not stripped" ; then
+ # Skip the file if it's already stripped
+ continue
+ fi
+ nowrite=0
+ if [ ! -w "$f" ] ; then
+ # Make sure it's writable.
+ nowrite=1
+ chmod +w "$f"
+ fi
+ /usr/bin/strip "$f"
+ ret=$?
+ if [ $nowrite -eq 1 ] ; then
+ chmod -w "$f"
+ fi
+ if [ $ret -ne 0 ] ; then
+ exit $ret
+ fi
+done
+exit 0
Home |
Main Index |
Thread Index |
Old Index