summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2016-11-16 00:43:30 +0000
committerhrs <hrs@FreeBSD.org>2016-11-16 00:43:30 +0000
commit9b85026fc5c80b9ec7baaec2d1e66301d29eb5a2 (patch)
tree38677bee9de665ee8ca137967ecd28cb79ebc7e0
parentadd980d4c3193e11ebcf020c55926aae0cf62c42 (diff)
downloadFreeBSD-ports-9b85026fc5c80b9ec7baaec2d1e66301d29eb5a2.zip
FreeBSD-ports-9b85026fc5c80b9ec7baaec2d1e66301d29eb5a2.tar.gz
- Add japanese/p5-2chproxy, an HTTP proxy converting contents of 2ch.net
into the old .dat format. - Update japanese/navi2ch to use japanese/p5-2chproxy as an HTTP server by default.
-rw-r--r--japanese/Makefile1
-rw-r--r--japanese/navi2ch/Makefile14
-rw-r--r--japanese/navi2ch/distinfo5
-rw-r--r--japanese/navi2ch/files/patch-elisp-comp11
-rw-r--r--japanese/navi2ch/files/patch-navi2ch-vars.el13
-rw-r--r--japanese/navi2ch/pkg-message8
-rw-r--r--japanese/p5-2chproxy/Makefile34
-rw-r--r--japanese/p5-2chproxy/distinfo3
-rw-r--r--japanese/p5-2chproxy/files/patch-2chproxy.pl27
-rw-r--r--japanese/p5-2chproxy/files/twochproxy.in32
-rw-r--r--japanese/p5-2chproxy/pkg-descr4
11 files changed, 133 insertions, 19 deletions
diff --git a/japanese/Makefile b/japanese/Makefile
index 473b8b9..7bf0aa8 100644
--- a/japanese/Makefile
+++ b/japanese/Makefile
@@ -195,6 +195,7 @@
SUBDIR += nhocr
SUBDIR += nkf
SUBDIR += onew
+ SUBDIR += p5-2chproxy
SUBDIR += p5-Date-Japanese-Era
SUBDIR += p5-Date-Japanese-Holiday
SUBDIR += p5-DateTime-Calendar-Japanese-Era
diff --git a/japanese/navi2ch/Makefile b/japanese/navi2ch/Makefile
index 109d9ea..6921794 100644
--- a/japanese/navi2ch/Makefile
+++ b/japanese/navi2ch/Makefile
@@ -3,11 +3,9 @@
PORTNAME= navi2ch
PORTVERSION= 2.0.0.d
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= japanese www elisp
-MASTER_SITES= http://people.allbsd.org/~hrs/FreeBSD/ LOCAL/hrs
-DISTNAME= navi2ch-git-75ceac8e93d8d7cc02cc8fa44f14cd44ce0b9d0a
PKGNAMESUFFIX= -${EMACS_PORT_NAME}
MAINTAINER= hrs@FreeBSD.org
@@ -15,8 +13,12 @@ COMMENT= 2ch.net and 2ch-like BBS navigator for Emacsen
LICENSE= GPLv2
-USES= zip
+RUN_DEPENDS= ${LOCALBASE}/sbin/2chproxy.pl:japanese/p5-2chproxy
+
USE_EMACS= yes
+USE_GITHUB= yes
+GH_ACCOUNT= naota
+GH_TAGNAME= faebfd1
GNU_CONFIGURE= yes
CONFIGURE_ENV= EMACS="${EMACS_CMD}"
CONFIGURE_ARGS= --with-lispdir=${PREFIX}/${LISPDIR}/${PORTNAME}
@@ -30,10 +32,10 @@ PORTDOC_LISPS= gikope.el navi2ch-logo.el navi2ch-migemo.el
LISPDIR= ${EMACS_VERSION_SITE_LISPDIR}
OPTIONS_DEFINE= DOCS X11
-OPTIONS_DEFAULT=X11
+OPTIONS_DEFAULT=DOCS X11
X11_RUN_DEPENDS=${LOCALBASE}/share/mona/monak12.pcf.gz:japanese/font-mona
-post-install:
+post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && \
${INSTALL_DATA} ${PORTDOC_FILES} ${STAGEDIR}${DOCSDIR}
diff --git a/japanese/navi2ch/distinfo b/japanese/navi2ch/distinfo
index b4f09dc..577e15a 100644
--- a/japanese/navi2ch/distinfo
+++ b/japanese/navi2ch/distinfo
@@ -1,2 +1,3 @@
-SHA256 (navi2ch-git-75ceac8e93d8d7cc02cc8fa44f14cd44ce0b9d0a.zip) = c87f6a463ab96f2e736d16a61f58b78de503188040b35ef16a7dc268de20ef27
-SIZE (navi2ch-git-75ceac8e93d8d7cc02cc8fa44f14cd44ce0b9d0a.zip) = 575780
+TIMESTAMP = 1479256991
+SHA256 (naota-navi2ch-2.0.0.d-faebfd1_GH0.tar.gz) = e5da75c6aee6005349a4c8e830a0737cc58536c4c526aba7843e9f990da62966
+SIZE (naota-navi2ch-2.0.0.d-faebfd1_GH0.tar.gz) = 512558
diff --git a/japanese/navi2ch/files/patch-elisp-comp b/japanese/navi2ch/files/patch-elisp-comp
deleted file mode 100644
index 8c0de87..0000000
--- a/japanese/navi2ch/files/patch-elisp-comp
+++ /dev/null
@@ -1,11 +0,0 @@
---- elisp-comp.orig 2014-11-22 16:23:24.000000000 +0900
-+++ elisp-comp 2014-11-22 16:23:43.000000000 +0900
-@@ -72,7 +72,7 @@
-
- (
- cd $tempdir
-- echo "(setq load-path (cons nil load-path))" > script
-+ echo "(setq load-path (cons \".\" load-path))" > script
- # $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $?
- $EMACS -batch -q -l script -l ../bcomp.el || exit $?
- mv *.elc ..
diff --git a/japanese/navi2ch/files/patch-navi2ch-vars.el b/japanese/navi2ch/files/patch-navi2ch-vars.el
new file mode 100644
index 0000000..592eef3
--- /dev/null
+++ b/japanese/navi2ch/files/patch-navi2ch-vars.el
@@ -0,0 +1,13 @@
+--- navi2ch-vars.el.orig 2015-03-30 02:16:24 UTC
++++ navi2ch-vars.el
+@@ -2009,8 +2009,8 @@ Navi2ch$B%+%F%4%j$K!VAw?.95$(!WHD$,<+F0
+
+ ;; net variables
+ (defcustom navi2ch-net-http-proxy
+- (if (string= (getenv "HTTP_PROXY") "")
+- nil
++ (if (string= (or (getenv "HTTP_PROXY") "") "")
++ "127.0.0.1:8080"
+ (getenv "HTTP_PROXY"))
+ "*HTTP $B%W%m%-%7$N(B URL$B!#(B"
+ :type '(choice (string :tag "$B%W%m%-%7$r;XDj(B")
diff --git a/japanese/navi2ch/pkg-message b/japanese/navi2ch/pkg-message
new file mode 100644
index 0000000..fb91f29
--- /dev/null
+++ b/japanese/navi2ch/pkg-message
@@ -0,0 +1,8 @@
+navi2ch now requires ja-p5-2chproxy(japanese/p5-2chproxy) to access 2ch.net.
+Before using navi2ch, put the following line into /etc/rc.conf:
+
+ twochproxy_enable="YES"
+
+and start twochproxy service:
+
+ # service twochproxy start
diff --git a/japanese/p5-2chproxy/Makefile b/japanese/p5-2chproxy/Makefile
new file mode 100644
index 0000000..96bea08
--- /dev/null
+++ b/japanese/p5-2chproxy/Makefile
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+PORTNAME= 2chproxy
+PORTVERSION= 1.0.1
+DISTVERSIONPREFIX= v
+CATEGORIES= japanese perl5 www
+PKGNAMEPREFIX= ja-p5-
+
+MAINTAINER= hrs@FreeBSD.org
+COMMENT= Proxy server for 2ch.net
+
+LICENSE= MIT
+
+RUN_DEPENDS= p5-HTTP-Daemon>0:www/p5-HTTP-Daemon \
+ p5-IO-Compress>0:archivers/p5-IO-Compress \
+ p5-URI>0:net/p5-URI \
+ p5-libwww>0:www/p5-libwww
+
+USES= perl5 shebangfix
+SHEBANG_FILES= ${WRKSRC}/${PORTNAME}.pl
+USE_GITHUB= yes
+GH_ACCOUNT= yama-natuki
+GH_PROJECT= ${PORTNAME}.pl
+NO_BUILD= yes
+RC_SUBR= ${WRKDIR}/twochproxy
+SUB_FILES= ${FILESDIR_REL}/twochproxy
+PLIST_FILES= sbin/${PORTNAME}.pl \
+ etc/rc.d/twochproxy
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.pl ${STAGEDIR}${PREFIX}/sbin
+ ${INSTALL_SCRIPT} ${WRKDIR}/twochproxy ${STAGEDIR}${PREFIX}/etc/rc.d
+
+.include <bsd.port.mk>
diff --git a/japanese/p5-2chproxy/distinfo b/japanese/p5-2chproxy/distinfo
new file mode 100644
index 0000000..439a408
--- /dev/null
+++ b/japanese/p5-2chproxy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1479210675
+SHA256 (yama-natuki-2chproxy.pl-v1.0.1_GH0.tar.gz) = 481eaffb0daaf2f9406b43b9342298537173e4453fa49497492f080107ac7b5a
+SIZE (yama-natuki-2chproxy.pl-v1.0.1_GH0.tar.gz) = 21895
diff --git a/japanese/p5-2chproxy/files/patch-2chproxy.pl b/japanese/p5-2chproxy/files/patch-2chproxy.pl
new file mode 100644
index 0000000..3468045
--- /dev/null
+++ b/japanese/p5-2chproxy/files/patch-2chproxy.pl
@@ -0,0 +1,27 @@
+--- 2chproxy.pl.orig 2016-11-16 00:35:06 UTC
++++ 2chproxy.pl
+@@ -90,8 +90,8 @@ my $PROXY_CONFIG = {
+ HANDLED_COOKIES => [qw(__cfduid yuki PREN)], #KEEP_COOKIEが有効な時にプロクシで保持するクッキー
+ DAT_URL => '^http://([\w]+)(\.2ch\.net|\.bbspink\.com)(:[\d]+)?/([\w]+)/(?:dat|kako/\d+(?:/\d+)?)/([\d]+(?:-[\d]+)?)\.dat(\.gz)?$', #datへのアクセスかを判定する正規表現
+ NULL_DEVICE => '/dev/null', #nullデバイスの場所
+- PID_FILE_NAME => "/tmp/2chproxy.pid", #pidが書かれたファイル、2重起動禁止にも用いている
+- LOG_FILE_NAME => "/tmp/2chproxy.log", #ログファイル
++ PID_FILE_NAME => "/var/run/2chproxy.pid", #pidが書かれたファイル、2重起動禁止にも用いている
++ LOG_FILE_NAME => "/var/log/2chproxy.log", #ログファイル
+ NULL_DEVICE_WIN32 => 'nul', #nullデバイスの場所(Windows)
+ PID_FILE_NAME_WIN32 => dirname($0)."/2chproxy.pid", #pidが書かれたファイル、2重起動禁止にも用いている(Windows)
+ LOG_FILE_NAME_WIN32 => dirname($0)."/2chproxy.log", #ログファイル(Windows)
+@@ -325,11 +325,12 @@ sub daemonize() {
+ fork() and exit(0);
+ POSIX::setsid();
+ fork() and exit(0);
+- umask(0);
++ umask(022);
+ chdir('/');
+ open(STDIN, '<', $null_device_name) or die;
+ open(STDOUT, '>', $log_file_name) or die;
+ open(STDERR, '>', $log_file_name) or die;
++ chmod(0600, $log_file_name) or die;
+
+ return 0;
+ }
diff --git a/japanese/p5-2chproxy/files/twochproxy.in b/japanese/p5-2chproxy/files/twochproxy.in
new file mode 100644
index 0000000..9e3b75a
--- /dev/null
+++ b/japanese/p5-2chproxy/files/twochproxy.in
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# PROVIDE: twochproxy
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# $FreeBSD$
+
+. /etc/rc.subr
+
+name=twochproxy
+rcvar=${name}_enable
+
+command=%%PREFIX%%/sbin/2chproxy.pl
+start_cmd=${name}_start
+stop_cmd=${name}_stop
+load_rc_config $name
+pidfile=/var/run/2chproxy.pid
+: ${twochproxy_enable:=NO}
+
+twochproxy_start()
+{
+
+ $command --daemon
+}
+twochproxy_stop()
+{
+
+ $command --kill && rm -f $pidfile
+}
+
+run_rc_command "$1"
diff --git a/japanese/p5-2chproxy/pkg-descr b/japanese/p5-2chproxy/pkg-descr
new file mode 100644
index 0000000..f7bd252
--- /dev/null
+++ b/japanese/p5-2chproxy/pkg-descr
@@ -0,0 +1,4 @@
+2chproxy.pl, an HTTP proxy for 2ch.net to convert the contents into
+old .dat format.
+
+WWW: https://github.com/yama-natuki/2chproxy.pl
OpenPOWER on IntegriCloud