pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils Add p5-Unburden-Home-Dir package.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4f2a8a4414c3
branches:  trunk
changeset: 358228:4f2a8a4414c3
user:      hauke <hauke%pkgsrc.org@localhost>
date:      Tue Feb 07 14:34:35 2017 +0000

description:
Add p5-Unburden-Home-Dir package.

unburden-home-dir allows users to move cache files from browsers,
etc. off their (nfs or ssd based) home directory, i.e. on a local
harddisk or tmpfs and replace them with a symbolic link to the new
location (e.g. on /tmp/ or /scratch/) upon login.

Optionally the contents of these directories and files can be removed
instead of moved.

diffstat:

 sysutils/Makefile                                                              |    3 +-
 sysutils/p5-Unburden-Home-Dir/DESCR                                            |    7 +
 sysutils/p5-Unburden-Home-Dir/Makefile                                         |  106 ++++++++++
 sysutils/p5-Unburden-Home-Dir/PLIST                                            |   22 ++
 sysutils/p5-Unburden-Home-Dir/distinfo                                         |   11 +
 sysutils/p5-Unburden-Home-Dir/files/unburden-home-dir.1                        |   86 ++++++++
 sysutils/p5-Unburden-Home-Dir/patches/patch-Xsession.d_25unburden-home-dir-xdg |   17 +
 sysutils/p5-Unburden-Home-Dir/patches/patch-Xsession.d_95unburden-home-dir     |   17 +
 sysutils/p5-Unburden-Home-Dir/patches/patch-bin_unburden-home-dir              |   51 ++++
 sysutils/p5-Unburden-Home-Dir/patches/patch-docs_unburden-home-dir.1.md        |   32 +++
 sysutils/p5-Unburden-Home-Dir/patches/patch-share_common.sh                    |   28 ++
 11 files changed, 379 insertions(+), 1 deletions(-)

diffs (truncated from 434 to 300 lines):

diff -r 23d140e70cfc -r 4f2a8a4414c3 sysutils/Makefile
--- a/sysutils/Makefile Tue Feb 07 14:04:52 2017 +0000
+++ b/sysutils/Makefile Tue Feb 07 14:34:35 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.688 2017/02/01 13:13:23 mef Exp $
+# $NetBSD: Makefile,v 1.689 2017/02/07 14:34:35 hauke Exp $
 #
 
 COMMENT=       System utilities
@@ -415,6 +415,7 @@
 SUBDIR+=       p5-Sys-Syslog
 SUBDIR+=       p5-Sys-Utmp
 SUBDIR+=       p5-UPS-Nut
+SUBDIR+=       p5-Unburden-Home-Dir
 SUBDIR+=       p5-Unix-ConfigFile
 SUBDIR+=       p5-Unix-Statgrab
 SUBDIR+=       p5-Unix-Syslog
