diff options
author | jlam <jlam@pkgsrc.org> | 2006-07-17 14:21:31 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-07-17 14:21:31 +0000 |
commit | 6c46adad19bcab6a04d263a55242b360e244073e (patch) | |
tree | a5ff441afec522ab2f6a33128dc01b34948ccf7f /pkgtools | |
parent | 35278b5fabac82e4b2d877381d14936229fb0405 (diff) | |
download | pkgsrc-6c46adad19bcab6a04d263a55242b360e244073e.tar.gz |
This package provides extra files and scripts needed to bootstrap pkgsrc
on this platform. These files come from pkgsrc/bootstrap.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/bootstrap-extras/DESCR | 2 | ||||
-rw-r--r-- | pkgtools/bootstrap-extras/Makefile | 53 | ||||
-rw-r--r-- | pkgtools/bootstrap-extras/PLIST | 4 | ||||
-rw-r--r-- | pkgtools/bootstrap-extras/files/fakeldd | 6 | ||||
-rw-r--r-- | pkgtools/bootstrap-extras/files/mkdir-sh | 53 | ||||
-rw-r--r-- | pkgtools/bootstrap-extras/files/strip-sh | 28 |
6 files changed, 146 insertions, 0 deletions
diff --git a/pkgtools/bootstrap-extras/DESCR b/pkgtools/bootstrap-extras/DESCR new file mode 100644 index 00000000000..45571ba49b9 --- /dev/null +++ b/pkgtools/bootstrap-extras/DESCR @@ -0,0 +1,2 @@ +This package provides extra files and scripts needed to bootstrap pkgsrc +on this platform. diff --git a/pkgtools/bootstrap-extras/Makefile b/pkgtools/bootstrap-extras/Makefile new file mode 100644 index 00000000000..04efe6d36a9 --- /dev/null +++ b/pkgtools/bootstrap-extras/Makefile @@ -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 +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 --git a/pkgtools/bootstrap-extras/PLIST b/pkgtools/bootstrap-extras/PLIST new file mode 100644 index 00000000000..8e729b33a58 --- /dev/null +++ b/pkgtools/bootstrap-extras/PLIST @@ -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 --git a/pkgtools/bootstrap-extras/files/fakeldd b/pkgtools/bootstrap-extras/files/fakeldd new file mode 100644 index 00000000000..97f11df6f69 --- /dev/null +++ b/pkgtools/bootstrap-extras/files/fakeldd @@ -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 --git a/pkgtools/bootstrap-extras/files/mkdir-sh b/pkgtools/bootstrap-extras/files/mkdir-sh new file mode 100644 index 00000000000..851ad525c7b --- /dev/null +++ b/pkgtools/bootstrap-extras/files/mkdir-sh @@ -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 --git a/pkgtools/bootstrap-extras/files/strip-sh b/pkgtools/bootstrap-extras/files/strip-sh new file mode 100644 index 00000000000..9e0c9368bdc --- /dev/null +++ b/pkgtools/bootstrap-extras/files/strip-sh @@ -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 |