Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2003-06-23 13:20:55 +04:00
|
|
|
# $NetBSD: listpkgs,v 1.5 2003/06/23 09:20:55 dyoung Exp $
|
2002-02-27 13:43:42 +03:00
|
|
|
#
|
|
|
|
# List all packages in the given pkgset by parsing the list files.
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
# set defaults
|
2002-07-23 13:02:45 +04:00
|
|
|
MAKE="${MAKE:-make} -j 1"
|
|
|
|
machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | ${MAKE} -s -f-`}
|
|
|
|
arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | ${MAKE} -s -f-`}
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
setd=`dirname $0`
|
|
|
|
prefix=/
|
|
|
|
|
2003-06-23 13:20:55 +04:00
|
|
|
. ./sets.subr
|
|
|
|
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
usage() {
|
|
|
|
exec 1>&2
|
|
|
|
|
|
|
|
echo "Usage: $0 [-a arch] [-m machine] [-s setsdir] [-p prefix] setname"
|
|
|
|
echo " -a arch set arch (e.g, m68k, mips, powerpc) [$arch]"
|
|
|
|
echo " -m machine set machine (e.g, amiga, i386, macppc) [$machine]"
|
|
|
|
echo " -s setsdir directory to find sets [$setd]"
|
|
|
|
echo " setname set to list packages for"
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
# handle args
|
|
|
|
while : ; do
|
|
|
|
case $1 in
|
|
|
|
-a*)
|
|
|
|
arch=$2; shift
|
|
|
|
;;
|
|
|
|
-m*)
|
|
|
|
machine=$2; shift
|
|
|
|
;;
|
|
|
|
-s*)
|
|
|
|
setd=$2; shift
|
|
|
|
;;
|
|
|
|
-*)
|
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
if [ -n "$1" ]; then
|
|
|
|
setname="$1"
|
|
|
|
else
|
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Convert mipse[lb] to mips after processing command line arguments.
|
|
|
|
arch=`echo $arch | sed s,^mipse.,mips, | sed s,^sh3e.,sh3,`
|
|
|
|
|
|
|
|
# Compute toolchain used on target cpu.
|
2002-03-25 01:14:23 +03:00
|
|
|
if [ "$arch" = "mips" -o "$machine" = "alpha" -o "$arch" = "powerpc" -o "$arch" = "sparc" -o "$arch" = "sparc64" -o "$arch" = "i386" -o "$arch" = "arm" -o "$machine" = "mvme68k" -o "$machine" = "hp300" ]; then
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
shlib=elf
|
|
|
|
else
|
|
|
|
if [ "$arch" = "sh3" ]; then
|
|
|
|
shlib=
|
|
|
|
else
|
|
|
|
shlib=aout
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2003-06-23 13:20:55 +04:00
|
|
|
list_set_files $setname | awk -- '/^[^#]/ {print $2}' | sort -u
|