Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

2
pkgtools/pkgclean/DESCR Normal file
View File

@@ -0,0 +1,2 @@
pkgclean cleans up your pkgsrc by removing the work directories.
It's a fast alternative for ``cd /usr/pkgsrc && make clean''.

View File

@@ -0,0 +1,32 @@
# $NetBSD: Makefile,v 1.16 2012/09/11 23:19:38 asau Exp $
DISTNAME= pkgclean-20051116
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Quickly clean up all work directories in pkgsrc
PKG_INSTALLATION_TYPES= overwrite pkgviews
NO_CONFIGURE= yes
NO_BUILD= yes
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
do-extract:
${RUN}${CP} -R ${FILESDIR} ${WRKSRC}
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/pkgclean.sh ${DESTDIR}${PREFIX}/bin/pkgclean
${INSTALL_MAN} ${WRKSRC}/pkgclean.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/pkgclean.1
SUBST_CLASSES+= path
SUBST_STAGE.path= post-patch
SUBST_FILES.path= pkgclean.sh pkgclean.1
SUBST_SED.path+= -e 's,@SH@,${SH},g'
SUBST_SED.path+= -e 's,@PKGSRCDIR@,${PKGSRCDIR},g'
SUBST_MESSAGE.path= Adjusting pkgsrc directory.
.include "../../mk/bsd.pkg.mk"

3
pkgtools/pkgclean/PLIST Normal file
View File

@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.2 2005/01/18 22:32:01 tv Exp $
bin/pkgclean
man/man1/pkgclean.1

View File

@@ -0,0 +1,56 @@
.\"
.\" Copyright (c) 2004 Peter Postma <peter@pointless.nl>
.\" 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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 November 16, 2005
.Dt PKGCLEAN 1
.Sh NAME
.Nm pkgclean
.Nd clean up pkgsrc
.Sh SYNOPSIS
.Nm
.Op Ar work-directory
.Sh DESCRIPTION
.Nm
cleans up your pkgsrc by removing the work directories.
It's a fast alternative for
.Dq cd @PKGSRCDIR@ && make clean .
.Pp
A custom
.Ar work-directory
(such as "work.i386") can be listed on the command line.
By default, it removes the "work" directories.
.Pp
.Nm
uses
.Pa @PKGSRCDIR@
by default.
You may specify a different path by setting
the environment variable
.Pa PKGSRCDIR .
.Sh SEE ALSO
http://www.pkgsrc.org/
.Sh AUTHORS
.An Peter Postma Aq peter@pointless.nl ,
.An Roland Illig Aq rillig@NetBSD.org .

View File

@@ -0,0 +1,76 @@
#! @SH@
# $NetBSD: pkgclean.sh,v 1.3 2008/04/29 05:46:08 martin Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Roland Illig <rillig@NetBSD.org>.
#
# 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.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``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.
#
#
# Command line parsing
#
pkgsrcdir=${PKGSRCDIR-@PKGSRCDIR@}
case $# in
0) wrkdir_basename="work";;
1) wrkdir_basename="$1";;
esac
#
# Sanity checks
#
case $pkgsrcdir in
/*) ;;
*) echo "$0: error: PKGSRCDIR must be an absolute path." 1>&2
exit 1;;
esac
case $wrkdir_basename in
*/*) echo "$0: error: wrkdir_basename must not contain slashes." 1>&2
exit 1;;
esac
#
# Clean up the pkgsrc directory
#
for wrkdir in "${pkgsrcdir}"/*/*/"${wrkdir_basename}"; do
case $wrkdir in
"${pkgsrcdir}/*/*/${wrkdir_basename}") continue;;
esac
echo "===> Cleaning in ${wrkdir}"
# When WRKOBJDIR is set, ${wrkdir_basename} is just a symlink to
# a real directory, so both must be removed properly.
if real_wrkdir=`cd "${wrkdir}"/. 2>/dev/null && exec pwd`; then
rm -rf "${real_wrkdir}"
fi
rm -rf "${wrkdir}"
done