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
|
|
|
|
#
|
|
|
|
# Print out the files in some or all lists.
|
2003-06-01 02:56:37 +04:00
|
|
|
# Usage: makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
|
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
|
2003-11-25 10:19:46 +03:00
|
|
|
. ./sets.defaults
|
2003-06-23 13:17:04 +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
|
|
|
setd=`dirname $0`
|
|
|
|
prefix=/
|
|
|
|
|
|
|
|
usage() {
|
|
|
|
exec 1>&2
|
|
|
|
|
|
|
|
echo "Usage: $0 [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname"
|
2003-06-23 13:17:04 +04:00
|
|
|
echo " -a arch set arch (e.g, m68k, mips, powerpc) [$machine_arch]"
|
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
|
|
|
echo " -m machine set machine (e.g, amiga, i386, macppc) [$machine]"
|
|
|
|
echo " -s setsdir directory to find sets [$setd]"
|
2003-06-01 03:17:29 +04:00
|
|
|
echo " -p prefix prefix for created plist [$prefix]"
|
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
|
|
|
echo " setname pkgname set and package to build plist for"
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
# handle args
|
|
|
|
while : ; do
|
|
|
|
case $1 in
|
|
|
|
-a*)
|
2003-06-23 13:17:04 +04:00
|
|
|
machine_arch=$2; shift
|
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
|
|
|
;;
|
|
|
|
-m*)
|
|
|
|
machine=$2; shift
|
|
|
|
;;
|
|
|
|
-s*)
|
|
|
|
setd=$2; shift
|
|
|
|
;;
|
|
|
|
-p*)
|
|
|
|
prefix=$2; shift
|
|
|
|
;;
|
|
|
|
-*)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
if [ -n "$1" ]; then
|
|
|
|
setname="$1"
|
|
|
|
else
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
if [ -n "$2" ]; then
|
|
|
|
pkgname=$2
|
|
|
|
else
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
|
2003-06-23 13:17:04 +04:00
|
|
|
# Determine lib type.
|
|
|
|
if [ "$object_fmt" = "ELF" ]; then
|
|
|
|
shlib=elf
|
|
|
|
else
|
|
|
|
shlib=aout
|
|
|
|
fi
|
|
|
|
stlib=$shlib
|
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
|
|
|
|
2003-06-23 13:17:04 +04:00
|
|
|
# Turn off shlibs for some ports.
|
|
|
|
if [ "$machine_cpu" = "sh3" -o "$machine_arch" = "m68000" ]; then
|
|
|
|
shlib=no
|
|
|
|
fi
|
|
|
|
lkm=yes
|
|
|
|
# Turn off LKMs for some ports.
|
|
|
|
if [ "$machine" = "evbppc" ]; then
|
|
|
|
lkm=no
|
|
|
|
fi
|
2003-06-12 23:55:18 +04:00
|
|
|
|
|
|
|
filename=/tmp/makeplist.$$
|
|
|
|
ffilename=/tmp/makeplist.files.$$
|
|
|
|
dfilename=/tmp/makeplist.dirs.$$
|
|
|
|
|
2003-06-23 13:17:04 +04:00
|
|
|
list_set_files $setname | \
|
2003-10-17 13:51:24 +04:00
|
|
|
env PLISTPKG=$pkgname awk -- '/^#/ { next } $2 == ENVIRON["PLISTPKG"] {sub("^\\./", "", $1); print $1}' | sort -u > $filename
|
2003-06-23 13:17:04 +04:00
|
|
|
|
|
|
|
SELECTDIRS="-maxdepth 0 -type d"
|
|
|
|
SELECTNONDIRS="-maxdepth 0 ! -type d"
|
|
|
|
|
|
|
|
cd $prefix
|
|
|
|
#
|
|
|
|
# match the directories
|
|
|
|
#
|
|
|
|
xargs echo $SELECTDIRS < $filename | \
|
|
|
|
while read ignore ignore ignore ignore args; do
|
|
|
|
[ -z "$args" ] && break
|
|
|
|
find $args $SELECTDIRS
|
|
|
|
done | awk '{ print "@dirrm " $1; }' > $dfilename
|
|
|
|
|
|
|
|
#
|
|
|
|
# match the non-directories
|
|
|
|
#
|
|
|
|
xargs echo $SELECTNONDIRS < $filename | \
|
|
|
|
while read ignore ignore ignore ignore ignore args; do
|
|
|
|
[ -z "$args" ] && break
|
|
|
|
find $args $SELECTNONDIRS
|
|
|
|
done > $ffilename
|
|
|
|
|
|
|
|
cd -
|
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
|
|
|
|
|
|
|
echo "@cwd $prefix"
|
2003-06-12 23:55:18 +04:00
|
|
|
if [ -s $ffilename ]; then
|
|
|
|
cat $ffilename
|
|
|
|
fi
|
|
|
|
if [ -s $dfilename ]; then
|
|
|
|
sort -r $dfilename
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -f $filename $ffilename $dfilename
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|