summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2003-07-24 22:27:16 +0000
committerdmcmahill <dmcmahill>2003-07-24 22:27:16 +0000
commit88176039da0086a904805aaccdde4d81ba8cc5f7 (patch)
treec73047b8aaab37942e893601a338268fd336d24b /mk
parent6849c9d542745ce0ffd564bcedc8e2d4a573dc5a (diff)
downloadpkgsrc-88176039da0086a904805aaccdde4d81ba8cc5f7.tar.gz
- add HOMEPAGE as the last field in the INDEX file.
- make the paths be relative to PKGSRCDIR as opposed to absolute. - some cleanup/simplification of the awk code.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk10
-rwxr-xr-xmk/scripts/genindex.awk50
2 files changed, 25 insertions, 35 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 5fe6544c9f8..817ae5a1e7c 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1222 2003/07/23 22:02:48 jmmv Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1223 2003/07/24 22:27:16 dmcmahill Exp $
#
# This file is in the public domain.
#
@@ -4122,10 +4122,10 @@ print-summary-data:
fi;
@${ECHO} "maintainer ${PKGPATH} ${MAINTAINER}"
@${ECHO} "categories ${PKGPATH} ${CATEGORIES}"
- @if [ -f ${DESCR_SRC} ]; then \
- ${ECHO} "descr ${PKGPATH} ${DESCR_SRC}"; \
- else \
- ${ECHO} "descr ${PKGPATH} /dev/null"; \
+ @if [ -f ${DESCR_SRC} ]; then \
+ ${ECHO} "descr ${PKGPATH} ${DESCR_SRC:S;${_PKGSRCDIR}/;;g}"; \
+ else \
+ ${ECHO} "descr ${PKGPATH} /dev/null"; \
fi
@${ECHO} "prefix ${PKGPATH} ${PREFIX}"
.endif
diff --git a/mk/scripts/genindex.awk b/mk/scripts/genindex.awk
index b21fcc2cf41..b7ae234fd25 100755
--- a/mk/scripts/genindex.awk
+++ b/mk/scripts/genindex.awk
@@ -1,5 +1,5 @@
#!/usr/bin/awk -f
-# $NetBSD: genindex.awk,v 1.1 2003/07/23 09:41:29 dmcmahill Exp $
+# $NetBSD: genindex.awk,v 1.2 2003/07/24 22:27:17 dmcmahill Exp $
#
# Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -124,25 +124,22 @@ BEGIN {
}
/^categories /{
- dir = $2;
- gsub(/^categories[ \t]*/, "");
- tmp = substr($0, length($1) + 1);
- gsub(/^[ \t]*/, "", tmp);
- categories[dir] = tmp;
+ categories[$2] = substr($0, index($0, $3));
next;
}
/^comment /{
- dir = $2;
- gsub(/^comment[ \t]*/, "");
- tmp = substr($0, length($1) + 1);
- gsub(/^[ \t]*/, "", tmp);
- comment[dir] = tmp;
+ comment[$2] = substr($0, index($0, $3));
next;
}
/^descr /{
- descr[$2] = $3;
+ descr[$2] = substr($0, index($0, $3));
+ next;
+}
+
+/^homepage /{
+ homepage[$2] = substr($0, index($0, $3));
next;
}
@@ -163,40 +160,33 @@ BEGIN {
}
/^license /{
- license[$2] = $3;
+ license[$2] = substr($0, index($0, $3));
next;
}
/^maintainer /{
- maintainer[$2] = $3;
+ maintainer[$2] = substr($0, index($0, $3));
next;
}
/^notfor /{
- dir = $2;
- gsub(/^notfor[ \t]*/, "");
- tmp = substr($0, length($1) + 1);
- gsub(/^[ \t]*/, "", tmp);
- notfor[dir] = tmp;
+ notfor[$2] = substr($0, index($0, $3));
next;
}
/^onlyfor /{
- dir = $2;
- gsub(/^onlyfor[ \t]*/, "");
- tmp = substr($0, length($1) + 1);
- gsub(/^[ \t]*/, "", tmp);
- onlyfor[dir] = tmp;
+ onlyfor[$2] = substr($0, index($0, $3));
next;
}
/^prefix /{
- prefix[$2] = $3;
+ prefix[$2] = substr($0, index($0, $3));
next;
}
/^wildcard /{
- wildcard[$2] = $3;
+ wildcard[$2] = substr($0, index($0, $3));
+ next;
}
#
@@ -243,14 +233,13 @@ END {
# Output format:
# package-name|package-path|installation-prefix|comment| \
# description-file|maintainer|categories|build deps|run deps|for arch| \
-# not for opsys
+# not for opsys|homepage
pkgcnt = 0;
for (toppkg in topdepends){
pkgcnt++;
- pkgdir = PKGSRCDIR "/" toppkg;
printf("%s|", pkgdir2name[toppkg]) | indexf;
- printf("%s|", pkgdir) | indexf;
+ printf("%s|", toppkg) | indexf;
printf("%s|", prefix[toppkg]) | indexf;
printf("%s|", comment[toppkg]) | indexf;
printf("%s|", descr[toppkg]) | indexf;
@@ -263,7 +252,8 @@ END {
gsub(/ $/, "", flatdepends[toppkg]);
printf("%s|", flatdepends[toppkg]) | indexf;
printf("%s|", onlyfor[toppkg]) | indexf;
- printf("%s", notfor[toppkg]) | indexf;
+ printf("%s|", notfor[toppkg]) | indexf;
+ printf("%s", homepage[toppkg]) | indexf;
printf("\n") | indexf;
}
close(indexf);