Date: Wed, 5 Dec 2007 21:25:17 +0100 (CET) From: Baptiste Grenier <gwarf@gwarf.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/118451: [NEW PORT] pydf: a python implementation of df Message-ID: <20071205202517.4A5043F433@arakis.gwarf.org> Resent-Message-ID: <200712052040.lB5Ke4lu090329@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 118451 >Category: ports >Synopsis: [NEW PORT] pydf: a python implementation of df >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Dec 05 20:40:04 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Baptiste Grenier >Release: FreeBSD 6.2-RELEASE i386 >Organization: >Environment: System: FreeBSD arakis.gwarf.org 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: pydf is all-singing, all-dancing, fully colourised df(1)-clone written in python. >How-To-Repeat: >Fix: # 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: # # pydf # pydf/Makefile # pydf/files # pydf/files/pkg-message.in # pydf/files/patch-pydf # pydf/pkg-descr # pydf/distinfo # echo c - pydf mkdir -p pydf > /dev/null 2>&1 echo x - pydf/Makefile sed 's/^X//' >pydf/Makefile << 'END-of-pydf/Makefile' X# New ports collection makefile for: pydf X# Date created: 29 November 2007 X# Whom: Baptiste Grenier <gwarf@gwarf.org> X# X# $FreeBSD$ X# X XPORTNAME= pydf XPORTVERSION= 5 XCATEGORIES= sysutils XMASTER_SITES= http://kassiopeia.juls.savba.sk/~garabik/software/pydf/ XDISTNAME= pydf_5 X XMAINTAINER= gwarf@gwarf.org XCOMMENT= A python implementation of df X XSUB_FILES= pkg-message XPKGMESSAGE= ${WRKDIR}/pkg-message X XPLIST_FILES= bin/pydf etc/pydfrc.sample X XUSE_PYTHON= true XNO_BUILD= yes X XMAN1= pydf.1 XMANCOMPRESSED= no X XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} X Xdo-install: X ${INSTALL_SCRIPT} ${WRKSRC}/pydf ${PREFIX}/bin X ${INSTALL_DATA} ${WRKSRC}/pydfrc ${PREFIX}/etc/pydfrc.sample X ${INSTALL_MAN} ${WRKSRC}/pydf.1 ${PREFIX}/man/man1 X Xpost-install: X @if [ ! -f ${PREFIX}/etc/pydfrc ]; then \ X ${ECHO_MSG} ; \ X ${CAT} ${PKGMESSAGE} ; \ X ${ECHO_MSG} ; \ X fi X X.include <bsd.port.mk> END-of-pydf/Makefile echo c - pydf/files mkdir -p pydf/files > /dev/null 2>&1 echo x - pydf/files/pkg-message.in sed 's/^X//' >pydf/files/pkg-message.in << 'END-of-pydf/files/pkg-message.in' X X========================================================= X XPlease copy the file %%PREFIX%%/etc/pydfrc.sample Xto %%PREFIX%%/etc/pydfrc and edit your configuration. X X========================================================= X END-of-pydf/files/pkg-message.in echo x - pydf/files/patch-pydf sed 's/^X//' >pydf/files/patch-pydf << 'END-of-pydf/files/patch-pydf' X--- pydf.original Tue Dec 4 23:02:26 2007 X+++ pydf Tue Dec 4 23:02:14 2007 X@@ -1,4 +1,4 @@ X-#! /usr/bin/python X+#! /usr/local/bin/python X X import sys, os, string, types, commands, struct X from optparse import OptionParser X@@ -166,7 +166,7 @@ X #end of default definitions X X # read configuration file X-for i in ["/etc/pydfrc", os.environ['HOME']+"/.pydfrc"]: X+for i in ["/usr/local/etc/pydfrc", os.environ['HOME']+"/.pydfrc"]: X if os.path.isfile(i): X execfile(i) X X@@ -336,9 +336,9 @@ X except OSError, IOError: X status = 10*[0] X X- fs_blocksize = status[F_BSIZE] X+ fs_blocksize = status[F_FRSIZE] X if fs_blocksize == 0: X- fs_blocksize = status[F_FRSIZE] X+ fs_blocksize = status[F_BSIZE] X free = status[F_BFREE] X used = long(status[F_BLOCKS]-free) X size = status[F_BLOCKS] X@@ -351,7 +351,7 @@ X avail_f = myformat(avail, sizeformat, fs_blocksize) X X try: X- perc = round(100.*used/size, 1) X+ perc = round(100.*used/(avail+used), 1) X except ZeroDivisionError: X perc = 0 X perc_f = str(perc) X@@ -419,7 +419,7 @@ X "test if fs (as type) is a special one" X "in addition, a filesystem is special if it has number of blocks equal to 0" X fs = fs.lower() X- return fs in [ "tmpfs", "devpts", "proc", "sysfs", "usbfs" ] X+ return fs in [ "tmpfs", "devpts", "proc", "sysfs", "usbfs", "procfs", "devfs" ] X X X END-of-pydf/files/patch-pydf echo x - pydf/pkg-descr sed 's/^X//' >pydf/pkg-descr << 'END-of-pydf/pkg-descr' Xpydf is all-singing, all-dancing, fully colourised df(1)-clone Xwritten in python. X XWWW: http://kassiopeia.juls.savba.sk/~garabik/software/pydf/ END-of-pydf/pkg-descr echo x - pydf/distinfo sed 's/^X//' >pydf/distinfo << 'END-of-pydf/distinfo' XMD5 (pydf_5.tar.gz) = d429dbf726e29ace398980fc8b80eb30 XSHA256 (pydf_5.tar.gz) = d9a845ce7f0f446fb3a426e7b9c6c7b6ea333e740dc558d132f814257e5d1d43 XSIZE (pydf_5.tar.gz) = 11901 END-of-pydf/distinfo exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071205202517.4A5043F433>