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.8. This change add...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4a7757d1fefd
branches:  trunk
changeset: 538099:4a7757d1fefd
user:      dmcmahill <dmcmahill%pkgsrc.org@localhost>
date:      Mon Jan 28 23:06:13 2008 +0000

description:
Update to cdpack-1.8.  This change adds the cddist utility which may
be used for creating a cd/dvd set containing a distfile archive.  No change
to the existing portions of the package.

diffstat:

 pkgtools/cdpack/DESCR           |    3 +
 pkgtools/cdpack/Makefile        |   27 +-
 pkgtools/cdpack/PLIST           |    4 +-
 pkgtools/cdpack/files/cddist.1  |  141 ++++++++++
 pkgtools/cdpack/files/cddist.sh |  533 ++++++++++++++++++++++++++++++++++++++++
 pkgtools/cdpack/files/cdpack.1  |    3 +-
 6 files changed, 698 insertions(+), 13 deletions(-)

diffs (truncated from 785 to 300 lines):

diff -r 3ae480af48aa -r 4a7757d1fefd pkgtools/cdpack/DESCR
--- a/pkgtools/cdpack/DESCR     Mon Jan 28 23:03:48 2008 +0000
+++ b/pkgtools/cdpack/DESCR     Mon Jan 28 23:06:13 2008 +0000
@@ -12,3 +12,6 @@
 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).
+
+The cddist utility in this package is used for creating an archive
+set of distfiles.
diff -r 3ae480af48aa -r 4a7757d1fefd pkgtools/cdpack/Makefile
--- a/pkgtools/cdpack/Makefile  Mon Jan 28 23:03:48 2008 +0000
+++ b/pkgtools/cdpack/Makefile  Mon Jan 28 23:06:13 2008 +0000
@@ -1,15 +1,14 @@
-# $NetBSD: Makefile,v 1.25 2007/11/28 16:18:01 mishka Exp $
+# $NetBSD: Makefile,v 1.26 2008/01/28 23:06:13 dmcmahill Exp $
 #
 
-DISTNAME=      cdpack-1.7
-PKGREVISION=   2
+DISTNAME=      cdpack-1.8
 CATEGORIES=    pkgtools
 MASTER_SITES=  # empty
 DISTFILES=     # empty
 
 MAINTAINER=    dmcmahill%NetBSD.org@localhost
 HOMEPAGE=      http://www.NetBSD.org/
-COMMENT=       Utility to create multi-cd binary package collections
+COMMENT=       Utility to create multi-cd/dvd binary package collections
 
 # for mkisofs
 DEPENDS+=      cdrtools-[0-9]*:../../sysutils/cdrtools
@@ -20,29 +19,35 @@
 
 USE_TOOLS+=    awk:run
 USE_TOOLS+=    expr:run
+USE_TOOLS+=    printf:run
 USE_TOOLS+=    sort:run
 USE_TOOLS+=    tsort:run
 
 INSTALLATION_DIRS=     bin libexec ${PKGMANDIR}/man1
 
 do-build:
+.for f in cdpack cddist
        ${SED}  -e 's;@prefix@;${PREFIX};g' \
                -e 's;@progver@;${PKGVERSION};g' \
                -e 's;@AWK@;${AWK};g' \
                -e 's;@EXPR@;${EXPR};g' \
+               -e 's;@PRINTF@;${PRINTF};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
+               ${FILESDIR}/${f}.sh > \
+               ${WRKSRC}/${f}
+       ${CHMOD} 755 ${WRKDIR}/${f}
+       ${SED} -e 's;@AWK@;${AWK};g' ${FILESDIR}/${f}.1 > \
+               ${WRKSRC}/${f}.1
+.endfor
        ${SED} -e 's;@AWK@;${AWK};g' ${FILESDIR}/cdgen.awk > \
                ${WRKSRC}/cdgen.awk
 
 do-install:
-       ${INSTALL_SCRIPT} ${WRKSRC}/cdpack ${PREFIX}/bin
+.for f in cdpack cddist
+       ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${PREFIX}/bin
+       ${INSTALL_MAN} ${WRKSRC}/${f}.1 ${PREFIX}/${PKGMANDIR}/man1
+.endfor
        ${INSTALL_SCRIPT} ${WRKSRC}/cdgen.awk ${PREFIX}/libexec
-       ${INSTALL_MAN} ${WRKSRC}/cdpack.1 ${PREFIX}/${PKGMANDIR}/man1
 
 .include "../../mk/bsd.pkg.mk"
diff -r 3ae480af48aa -r 4a7757d1fefd pkgtools/cdpack/PLIST
--- a/pkgtools/cdpack/PLIST     Mon Jan 28 23:03:48 2008 +0000
+++ b/pkgtools/cdpack/PLIST     Mon Jan 28 23:06:13 2008 +0000
@@ -1,4 +1,6 @@
-@comment $NetBSD: PLIST,v 1.2 2005/03/14 19:56:15 tv Exp $
+@comment $NetBSD: PLIST,v 1.3 2008/01/28 23:06:13 dmcmahill Exp $
+bin/cddist
 bin/cdpack
 libexec/cdgen.awk
+man/man1/cddist.1
 man/man1/cdpack.1
