aboutsummaryrefslogtreecommitdiff
path: root/www/ljdump
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2008-01-11 22:09:10 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2008-01-11 22:09:10 +0000
commit09342a4c3ad8e4fbece8f13b13a917b1ec13f83e (patch)
treee86e6d844b70462acdf9ce5b254aea5226033175 /www/ljdump
parent3287a13ac3f44403a7611070ddaf304b4a1461d3 (diff)
downloadports-09342a4c3ad8e4fbece8f13b13a917b1ec13f83e.tar.gz
ports-09342a4c3ad8e4fbece8f13b13a917b1ec13f83e.zip
Notes
Diffstat (limited to 'www/ljdump')
-rw-r--r--www/ljdump/Makefile30
-rw-r--r--www/ljdump/distinfo3
-rw-r--r--www/ljdump/files/patch-ljdump.py24
-rw-r--r--www/ljdump/pkg-descr11
4 files changed, 68 insertions, 0 deletions
diff --git a/www/ljdump/Makefile b/www/ljdump/Makefile
new file mode 100644
index 000000000000..119e784b845f
--- /dev/null
+++ b/www/ljdump/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: ljdump
+# Date created: 11 Jan 2008
+# Whom: Alexey Dokuchaev <danfe@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ljdump
+PORTVERSION= 1.2
+CATEGORIES= www
+MASTER_SITES= http://hewgill.com/software/ljdump/ \
+ http://freebsd.nsu.ru/distfiles/
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Tool to download LiveJournal entries and comments
+
+NO_BUILD= yes
+USE_PYTHON_RUN= yes
+
+PLIST_FILES= bin/ljdump etc/ljdump.config.sample
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE}, ; \
+ s,%%PREFIX%%,${PREFIX},' ${WRKSRC}/ljdump.py
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/ljdump.py ${PREFIX}/bin/ljdump
+ ${INSTALL_DATA} ${WRKSRC}/ljdump.config.sample ${PREFIX}/etc
+
+.include <bsd.port.mk>
diff --git a/www/ljdump/distinfo b/www/ljdump/distinfo
new file mode 100644
index 000000000000..a180e9172998
--- /dev/null
+++ b/www/ljdump/distinfo
@@ -0,0 +1,3 @@
+MD5 (ljdump-1.2.tar.gz) = 45d8907289021f8931080c0d2ce646dc
+SHA256 (ljdump-1.2.tar.gz) = d7343b074991156dc8054995f3faf6e2fb2f1d2af58aec09fbd47859d776f40e
+SIZE (ljdump-1.2.tar.gz) = 3909
diff --git a/www/ljdump/files/patch-ljdump.py b/www/ljdump/files/patch-ljdump.py
new file mode 100644
index 000000000000..6ed1503c58d1
--- /dev/null
+++ b/www/ljdump/files/patch-ljdump.py
@@ -0,0 +1,24 @@
+--- ljdump.py.orig 2006-09-08 15:49:11.000000000 +0700
++++ ljdump.py 2008-01-12 03:30:50.000000000 +0600
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!%%LOCALBASE%%/bin/python
+ #
+ # ljdump.py - livejournal archiver
+ # Greg Hewgill <greg@hewgill.com> http://hewgill.com
+@@ -113,7 +113,14 @@
+ return ""
+ return e[0].firstChild.nodeValue
+
+-config = xml.dom.minidom.parse("ljdump.config")
++for file in [ "%%PREFIX%%/etc/ljdump.config", "ljdump.config", "/"]:
++ if os.access(file, os.R_OK):
++ break
++if file == "/":
++ print "Neither global (in %%PREFIX%%/etc) nor local configuration file found, exiting"
++ sys.exit()
++print "Using configuration file %s" % file
++config = xml.dom.minidom.parse(file)
+ Server = config.documentElement.getElementsByTagName("server")[0].childNodes[0].data
+ Username = config.documentElement.getElementsByTagName("username")[0].childNodes[0].data
+ Password = config.documentElement.getElementsByTagName("password")[0].childNodes[0].data
diff --git a/www/ljdump/pkg-descr b/www/ljdump/pkg-descr
new file mode 100644
index 000000000000..bf04eb6c3128
--- /dev/null
+++ b/www/ljdump/pkg-descr
@@ -0,0 +1,11 @@
+ljdump reads the journal entries from a LiveJournal (or compatible) blog
+site and archives them in a subdirectory named after the journal name.
+Both the journal entries and journal comments are downloaded.
+
+The program may be run as often as needed to bring the backup copy up to
+date. Both new and updated items are downloaded.
+
+ljdump uses only standard Python libraries, so it will work wherever
+Python itself does (Windows, Linux, FreeBSD, Mac OS X, etc).
+
+WWW: http://hewgill.com/software/ljdump/