pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/cdpack update to cdpack-1.6.
details: https://anonhg.NetBSD.org/pkgsrc/rev/e1bc9d0d5ae2
branches: trunk
changeset: 497664:e1bc9d0d5ae2
user: dmcmahill <dmcmahill%pkgsrc.org@localhost>
date: Mon Aug 01 21:47:43 2005 +0000
description:
update to cdpack-1.6.
- add -m, -o, and -r flags to optionally specify the machine-architecture
operating system, and os version to be displayed in the generated README
file. From Greg Woods via private email.
- White space fixes from Greg Woods.
- Clean up the generated README file as well as several of the messages
to reflect if the collection is a CD-ROM or DVD set. Some patches from
Greg Woods, more from me.
- List the tools used at runtime.
diffstat:
pkgtools/cdpack/DESCR | 21 ++-
pkgtools/cdpack/Makefile | 27 +++-
pkgtools/cdpack/files/cdgen.awk | 26 ++--
pkgtools/cdpack/files/cdpack.1 | 23 ++++-
pkgtools/cdpack/files/cdpack.sh | 202 ++++++++++++++++++++++++---------------
5 files changed, 191 insertions(+), 108 deletions(-)
diffs (truncated from 685 to 300 lines):
diff -r aad70cfcbf1b -r e1bc9d0d5ae2 pkgtools/cdpack/DESCR
--- a/pkgtools/cdpack/DESCR Mon Aug 01 21:28:06 2005 +0000
+++ b/pkgtools/cdpack/DESCR Mon Aug 01 21:47:43 2005 +0000
@@ -1,11 +1,14 @@
cdpack is a small utility for creating ISO 9660 images for
-a multi-CD binary package collection. The utility creates
+a multi-CD/DVD binary package collection. The utility creates
ISO 9660 images for all the binary packages in a specified
-directory. A choice of two algorithms is available for how
-the packages are grouped. The "no duplication" algorithm
-arranges the packages so any package on CD number `n' will
-have all of its dependencies on CD numbers 1 through `n'.
-The "no inter-CD depends" algorithm will place certain
-packages on more than one CD to ensure that each CD is self
-contained (all package dependencies are satisfied within
-the single CD).
+directory.
+
+A choice of two algorithms is available for how the packages
+are grouped. The "no duplication" algorithm arranges the
+packages so any package on CD/DVD number `n' will have all of
+its dependencies on CD/DVD numbers 1 through `n'.
+
+The "no inter-CD/DVD depends" algorithm will place certain
+packages on more than one CD/DVD to ensure that each CD/DVD is
+self contained (all package dependencies are satisfied within
+the single CD/DVD).
diff -r aad70cfcbf1b -r e1bc9d0d5ae2 pkgtools/cdpack/Makefile
--- a/pkgtools/cdpack/Makefile Mon Aug 01 21:28:06 2005 +0000
+++ b/pkgtools/cdpack/Makefile Mon Aug 01 21:47:43 2005 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.19 2005/06/17 03:50:29 jlam Exp $
+# $NetBSD: Makefile,v 1.20 2005/08/01 21:47:43 dmcmahill Exp $
#
-DISTNAME= cdpack-1.5
-PKGREVISION= 1
+DISTNAME= cdpack-1.6
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
@@ -18,17 +17,31 @@
NO_CHECKSUM= yes
NO_CONFIGURE= yes
+USE_TOOLS+= awk:run
+USE_TOOLS+= expr:run
+USE_TOOLS+= sort:run
+USE_TOOLS+= tsort:run
+
INSTALLATION_DIRS= bin libexec man/man1
do-build:
${SED} -e 's;@prefix@;${PREFIX};g' \
- -e 's;@progver@;${PKGVERSION};g' ${FILESDIR}/cdpack.sh > \
- ${WRKDIR}/cdpack
+ -e 's;@progver@;${PKGVERSION};g' \
+ -e 's;@AWK@;${AWK};g' \
+ -e 's;@EXPR@;${EXPR};g' \
+ -e 's;@SORT@;${SORT};g' \
+ -e 's;@TSORT@;${TSORT};g' \
+ ${FILESDIR}/cdpack.sh > \
+ ${WRKSRC}/cdpack
${CHMOD} 755 ${WRKDIR}/cdpack
+ ${SED} -e 's;@AWK@;${AWK};g' ${FILESDIR}/cdpack.1 > \
+ ${WRKSRC}/cdpack.1
+ ${SED} -e 's;@AWK@;${AWK};g' ${FILESDIR}/cdgen.awk > \
+ ${WRKSRC}/cdgen.awk
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/cdpack ${PREFIX}/bin
- ${INSTALL_SCRIPT} ${FILESDIR}/cdgen.awk ${PREFIX}/libexec
- ${INSTALL_MAN} ${FILESDIR}/cdpack.1 ${PREFIX}/man/man1
+ ${INSTALL_SCRIPT} ${WRKSRC}/cdgen.awk ${PREFIX}/libexec
+ ${INSTALL_MAN} ${WRKSRC}/cdpack.1 ${PREFIX}/man/man1
.include "../../mk/bsd.pkg.mk"
diff -r aad70cfcbf1b -r e1bc9d0d5ae2 pkgtools/cdpack/files/cdgen.awk
--- a/pkgtools/cdpack/files/cdgen.awk Mon Aug 01 21:28:06 2005 +0000
+++ b/pkgtools/cdpack/files/cdgen.awk Mon Aug 01 21:47:43 2005 +0000
@@ -1,7 +1,7 @@
-#!/usr/bin/awk -f
-# $NetBSD: cdgen.awk,v 1.5 2005/01/09 15:33:09 dmcmahill Exp $
+#!@AWK@ -f
+# $NetBSD: cdgen.awk,v 1.6 2005/08/01 21:47:43 dmcmahill Exp $
#
-# Copyright (c) 2001, 2002, 2003 Dan McMahill, All rights reserved.
+# Copyright (c) 2001, 2002, 2003, 2005 Dan McMahill, All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -224,7 +224,7 @@
}
else{
# the CD is full
- printf("cd number %d is full (%g Mb)\n",cdn,
+ printf("disk number %d is full (%g Mb)\n",cdn,
cdtot[cdn]/1024);
cdpkgs[cdn] = pkgn;
# increment the CD counter
@@ -240,16 +240,16 @@
# see if the extra files will fit on the last CD
if ( (cdtot[cdn] + other_size) < maxcd ){
- printf("cd number %d is partially full (%g Mb)\n",cdn,
+ printf("disk number %d is partially full (%g Mb)\n",cdn,
cdtot[cdn]/1024);
}
else{
- printf("cd number %d is full (%g Mb)\n",cdn,
+ printf("disk number %d is full (%g Mb)\n",cdn,
cdtot[cdn]/1024);
cdn = cdn + 1;
cdtot[cdn] = other_size;
cdpkgs[cdn] = 0;
- printf("cd number %d is partially full (%g Mb)\n",cdn,
+ printf("disk number %d is partially full (%g Mb)\n",cdn,
cdtot[cdn]/1024);
}
@@ -318,7 +318,7 @@
}
else{
# the CD is full
- printf("cd number %d is full (%g Mb)\n",cdn,
+ printf("disk number %d is full (%g Mb)\n",cdn,
cdtot[cdn]/1024);
cdpkgs[cdn] = pkgn;
cdn++;
@@ -337,16 +337,16 @@
# see if the extra files will fit on the last CD
if ( (cdtot[cdn] + other_size) < maxcd ){
- printf("cd number %d is partially full (%g Mb)\n",cdn,
+ printf("disk number %d is partially full (%g Mb)\n",cdn,
cdtot[cdn]/1024);
}
else{
- printf("cd number %d is full (%g Mb)\n",cdn,
+ printf("disk number %d is full (%g Mb)\n",cdn,
cdtot[cdn]/1024);
cdn = cdn + 1;
cdtot[cdn] = other_size;
cdpkgs[cdn] = 0;
- printf("cd number %d is partially full (%g Mb)\n",cdn,
+ printf("disk number %d is partially full (%g Mb)\n",cdn,
cdtot[cdn]/1024);
}
}
@@ -378,7 +378,7 @@
for (cdn=1; cdn<=ncd; cdn=cdn+1){
printf("----------- CD/DVD #%d ----------\n",cdn);
printf(" %3d binary packages\n",cdpkgs[cdn]);
- outdir=cddir "/cd" cdn "/packages/All";
+ outdir=cddir "/disk" cdn "/packages/All";
cmd="test -d " outdir;
if(system(cmd) == 0){
printf("%10s: output dir \"%s\" already exists.\n",prog,outdir);
@@ -400,7 +400,7 @@
}
# add it to the cd list
- printf("cd%d\n",cdn) > cdlist ;
+ printf("disk%d\n", cdn) > cdlist ;
}
diff -r aad70cfcbf1b -r e1bc9d0d5ae2 pkgtools/cdpack/files/cdpack.1
--- a/pkgtools/cdpack/files/cdpack.1 Mon Aug 01 21:28:06 2005 +0000
+++ b/pkgtools/cdpack/files/cdpack.1 Mon Aug 01 21:47:43 2005 +0000
@@ -1,6 +1,6 @@
-.\" $NetBSD: cdpack.1,v 1.11 2003/08/03 15:17:51 dmcmahill Exp $
+.\" $NetBSD: cdpack.1,v 1.12 2005/08/01 21:47:43 dmcmahill Exp $
.\"
-.\" Copyright (c) 2001, 2002, 2003 Dan McMahill, All rights reserved.
+.\" Copyright (c) 2001, 2002, 2003, 2005 Dan McMahill, All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -42,6 +42,9 @@
.Op -dvd
.Op -h | --help
.Op -l logfile
+.Op -m machine_architecture
+.Op -o operating_system
+.Op -r os_version
.Op -dnRvV
.Op -x common_directory
.Op -X extras_directory
@@ -94,6 +97,10 @@
.It Fl l Ar logfile
Log the output of mkisofs -v -v to the file
.Ar logfile .
+.It Fl m Ar machine_architecture
+Specifies
+.Ar machine_architecture
+as the target architecture for the binary packages in the generated README file.
.It Fl n
Do not duplicate packages in order to prevent inter-CD/DVD dependencies.
The default without the
@@ -110,6 +117,14 @@
numbered CD/DVD's and packages which are higher on the higher numbered
CD/DVD's. In this fashion, a package on CD/DVD number n
will have all of its dependencies on CD/DVD numbers 1 through n
+.It Fl o Ar operating_system
+Specifies
+.Ar operating_system
+as the target operating system for the binary packages in the generated README file.
+.It Fl r Ar os_version
+Specifies
+.Ar os_version
+as the target operating system version for the binary packages in the generated README file.
.It Fl R
Generate a file,
.Ar README.txt ,
@@ -140,6 +155,10 @@
.Nm
uses the fillowing environment variables if set.
.Bl -tag -width "TMPDIR"
+.It Ev AWK
+awk implementation to use.
+Defaults to
+.Dq Li @AWK@ .
.It Ev TMPDIR
Directory for holding temporary files during the image creation.
Defaults to
diff -r aad70cfcbf1b -r e1bc9d0d5ae2 pkgtools/cdpack/files/cdpack.sh
--- a/pkgtools/cdpack/files/cdpack.sh Mon Aug 01 21:28:06 2005 +0000
+++ b/pkgtools/cdpack/files/cdpack.sh Mon Aug 01 21:47:43 2005 +0000
@@ -1,7 +1,7 @@
#!/bin/sh
-# $NetBSD: cdpack.sh,v 1.9 2003/08/03 15:17:51 dmcmahill Exp $
+# $NetBSD: cdpack.sh,v 1.10 2005/08/01 21:47:43 dmcmahill Exp $
#
-# Copyright (c) 2001, 2002, 2003 Dan McMahill, All rights reserved.
+# Copyright (c) 2001, 2002, 2003, 2005 Dan McMahill, All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -40,6 +40,10 @@
TMPDIR=${TMPDIR:-/tmp}
TMP=${TMPDIR}/${prog}.$$
+AWK=${AWK:-@AWK@}
+EXPR="@EXPR@"
+SORT="@SORT@"
+TSORT="@TSORT@"
depf=$TMP/depf
depf2=$TMP/depf2
@@ -59,9 +63,10 @@
usage(){
echo " "
echo "$prog - generates ISO9660 images for a multi-cd binary package collection"
- echo "Usage: $prog [-ac | -ec] [-af | -ef] [-dvd] [-h|--help] [-l logfile] [-dnRvV] "
+ echo "Usage: $prog [-ac | -ec] [-af | -ef] [-dvd] [-h|--help] [-l logfile] [-dnRvV]"
+ echo " [-o opsys] [-m machine] [-r release]"
echo " [-x dir] [-X dir] packages_directory cdimage_directory"
- echo "Example: $prog /usr/pkgsrc/packages/netbsd-1.5/alpha/All /images/netbsd-1.5/alpha"
+ echo "Example: $prog /usr/pkgsrc/packages/All /images/netbsd-1.5/alpha"
echo "Please refer to the manual page for complete documentation."
echo " "
}
@@ -90,8 +95,11 @@
}
ADD_README=no
+ARCH=`uname -m`
DEBUG=no
DUP=yes
+OS=`uname -s`
+RELEASE=`uname -r`
VERBOSE=no
VERSION=no
USE_XTRA=no
@@ -141,22 +149,38 @@
-h|--help) usage
exit 0
;;
+
# log file for the output of mkisofs -v -v
-l) mkisofslog=$2
shift 2
;;
+ # target machine architecture for these packages
+ -m) ARCH=$2
+ shift 2
+ ;;
+
# do not duplicate packages to avoid inter-CD dependencies
-n) DUP=no
shift
;;
+ # target os for these packages
+ -o) OS=$2
+ shift 2
+ ;;
+
Home |
Main Index |
Thread Index |
Old Index