diff -r 3ae480af48aa -r 4a7757d1fefd pkgtools/cdpack/files/cddist.1
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/cdpack/files/cddist.1    Mon Jan 28 23:06:13 2008 +0000
@@ -0,0 +1,141 @@
+.\" $NetBSD: cddist.1,v 1.1 2008/01/28 23:06:13 dmcmahill Exp $
+.\"
+.\" Copyright (c) 2008 Dan McMahill, All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by Dan McMahill
+.\" 4. The name of the author may not be used to endorse or promote
+.\"    products derived from this software without specific prior written
+.\"    permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY DAN MCMAHILL
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd January 28, 2008
+.Dt CDDIST 1
+.Os
+.Sh NAME
+.Nm cddist
+.Nd produce multi-CD/DVD distfile archive images
+.Sh SYNOPSIS
+.Nm ""
+.Op -dvd
+.Op -h | --help
+.Op -l logfile
+.Op -dnRvV
+.Op -x common_directory
+.Op -X extras_directory
+.Ar distfiles_directory
+.Ar image_directory
+.Sh DESCRIPTION
+The
+.Nm
+utility produces ISO 9660 image files for
+a multiple CD/DVD archive of pkgsrc distfiles.
+.Pp
+The
+.Nm
+utility archives all files and directories found in the directory
+.Ar distfiles_directory
+specified on the command line.  The directory
+.Ar cd_image_directory
+is used as a staging area and the final ISO 9660 images are left in
+that directory.  A file,
+.Ar .index ,
+which lists the contents of each CD/DVD will be left in the root
+directory of each CD/DVD image.
+.Bl -tag -width "-x directory "
+.It Fl d
+Enable debugging by not deleting temporary files at the end of the
+run.  These files are left in TMPDIR.
+.It Fl dvd
+Create DVD sized images rather than the default CD-ROM sized images.
+.It Fl h
+.It Fl -help
+Displays a short usage message.
+.It Fl l Ar logfile
+Log the output of mkisofs -v -v to the file
+.Ar logfile .
+.It Fl R
+Generate a file,
+.Ar README.txt ,
+which will be placed in the root directory of each CD/DVD image.  This
+README file contains a small amount of information about the contents
+of the CD/DVD set.
+.It Fl v
+Be verbose.  Currently does not change things much.
+.It Fl V
+Print the program version number and exit.
+.It Fl x Ar directory
+Includes the contents of
+.Ar directory
+on each CD/DVD.  This is useful for README files, etc., which you want
+to be present on each CD/DVD in the set.
+.It Fl X Ar directory
+Includes the contents of
+.Ar directory
+on the last CD/DVD in the set.  This is useful for adding
+a pkgsrc.tar.gz tarball, i.e. a file which does not
+need to be on each CD/DVD.
+.El
+.Pp
+The
+.Nm
+utility exits 0 on success, and >0 if an error occurs.
+.Sh ENVIRONMENT
+.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
+.Dq Li /tmp .
+.El
+.Sh EXAMPLES
+This example takes all of the distfiles found in
+/usr/pkgsrc/distfiles and creates cd images in
+/u2/images/disk{1,2,...}.iso.  The directories
+/u2/images/disk{1,2,...} are used to create the ISO 9660 layouts.
+.D1 cddist /usr/pkgsrc/distfiles /u2/images
+.Pp
+To include a common set of files on all CD/DVD's, place them in a
+directory, /tmp/foo, in this example, and pass in the directory name
+with the
+.Fl x
+option.
+.Dl cddist -x /tmp/foo /usr/pkgsrc/distfiles /u2/images
+.Sh SEE ALSO
+.Xr cdpack 1
+.Xr mkisofs 1
+.Sh HISTORY
+The
+.Nm
+utility first appeared in the
+.Nx
+packages collection in January, 2008.
+.Sh AUTHORS
+The
+.Nm
+utility was written by Dan McMahill (dmcmahill%NetBSD.org@localhost).
diff -r 3ae480af48aa -r 4a7757d1fefd pkgtools/cdpack/files/cddist.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/cdpack/files/cddist.sh   Mon Jan 28 23:06:13 2008 +0000
@@ -0,0 +1,533 @@
+#!/bin/sh
+# $NetBSD: cddist.sh,v 1.1 2008/01/28 23:06:13 dmcmahill Exp $
+#
+# Copyright (c) 2008 Dan McMahill, All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#      This product includes software developed by Dan McMahill
+# 4. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior written
+#    permission.
+#
+# THIS SOFTWARE IS PROVIDED BY DAN MCMAHILL
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+# $0 = program name
+# $2 = distfiles directory (/usr/pkgsrc/distfiles)
+# $3 = output directory
+
+prog=cddist
+progver=@progver@
+
+TMPDIR=${TMPDIR:-/tmp}
+TMP=${TMPDIR}/${prog}.$$
+AWK=${AWK:-@AWK@}
+EXPR="@EXPR@"
+PRINTF="@PRINTF@"
+SORT="@SORT@"
+
+sizes=$TMP/sizes
+sorted=$TMP/sorted
+
+cdlist=$TMP/cdlist
+indexf=$TMP/indexf
+readme=$TMP/readme
+warnings=$TMP/warnings
+
+
+rm -fr $TMP
+mkdir -m 0700 $TMP
+if test $? -ne 0 ; then
+    echo "Could not create temporary directory $TMP"
+    exit 1
+fi
+
+touch $exclude
+



Home | Main Index | Thread Index | Old Index