Date: Wed, 26 Jan 2005 19:57:10 +0100 (CET) From: Emanuel Haupt <ehaupt@critical.ch> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/76722: New port: misc/ddate Message-ID: <200501261857.j0QIvADK043968@beaver.critical.ch> Resent-Message-ID: <200501261900.j0QJ0cDi008034@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 76722 >Category: ports >Synopsis: New port: misc/ddate >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Jan 26 19:00:37 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Emanuel Haupt >Release: FreeBSD 5.3-RELEASE-p5 i386 >Organization: >Environment: System: FreeBSD beaver.critical.ch 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #0: Mon Jan 17 18:40:53 CET 2005 build@beaver.critical.ch:/home/build/obj/usr/src-release/src/sys/BEAVER i386 >Description: New port: misc/ddate ddate prints the date in Discordian date format. If called with no arguments, ddate will get the current system date, convert this to the Discordian date format and print this on the stan- dard output. Alternatively, a Gregorian date may be specified on the command line, in the form of a numerical day, month and year. ---shar start--- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # ddate # ddate/Makefile # ddate/files # ddate/files/patch-misc-utils-ddate.c # ddate/distinfo # ddate/pkg-descr # echo c - ddate mkdir -p ddate > /dev/null 2>&1 echo x - ddate/Makefile sed 's/^X//' >ddate/Makefile << 'END-of-ddate/Makefile' X# New ports collection makefile for: ddate X# Date created: 26 January 2005 X# Whom: Emanuel Haupt <ehaupt@critical.ch> X# X# $FreeBSD$ X# X XPORTNAME= ddate XPORTVERSION= 2.12q XCATEGORIES= misc XMASTER_SITES= http://www.kernel.org/pub/linux/utils/util-linux/ XDISTNAME= util-linux-${PORTVERSION} XEXTRACT_SUFX= .tar.bz2 X XMAINTAINER= ehaupt@critical.ch XCOMMENT= Command to print the date in Discordian date format X XPLIST_FILES= bin/ddate X XUSE_BZIP2= yes XMAN1= ddate.1 XGNU_CONFIGURE= yes X Xpre-everything:: X @${ECHO} "" X @${ECHO} "You may define the following build options:" X @${ECHO} "" X @${ECHO} " US_FORMAT if you wish to use the US format for" X @${ECHO} " aneristic dates (m-d-y), as opposed to" X @${ECHO} "" X @${ECHO} " PRAISE_BOB if you wish ddate to contain SubGenius X @${ECHO} " slogans" X @${ECHO} "" X @${ECHO} " KILL_BOB if you are ideologically, theologically or" X @${ECHO} " otherwise opposed to the Church of the" X @${ECHO} " SubGenius and do not wish your copy of" X @${ECHO} " ddate to contain code for counting down" X @${ECHO} " to X-Day" X @${ECHO} "" X @${ECHO} " OLD_FORMAT if you wish ddate to print the date in the" X @${ECHO} " same format as Druel's original ddate when" X @${ECHO} " called in immediate mode" X @${ECHO} "" X Xpost-patch: X.if defined(US_FORMAT) X ${SED} -e 's/^\/\*\ \(#define\ US_FORMAT\)\ \*\//\1/' ${WRKSRC}/misc-utils/ddate.c > ${WRKSRC}/misc-utils/ddate.c.new X ${MV} ${WRKSRC}/misc-utils/ddate.c.new ${WRKSRC}/misc-utils/ddate.c X.endif X.if defined(PRAISE_BOB) X ${SED} -e 's/^\/\*\(#define\ PRAISE_BOB\ 13013\)\*\//\1/' ${WRKSRC}/misc-utils/ddate.c > ${WRKSRC}/misc-utils/ddate.c.new X ${MV} ${WRKSRC}/misc-utils/ddate.c.new ${WRKSRC}/misc-utils/ddate.c X.endif X.if defined(KILL_BOB) X ${SED} -e 's/^\(#define\ KILL_BOB\ 13013\)/\/* \1 *\//' ${WRKSRC}/misc-utils/ddate.c > ${WRKSRC}/misc-utils/ddate.c.new X ${MV} ${WRKSRC}/misc-utils/ddate.c.new ${WRKSRC}/misc-utils/ddate.c X.endif X.if !defined(OLD_FORMAT) X ${SED} -e 's/^\(#define\ OLD_IMMEDIATE_FMT\)/\/* \1 *\//' ${WRKSRC}/misc-utils/ddate.c > ${WRKSRC}/misc-utils/ddate.c.new X ${MV} ${WRKSRC}/misc-utils/ddate.c.new ${WRKSRC}/misc-utils/ddate.c X.endif X Xdo-build: X ${CC} ${WRKSRC}/misc-utils/ddate.c ${CFLAGS} -o ${WRKSRC}/misc-utils/${PORTNAME} X Xdo-install: X ${INSTALL_PROGRAM} -m 0555 ${WRKSRC}/misc-utils/${PORTNAME} ${PREFIX}/bin X ${INSTALL_MAN} ${WRKSRC}/misc-utils/ddate.1 ${MANPREFIX}/man/man1 X X.include <bsd.port.mk> END-of-ddate/Makefile echo c - ddate/files mkdir -p ddate/files > /dev/null 2>&1 echo x - ddate/files/patch-misc-utils-ddate.c sed 's/^X//' >ddate/files/patch-misc-utils-ddate.c << 'END-of-ddate/files/patch-misc-utils-ddate.c' X--- misc-utils/ddate.c.orig Wed Jan 26 16:09:58 2005 X+++ misc-utils/ddate.c Wed Jan 26 16:10:30 2005 X@@ -61,7 +61,7 @@ X #include <string.h> X #include <time.h> X #include <stdio.h> X-#include "nls.h" X+#include "../lib/nls.h" X #include "../defines.h" /* for util-linux-version */ X X #ifndef __GNUC__ END-of-ddate/files/patch-misc-utils-ddate.c echo x - ddate/distinfo sed 's/^X//' >ddate/distinfo << 'END-of-ddate/distinfo' XMD5 (util-linux-2.12q.tar.bz2) = 54320aa1abbce00c0dc030e2c3afe5d7 XSIZE (util-linux-2.12q.tar.bz2) = 1371087 END-of-ddate/distinfo echo x - ddate/pkg-descr sed 's/^X//' >ddate/pkg-descr << 'END-of-ddate/pkg-descr' XDdate prints the date in Discordian date format. X XIf called with no arguments, ddate will get the current system date, Xconvert this to the Discordian date format and print this on the stan- Xdard output. Alternatively, a Gregorian date may be specified on the Xcommand line, in the form of a numerical day, month and year. X XWWW: http://www.subgenius.com/ END-of-ddate/pkg-descr exit ---shar end--- >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501261857.j0QIvADK043968>