diff options
author | lippe <lippe@FreeBSD.org> | 2008-07-27 01:02:59 +0800 |
---|---|---|
committer | lippe <lippe@FreeBSD.org> | 2008-07-27 01:02:59 +0800 |
commit | 7901cda4e9d3695b316c794b1a0fe03247d64366 (patch) | |
tree | 0d5882c4581611832ca421da703129def69e3aa9 /x11 | |
parent | 351949dfd3846d60aac86d3bbc20e5d9189d1c05 (diff) | |
download | freebsd-ports-gnome-7901cda4e9d3695b316c794b1a0fe03247d64366.tar.gz freebsd-ports-gnome-7901cda4e9d3695b316c794b1a0fe03247d64366.tar.zst freebsd-ports-gnome-7901cda4e9d3695b316c794b1a0fe03247d64366.zip |
printscreen - Simple screenshot program for X11.
PR: ports/125369
Submitted by: Alex Kozlov <spam@rm-rf.kiev.ua>
Approved by: gabor (mentor, implicit)
Diffstat (limited to 'x11')
-rw-r--r-- | x11/printscreen/Makefile | 27 | ||||
-rw-r--r-- | x11/printscreen/files/printscreen.in | 13 | ||||
-rw-r--r-- | x11/printscreen/pkg-descr | 1 |
3 files changed, 41 insertions, 0 deletions
diff --git a/x11/printscreen/Makefile b/x11/printscreen/Makefile new file mode 100644 index 000000000000..a155d9bef8f7 --- /dev/null +++ b/x11/printscreen/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: printscreen +# Date created: 25 Jan 2006 +# Whom: Alex Kozlov <spam@rm-rf.kiev.ua> +# +# $FreeBSD$ +# + +PORTNAME= printscreen +PORTVERSION= 1.0 +CATEGORIES= x11 +DISTFILES= + +MAINTAINER= spam@rm-rf.kiev.ua +COMMENT= Simple screenshot program for X11 + +RUN_DEPENDS= xwd:${PORTSDIR}/x11/xwd \ + xwdtopnm:${PORTSDIR}/graphics/netpbm + +NO_WRKSUBDIR= yes +NO_BUILD= yes + +PLIST_FILES= bin/printscreen + +do-install: + @${INSTALL_SCRIPT} ${FILESDIR}/printscreen.in ${PREFIX}/bin/printscreen + +.include <bsd.port.mk> diff --git a/x11/printscreen/files/printscreen.in b/x11/printscreen/files/printscreen.in new file mode 100644 index 000000000000..da9238e43dcd --- /dev/null +++ b/x11/printscreen/files/printscreen.in @@ -0,0 +1,13 @@ +#!/bin/sh + +PATH=/bin:/usr/local/bin + +STOREDIR="${HOME}/.screenshots" +SHOTDATE="$(date +%Y.%m.%d-%H.%M.%S)" +SHOTNAME="${STOREDIR}/screenshot-${SHOTDATE}.png" + +if [ ! -d "${STOREDIR}" ]; then + mkdir "${STOREDIR}" +fi + +xwd -root | xwdtopnm 2>/dev/null | pnmtopng 2>/dev/null > "${SHOTNAME}" diff --git a/x11/printscreen/pkg-descr b/x11/printscreen/pkg-descr new file mode 100644 index 000000000000..108f7dbf2639 --- /dev/null +++ b/x11/printscreen/pkg-descr @@ -0,0 +1 @@ +Is a Simple screenshot program for X11 |