diff -r 23d140e70cfc -r 4f2a8a4414c3 sysutils/p5-Unburden-Home-Dir/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Unburden-Home-Dir/DESCR       Tue Feb 07 14:34:35 2017 +0000
@@ -0,0 +1,7 @@
+unburden-home-dir allows users to move cache files from browsers,
+etc. off their (nfs or ssd based) home directory, i.e. on a local
+harddisk or tmpfs and replace them with a symbolic link to the new
+location (e.g. on /tmp/ or /scratch/) upon login.
+
+Optionally the contents of these directories and files can be removed
+instead of moved.
diff -r 23d140e70cfc -r 4f2a8a4414c3 sysutils/p5-Unburden-Home-Dir/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Unburden-Home-Dir/Makefile    Tue Feb 07 14:34:35 2017 +0000
@@ -0,0 +1,106 @@
+# $NetBSD: Makefile,v 1.1 2017/02/07 14:34:35 hauke Exp $
+
+GIT_COMMIT=    99a9278
+
+DISTNAME=      Unburden-Home-Dir-g${GIT_COMMIT}
+PKGNAME=       p5-${DISTNAME}
+#PKGREVISION=  1
+CATEGORIES=    sysutils perl5
+MASTER_SITES=  -https://codeload.github.com/xtaran/unburden-home-dir/tar.gz/${GIT_COMMIT}
+
+MAINTAINER=    hauke%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/xtaran/unburden-home-dir
+COMMENT=       Automatically unburden HOME directory from caches etc
+LICENSE=       gnu-gpl-v2
+
+WRKSRC=                ${WRKDIR}/unburden-home-dir-${GIT_COMMIT}
+
+DEPENDS+=      p5-Config-File-[0-9]*:../../devel/p5-Config-File
+DEPENDS+=      p5-File-BaseDir-[0-9]*:../../devel/p5-File-BaseDir
+
+# http://search.cpan.org/~leakin/File-Rsync/Rsync.pm
+DEPENDS+=      p5-File-Rsync-[0-9]*:../../net/p5-File-Rsync
+DEPENDS+=      p5-File-Touch-[0-9]*:../../devel/p5-File-Touch
+DEPENDS+=      p5-File-Which-[0-9]*:../../devel/p5-File-Which
+DEPENDS+=      p5-String-Expand-[0-9]*:../../textproc/p5-String-Expand
+DEPENDS+=      lsof-[0-9]*:../../sysutils/lsof
+
+USE_TOOLS+=    perl
+REPLACE_PERL+= bin/unburden-home-dir
+
+USE_LANGUAGES= # empty
+NO_BUILD=      yes
+
+DOCDIR=                share/doc/unburden-home-dir
+EGDIR=         share/examples/unburden-home-dir
+CONF_FILES=    ${PREFIX}/${EGDIR}/unburden-home-dir.conf       \
+                       ${PKG_SYSCONFDIR}/unburden-home-dir.conf
+CONF_FILES+=   ${PREFIX}/${EGDIR}/unburden-home-dir.list       \
+                       ${PKG_SYSCONFDIR}/unburden-home-dir.list
+
+PKG_SYSCONFSUBDIR=     unburden-home-dir
+INSTALLATION_DIRS+=    bin libexec libexec/unburden-home-dir
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man1 ${EGDIR} ${DOCDIR}
+
+SUBST_CLASSES+=                        fix-paths
+SUBST_STAGE.fix-paths=         pre-install
+SUBST_MESSAGE.fix-paths=       Fixing absolute paths
+SUBST_FILES.fix-paths=         bin/unburden-home-dir
+SUBST_FILES.fix-paths+=                docs/unburden-home-dir.1.md
+SUBST_FILES.fix-paths+=                share/common.sh
+SUBST_FILES.fix-paths+=                unburden-home-dir.1
+SUBST_FILES.fix-paths+=                Xsession.d/25unburden-home-dir-xdg
+SUBST_FILES.fix-paths+=                Xsession.d/95unburden-home-dir
+SUBST_SED.fix-paths+=          -e 's,@SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_SED.fix-paths+=          -e 's,@PREFIX@,${PREFIX},g'
+
+SUBST_CLASSES+=                        comment-cfg
+SUBST_STAGE.comment-cfg=       pre-install
+SUBST_MESSAGE.comment-cfg=     Commenting out sample config file entries
+SUBST_FILES.comment-cfg=       etc/unburden-home-dir.list
+SUBST_SED.comment-cfg=         -E -e 's,^([^\#]),\#\1,g'
+
+.include "../../mk/bsd.prefs.mk"
+
+# Rendering the man page from markdown source requires ronn from
+# wip/ruby-ronn, but we must not depend on a wip package.
+#
+# Usage: Install wip/ruby-ronn and devel/gmake, then run
+#      `make clean ; make PKG_DEVELOPER=1 unburden-update-manpage`
+# and commit the updated man file .
+
+.if defined(PKG_DEVELOPER)
+
+#DEPENDS+=     ruby22-ronn-[0-9]*:../../wip/ruby-ronn
+#USE_TOOLS+=   gmake
+
+.PHONY:                unburden-update-manpage
+unburden-update-manpage:       patch
+       ( cd ${WRKSRC} && gmake manpages )
+       cp ${WRKSRC}/unburden-home-dir.1 ${PKGDIR}/files/
+
+.endif # PKG_DEVELOPER
+
+post-extract:
+       cp ${PKGDIR}/files/unburden-home-dir.1 ${WRKSRC}/
+
+do-install:
+       for ff in ${WRKSRC}/docs/*.md; do \
+               ${INSTALL_DATA} $$ff ${DESTDIR}${PREFIX}/${DOCDIR}/ ; \
+       done
+       ${INSTALL_MAN} ${WRKSRC}/unburden-home-dir.1 \
+                      ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
+       ${INSTALL_SCRIPT} ${WRKSRC}/bin/unburden-home-dir \
+               ${DESTDIR}${PREFIX}/bin/unburden-home-dir
+       ${INSTALL_DATA} ${WRKSRC}/share/common.sh \
+               ${DESTDIR}${PREFIX}/libexec/unburden-home-dir/common.sh
+       ${INSTALL_DATA} ${WRKSRC}/Xsession.d/95unburden-home-dir \
+               ${DESTDIR}${PREFIX}/${EGDIR}/unburden-home-dir
+       ${INSTALL_DATA} ${WRKSRC}/Xsession.d/25unburden-home-dir-xdg \
+               ${DESTDIR}${PREFIX}/${EGDIR}/unburden-home-dir-xdg
+       ${INSTALL_DATA} ${WRKSRC}/etc/unburden-home-dir \
+               ${DESTDIR}${PREFIX}/${EGDIR}/unburden-home-dir.conf
+       ${INSTALL_DATA} ${WRKSRC}/etc/unburden-home-dir.list \
+               ${DESTDIR}${PREFIX}/${EGDIR}/unburden-home-dir.list
+
+.include "../../mk/bsd.pkg.mk"
diff -r 23d140e70cfc -r 4f2a8a4414c3 sysutils/p5-Unburden-Home-Dir/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Unburden-Home-Dir/PLIST       Tue Feb 07 14:34:35 2017 +0000
@@ -0,0 +1,22 @@
+@comment $NetBSD: PLIST,v 1.1 2017/02/07 14:34:35 hauke Exp $
+bin/unburden-home-dir
+libexec/unburden-home-dir/common.sh
+man/man1/unburden-home-dir.1
+share/doc/unburden-home-dir/bugs.md
+share/doc/unburden-home-dir/configuration.md
+share/doc/unburden-home-dir/contact.md
+share/doc/unburden-home-dir/credits.md
+share/doc/unburden-home-dir/howto.md
+share/doc/unburden-home-dir/index.md
+share/doc/unburden-home-dir/installation.md
+share/doc/unburden-home-dir/license.md
+share/doc/unburden-home-dir/qa.md
+share/doc/unburden-home-dir/see-also.md
+share/doc/unburden-home-dir/source-code.md
+share/doc/unburden-home-dir/todo.md
+share/doc/unburden-home-dir/troubleshooting.md
+share/doc/unburden-home-dir/unburden-home-dir.1.md
+share/examples/unburden-home-dir/unburden-home-dir
+share/examples/unburden-home-dir/unburden-home-dir-xdg
+share/examples/unburden-home-dir/unburden-home-dir.conf
+share/examples/unburden-home-dir/unburden-home-dir.list
diff -r 23d140e70cfc -r 4f2a8a4414c3 sysutils/p5-Unburden-Home-Dir/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Unburden-Home-Dir/distinfo    Tue Feb 07 14:34:35 2017 +0000
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2017/02/07 14:34:35 hauke Exp $
+
+SHA1 (Unburden-Home-Dir-g99a9278.tar.gz) = 4e20a1eb66a0b93d0b03f31577101e46fcdcd4ba
+RMD160 (Unburden-Home-Dir-g99a9278.tar.gz) = 5032579039c499b5dbd7be18f121d654bba0043b
+SHA512 (Unburden-Home-Dir-g99a9278.tar.gz) = 3054494d7e00f65309b1b8815e012472be798abe2edccf69193a2ac88ddd88e06171b0b2d0673a1503071baf495203e2a9bd36feb6bff2a34e769f1200193d31
+Size (Unburden-Home-Dir-g99a9278.tar.gz) = 52254 bytes
+SHA1 (patch-Xsession.d_25unburden-home-dir-xdg) = 17e35f199b082d96ead8402f53f0c1f3a5116d2e
+SHA1 (patch-Xsession.d_95unburden-home-dir) = 745ea2cb3a28c36bd8ab5ed7dd0622160d2916e1
+SHA1 (patch-bin_unburden-home-dir) = ab20d5cc62aa830e11fa62766ac494a06f42e33d
+SHA1 (patch-docs_unburden-home-dir.1.md) = baf3da5a8872013d92970bba5935b1c0b37e44bd
+SHA1 (patch-share_common.sh) = 4543d529a049adb448b4875ad883933025283bbf
diff -r 23d140e70cfc -r 4f2a8a4414c3 sysutils/p5-Unburden-Home-Dir/files/unburden-home-dir.1
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Unburden-Home-Dir/files/unburden-home-dir.1   Tue Feb 07 14:34:35 2017 +0000
@@ -0,0 +1,86 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "UNBURDEN\-HOME\-DIR" "1" "February 2017" "" "Unburden Your Home Directory"
+.
+.SH "NAME"
+\fBunburden\-home\-dir\fR \- unburdens home directories from caches and trashes
+.
+.SH "SYNOPSIS"
+\fBunburden\-home\-dir\fR [ \fB\-n\fR | \fB\-u\fR | \fB\-f\fR \fIfilter\fR ]
+.
+.br
+\fBunburden\-home\-dir\fR ( \fB\-h\fR | \fB\-\-help\fR | \fB\-\-version\fR )
+.
+.SH "DESCRIPTION"
+unburden\-home\-dir unburdens the home directory from files and directory which cause high I/O or disk usage but are neither important if they are lost, e\.g\. caches or trash directory\.
+.
+.P
+When being run it moves the files and directories given in the configuration file to a location outside the home directory, e\.g\. \fB/tmp\fR or \fB/scratch\fR, and puts appropriate symbolic links 
in the home directory instead\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-b\fR
+use the given string as basename instead of "unburden\-home\-dir"\.
+.
+.TP
+\fB\-c\fR
+read an additional configuration file\.
+.
+.TP
+\fB\-C\fR
+read only the given configuration file
+.
+.TP
+\fB\-f\fR
+just unburden those directory matched by the given filter (a perl regular expression) \- it matches the already unburdened directories if used together with \fB\-u\fR\.
+.
+.TP
+\fB\-F\fR
+Do not check for files in use with lsof before (re)moving files\.
+.
+.TP
+\fB\-l\fR
+read an additional list file
+.
+.TP
+\fB\-L\fR
+read only the given list file
+.
+.TP
+\fB\-n\fR
+dry run (show what would be done)
+.
+.TP
+\fB\-u\fR
+undo (reverse the functionality and put stuff back into the home directory)
+.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help
+.
+.TP
+\fB\-\-version\fR
+show the program\'s version
+.
+.SH "EXAMPLES"
+Example configuration files can be found at \fB@PREFIX@/share/examples/unburden\-home\-dir/\fR and in the \fBetc/\fR directory of the source tar ball\.
+.
+.SH "FILES"
+\fB@SYSCONFDIR@/unburden\-home\-dir\.conf\fR, \fB@SYSCONFDIR@/unburden\-home\-dir\.list\fR, \fB~/\.unburden\-home\-dir\.conf\fR, \fB~/\.unburden\-home\-dir\.list\fR, 
\fB~/\.config/unburden\-home\-dir/config\fR, \fB~/\.config/unburden\-home\-dir/list\fR
+.
+.P
+Read the documentation at either \fB@PREFIX@/share/doc/unburden\-home\-dir/\fR, at https://unburden\-home\-dir\.readthedocs\.io/ online, or in the \fBdocs/\fR directory in the source tar ball for an 
explanation of these files\.
+.
+.SH "SEE ALSO"
+corekeeper \fIhttps://packages\.debian\.org/corekeeper\fR, autotrash(1), agedu(1), bleachbit(1), mundus \fIhttps://sebikul\.github\.io/mundus/\fR, computer\-janitor(1), rmlint(1)\.
+.
+.P
+Of, course, du(1) can help you to find potential files or directories to handle by unburden\-home\-dir, but there are quite some du(1)\-like tools out there which are way more comfortable, e\.g\. 
ncdu(1) (text\-mode), baobab(1) (GNOME), filelight(1) (KDE), xdiskusage(1) (X tool calling du(1) itself), or xdu(1) (X tool reading du(1) output from STDIN)\.
+.
+.SH "AUTHOR"
+Unburden Home Dir is written and maintained by Axel Beckert \fIabe@deuxchevaux\.org\fR\.
+.
+.SH "LICENSE"
+Unburden Home Dir is available under the terms of the GNU General Public License (GPL) version 2 or any later version at your option\.
diff -r 23d140e70cfc -r 4f2a8a4414c3 sysutils/p5-Unburden-Home-Dir/patches/patch-Xsession.d_25unburden-home-dir-xdg
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Unburden-Home-Dir/patches/patch-Xsession.d_25unburden-home-dir-xdg    Tue Feb 07 14:34:35 2017 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-Xsession.d_25unburden-home-dir-xdg,v 1.1 2017/02/07 14:34:36 hauke Exp $
+
+Fix absolute paths.
+
+--- Xsession.d/25unburden-home-dir-xdg.orig    2016-10-17 14:13:06.000000000 +0000
++++ Xsession.d/25unburden-home-dir-xdg
+@@ -5,8 +5,8 @@
+ if [ -z "$UNBURDEN_HOME_DIR_COMMON_SOURCED" ]; then
+     if [ -e share/common.sh ]; then
+         . share/common.sh
+-    elif [ -e /usr/share/unburden-home-dir/common.sh ]; then
+-        . /usr/share/unburden-home-dir/common.sh
++    elif [ -e @PREFIX@/libexec/unburden-home-dir/common.sh ]; then
++        . @PREFIX@/libexec/unburden-home-dir/common.sh
+     fi
+ fi
+ 
diff -r 23d140e70cfc -r 4f2a8a4414c3 sysutils/p5-Unburden-Home-Dir/patches/patch-Xsession.d_95unburden-home-dir
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-Unburden-Home-Dir/patches/patch-Xsession.d_95unburden-home-dir        Tue Feb 07 14:34:35 2017 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-Xsession.d_95unburden-home-dir,v 1.1 2017/02/07 14:34:36 hauke Exp $
+
+Fix absolute paths.
+
+--- Xsession.d/95unburden-home-dir.orig        2016-10-17 14:13:06.000000000 +0000
++++ Xsession.d/95unburden-home-dir



Home | Main Index | Thread Index | Old Index