NetBSD pkgsrc (package source) is a package management system for
Unix-like operating systems
Getopt(1) is a program to help shell scripts parse command-line
parameters. It is for example included in the util-linux distribution
(versions up to 2.7.1) for Linux. But, there were some problems
with that getopt(1) implementation, as listed in the 'BUGS' section
of its man-page:
* Whatever getopt(3) has.
* Arguments containing white space or imbedded shell metacharacters
generally will not survive intact; this looks easy to fix but
isn't.
* The error message for an invalid option is identified as
coming from getopt rather than from the shell procedure
containing the invocation of getopt; this again is hard to
fix.
* The precise best way to use the set command to set the
arguments without disrupting the value(s) of shell options
varies from one shell version to another.
Additionally, the example in the manual-page does not run correctly
(at least not with any bash shell I have tried).
This implementation of getopt(1) solves some of these problems,
while still staying (for all practical purposes) completely compatible
with other getopt(1) implementations. It has replaced the old
util-linux version, but it should be useful for other Unixes too.
# $NetBSD: Makefile,v 1.11 2010/01/30 16:28:00 heinz Exp $
#
DISTNAME= getopt-1.1.4
CATEGORIES= misc
MASTER_SITES= http://software.frodo.looijaard.name/getopt/files/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://software.frodo.looijaard.name/getopt/
COMMENT= Program to help shell scripts parse command-line parameters
LICENSE= gnu-gpl-v2
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_TOOLS+= gmake
PKG_DESTDIR_SUPPORT= user-destdir
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/getopt ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/getopt.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
@comment $NetBSD: PLIST,v 1.1.1.1 2004/12/26 15:55:39 wiz Exp $
bin/getopt
man/man1/getopt.1
$NetBSD: distinfo,v 1.3 2008/01/15 23:59:09 wiz Exp $
SHA1 (getopt-1.1.4.tar.gz) = 8b9b329b3a8f5d52c91c0381616ecbd1ba291486
RMD160 (getopt-1.1.4.tar.gz) = 79fffccf1b48956bfc1fbb19c22c2d94adf10dff
Size (getopt-1.1.4.tar.gz) = 37163 bytes
SHA1 (patch-aa) = 33e467672d3f2b7a11a60c937dcb2aff032548eb
SHA1 (patch-ab) = 32b6b41c134c73ee743ea67928991de8fe4db23a