summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authordillo <dillo@pkgsrc.org>2007-08-29 14:15:50 +0000
committerdillo <dillo@pkgsrc.org>2007-08-29 14:15:50 +0000
commit83f66d34c7d229aeca75ef38bc81020c533a2c48 (patch)
tree7b5748b62629cc75b6b8501b46e7d076b2d7a44f /pkgtools
parent6a104009e4d15508f0d7a44e1707e8adcbf00706 (diff)
downloadpkgsrc-83f66d34c7d229aeca75ef38bc81020c533a2c48.tar.gz
Add FILE_NAME, the name of the binary package file.
Prompted by Jeremy, okayed by Joerg.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/files/info/show.c12
-rw-r--r--pkgtools/pkg_install/files/lib/pkg_summary.57
-rw-r--r--pkgtools/pkg_install/files/lib/pkg_summary.cat56
3 files changed, 20 insertions, 5 deletions
diff --git a/pkgtools/pkg_install/files/info/show.c b/pkgtools/pkg_install/files/info/show.c
index a1cc73a2b83..10b79bc01bb 100644
--- a/pkgtools/pkg_install/files/info/show.c
+++ b/pkgtools/pkg_install/files/info/show.c
@@ -1,4 +1,4 @@
-/* $NetBSD: show.c,v 1.17 2007/08/15 02:08:40 joerg Exp $ */
+/* $NetBSD: show.c,v 1.18 2007/08/29 14:15:50 dillo Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp";
#else
-__RCSID("$NetBSD: show.c,v 1.17 2007/08/15 02:08:40 joerg Exp $");
+__RCSID("$NetBSD: show.c,v 1.18 2007/08/29 14:15:50 dillo Exp $");
#endif
#endif
@@ -397,6 +397,14 @@ show_summary(package_t *plist, const char *binpkgfile)
var_copy_list(BUILD_INFO_FNAME, bi_vars);
if (binpkgfile != NULL && stat(binpkgfile, &st) == 0) {
+ const char *base;
+
+ base = strrchr(binpkgfile, '/');
+ if (base == NULL)
+ base = binpkgfile;
+ else
+ base++;
+ printf("FILE_NAME=%s\n", base);
printf("FILE_SIZE=%" MY_PRIu64 "\n", (uint64_t)st.st_size);
/* XXX: DIGETS */
}
diff --git a/pkgtools/pkg_install/files/lib/pkg_summary.5 b/pkgtools/pkg_install/files/lib/pkg_summary.5
index be3bf2bb720..3213d81d219 100644
--- a/pkgtools/pkg_install/files/lib/pkg_summary.5
+++ b/pkgtools/pkg_install/files/lib/pkg_summary.5
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_summary.5,v 1.6 2007/04/16 12:55:35 joerg Exp $
+.\" $NetBSD: pkg_summary.5,v 1.7 2007/08/29 14:15:50 dillo Exp $
.\"
.\" Copyright (c) 2006 The NetBSD Foundation
.\"
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 5, 2007
+.Dd August 29, 2007
.Dt PKG_SUMMARY 5
.Os
.Sh NAME
@@ -66,6 +66,9 @@ If missing, this package has no dependencies.
.It Ev DESCRIPTION
(required) A more detailed description of the package.
.\" DIGEST
+.It Ev FILE_NAME
+(optional) The name of the binary package file. If not given,
+PKGNAME.tgz can be assumed.
.It Ev FILE_SIZE
(optional) The size of the binary package file, in bytes.
.It Ev HOMEPAGE
diff --git a/pkgtools/pkg_install/files/lib/pkg_summary.cat5 b/pkgtools/pkg_install/files/lib/pkg_summary.cat5
index b6ed9dd2115..8e1603a72e6 100644
--- a/pkgtools/pkg_install/files/lib/pkg_summary.cat5
+++ b/pkgtools/pkg_install/files/lib/pkg_summary.cat5
@@ -36,6 +36,10 @@ DDEESSCCRRIIPPTTIIOONN
DESCRIPTION
(required) A more detailed description of the package.
+ FILE_NAME
+ (optional) The name of the binary package file. If not given,
+ PKGNAME.tgz can be assumed.
+
FILE_SIZE
(optional) The size of the binary package file, in bytes.
@@ -96,4 +100,4 @@ SSEEEE AALLSSOO
HHIISSTTOORRYY
The ppkkgg__ssuummmmaarryy format was first officially documented in April 2006.
-NetBSD 4.0 February 5, 2007 NetBSD 4.0
+NetBSD 4.0 August 29, 2007 NetBSD 4.0