pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Add changes-entry target, which adds an entry for t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/30d7bc08c382
branches:  trunk
changeset: 495412:30d7bc08c382
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Wed Jun 08 22:44:08 2005 +0000

description:
Add changes-entry target, which adds an entry for the current package
into pkgsrc/doc/CHANGES.
The type of the entry depends on what CTYPE is set to, which defaults
to "Updated".  Other possible values are "Added", "Renamed", "Moved",
and "Removed". An example usage would be:
        cd /usr/pkgsrc/category/package
        make changes-entry CTYPE=Added
after you added a new package, and similar for the others.
If NETBSD_LOGIN_NAME is not set in /etc/mk.conf, it defaults to
your local login name.

diffstat:

 mk/bsd.pkg.mk |  23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r d4426230066b -r 30d7bc08c382 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Wed Jun 08 22:36:52 2005 +0000
+++ b/mk/bsd.pkg.mk     Wed Jun 08 22:44:08 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1687 2005/06/04 20:56:47 rillig Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1688 2005/06/08 22:44:08 wiz Exp $
 #
 # This file is in the public domain.
 #
@@ -4844,3 +4844,24 @@
        @${ECHO} ${_TOOLS_VARNAME.${_t_}:Q}=${${_TOOLS_VARNAME.${_t_}}:Q:Q}
 .  endif
 .endfor
+
+CTYPE?=        Updated
+.if !empty(CTYPE:MUpdated)
+_CTYPE2=       " to "${PKGVERSION:Q}
+.elif !empty(CTYPE:MAdded)
+_CTYPE2=       " version "${PKGVERSION:Q}
+.elif !empty(CTYPE:MRenamed) || !empty(CTYPE:MMoved)
+_CTYPE2=       " to XXX"
+.else
+_CTYPE2=
+.endif
+_PKGPATH=      ${.CURDIR:S/${_PKGSRCDIR}\///}
+# override in /etc/mk.conf with your NetBSD login if different
+.if !defined(NETBSD_LOGIN_NAME)
+NETBSD_LOGIN_NAME!=    id -nu
+.endif
+CDATE!=                date -u +%Y-%m-%d
+.PHONY: changes-entry
+changes-entry:
+       @${ECHO} "      "${CTYPE:Q}" "${_PKGPATH:Q}${_CTYPE2}" ["${NETBSD_LOGIN_NAME:Q}" "${CDATE:Q}"]"\
+               >> ${_PKGSRCDIR}/doc/CHANGES



Home | Main Index | Thread Index | Old Index