From c31622c1e667c73cd3d08b5c656df0d5ca1e2216 Mon Sep 17 00:00:00 2001
From: Dima Dorfman
Date: Sun, 24 Jun 2001 23:46:26 +0000
Subject: Add readlink, a tool to dereference a symbol link and print the name
of the target.
---
sysutils/Makefile | 1 +
sysutils/readlink/Makefile | 72 +++++++++++++++++++++++++++++++++++++++
sysutils/readlink/distinfo | 1 +
sysutils/readlink/files/tarignore | 1 +
sysutils/readlink/pkg-comment | 1 +
sysutils/readlink/pkg-descr | 8 +++++
sysutils/readlink/pkg-plist | 1 +
7 files changed, 85 insertions(+)
create mode 100644 sysutils/readlink/Makefile
create mode 100644 sysutils/readlink/distinfo
create mode 100644 sysutils/readlink/files/tarignore
create mode 100644 sysutils/readlink/pkg-comment
create mode 100644 sysutils/readlink/pkg-descr
create mode 100644 sysutils/readlink/pkg-plist
diff --git a/sysutils/Makefile b/sysutils/Makefile
index bb3da676fe60..3f1ebf3ff099 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -119,6 +119,7 @@
SUBDIR += rdate
SUBDIR += rotate
SUBDIR += rtty
+ SUBDIR += readlink
SUBDIR += rmonitor
SUBDIR += roottail
SUBDIR += ruby-quota
diff --git a/sysutils/readlink/Makefile b/sysutils/readlink/Makefile
new file mode 100644
index 000000000000..eb1097cde3d3
--- /dev/null
+++ b/sysutils/readlink/Makefile
@@ -0,0 +1,72 @@
+# New ports collection makefile for: readlink
+# Date created: 16 June 2001
+# Whom: dd
+#
+# $FreeBSD$
+#
+
+PORTNAME= readlink
+PORTVERSION= 20010616
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_LOCAL} \
+ http://www.unixfreak.org/~dima/distfiles/
+MASTER_SITE_SUBDIR= dd
+
+MAINTAINER= dd@FreeBSD.org
+
+MAN1= readlink.1
+MANCOMPRESSED= maybe
+
+# MAN page COMPression SUFFIX
+.if !defined(NOMANCOMPRESS)
+MANCOMPSUFFIX= .gz
+.else
+MANCOMPSUFFIX=
+.endif
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/readlink ${PREFIX}/bin/readlink
+.for __s in ${MANSECTS}
+.for __m in ${MAN${__s}:S/$/${MANCOMPSUFFIX}/}
+ @${INSTALL_MAN} ${WRKSRC}/${__m} ${PREFIX}/man/man${__s}/${__m}
+.endfor
+.endfor
+
+#
+# Ports build/install stuff stops here. Tarball creation stuff begins here.
+#
+.include
+CVS_CMD?= cvs -z3
+CVS_DATE= Sun Jun 16 15:58:14 PDT 2001
+CVS_SITES?= anoncvs@anoncvs.openbsd.org:/cvs
+CVS_MODULE= src/usr.bin/readlink
+
+#
+# CVS checkout stuff mostly stolen from security/openssh-askpass port by
+# kris@freebsd.org
+#
+tarball:
+ @${MKDIR} ${DISTDIR}/${PKGNAME} && \
+ cd ${DISTDIR}/${PKGNAME}; \
+ for CVS_SITE in ${CVS_SITES}; do \
+ ${ECHO_MSG} ">> Attempting to check out from $${CVS_SITE}."; \
+ if ${CVS_CMD} -d $${CVS_SITE} co -D "${CVS_DATE}" \
+ ${CVS_MODULE}; then \
+ cd ${DISTDIR}; \
+ ${ECHO_MSG} ">> Creating dist tarball in ${DISTDIR}"; \
+ ${ECHO_MSG} ">> \"${PKGNAME}.tar.gz\"."; \
+ ${MV} ${PKGNAME}/${CVS_MODULE} \
+ ${PKGNAME}/${CVS_MODULE:H}/${PKGNAME}; \
+ ${TAR} -cz \
+ -X ${FILESDIR}/tarignore \
+ -f ${PKGNAME}.tar.gz \
+ -C ${PKGNAME}/${CVS_MODULE:H} \
+ ${PKGNAME}; \
+ exit; \
+ fi \
+ done; \
+ ${RMDIR} ${DISTDIR}/${PKGNAME}; \
+ ${ECHO_MSG} ">> CVS checkout failed."; \
+ exit 1;
+
+.include
diff --git a/sysutils/readlink/distinfo b/sysutils/readlink/distinfo
new file mode 100644
index 000000000000..9949af4a647e
--- /dev/null
+++ b/sysutils/readlink/distinfo
@@ -0,0 +1 @@
+MD5 (readlink-20010616.tar.gz) = 63962889ba099fe004828ddeb7b8d72c
diff --git a/sysutils/readlink/files/tarignore b/sysutils/readlink/files/tarignore
new file mode 100644
index 000000000000..7ac83b287f2f
--- /dev/null
+++ b/sysutils/readlink/files/tarignore
@@ -0,0 +1 @@
+CVS
diff --git a/sysutils/readlink/pkg-comment b/sysutils/readlink/pkg-comment
new file mode 100644
index 000000000000..dbb66dead796
--- /dev/null
+++ b/sysutils/readlink/pkg-comment
@@ -0,0 +1 @@
+Dereference a symbol link and print the name of the target
diff --git a/sysutils/readlink/pkg-descr b/sysutils/readlink/pkg-descr
new file mode 100644
index 000000000000..286d9bb773ba
--- /dev/null
+++ b/sysutils/readlink/pkg-descr
@@ -0,0 +1,8 @@
+The readlink utility when invoked with the pathname of a symbolic link as
+its argument dereferences the symbolic link and prints the name of target
+on standard output. If readlink is invoked with an argument other than
+the pathname of a symbolic link, it exits with a nonzero exit code with-
+out printing anything.
+
+In other words, this is a command-line interface to the readlink(2)
+system call.
diff --git a/sysutils/readlink/pkg-plist b/sysutils/readlink/pkg-plist
new file mode 100644
index 000000000000..c87748964a09
--- /dev/null
+++ b/sysutils/readlink/pkg-plist
@@ -0,0 +1 @@
+bin/readlink
--
cgit v1.2.3