first commit
parent
20f5192230
commit
c4a61cf4c2
|
@ -0,0 +1,41 @@
|
|||
COMMENT = ii/idec node and tools
|
||||
|
||||
MODGO_MODNAME = git.openbsd.org.ru/vasyahacker/iigo
|
||||
MODGO_VERSION = v0.0.1
|
||||
|
||||
DISTNAME = iigo-${MODGO_VERSION}
|
||||
#PKGNAME = iigo-v0.0.1
|
||||
#DISTFILES = ii-go-v0.0.4.zip
|
||||
CATEGORIES = www
|
||||
HOMEPAGE = https://github.com/hugeping/ii-go
|
||||
MAINTAINER = vasyahacker <vasya@magicfreedom.com>
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE = Yes
|
||||
# If pledge is used, annotate with `uses pledge()' in a comment
|
||||
# "make port-lib-depends-check" can help
|
||||
WANTLIB = c pthread
|
||||
#WRKDIST = ${WRKSRC}
|
||||
MODULES = lang/go
|
||||
#MODGO_TYPE = bin
|
||||
NO_TEST = Yes
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && make build
|
||||
|
||||
do-install:
|
||||
# ${MODGO_INSTALL_TARGET}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ii-tool ${PREFIX}/bin/ii-tool
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ii-node ${PREFIX}/bin/ii-node
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ii-gemini ${PREFIX}/bin/ii-gemini
|
||||
${INSTALL_MAN} ${WRKSRC}/man/iigo.1 ${PREFIX}/man/man1/iigo.1
|
||||
${INSTALL_MAN} ${WRKSRC}/man/ii-tool.1 ${PREFIX}/man/man1/ii-tool.1
|
||||
${INSTALL_MAN} ${WRKSRC}/man/ii-node.1 ${PREFIX}/man/man1/ii-node.1
|
||||
${INSTALL_MAN} ${WRKSRC}/man/ii-gemini.1 ${PREFIX}/man/man1/ii-gemini.1
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/iigo/{tpl,style}
|
||||
${INSTALL_DATA} ${WRKSRC}/www/tpl/* ${PREFIX}/share/iigo/tpl/
|
||||
${INSTALL_DATA} ${WRKSRC}/www/style/* ${PREFIX}/share/iigo/style/
|
||||
|
||||
.include "modules.inc"
|
||||
.include <bsd.port.mk>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
SHA256 (go_modules/golang.org/x/crypto/@v/v0.7.0.mod) = yJ/iLnPawmoAplasEf9MbhprbNKrzFftzazew/va2C0=
|
||||
SHA256 (go_modules/golang.org/x/crypto/@v/v0.7.0.zip) = d1Snxmt4AP9uR5A8YJqgfQSEUBgmrgR9LuGn1eJP0BI=
|
||||
SHA256 (go_modules/golang.org/x/mod/@v/v0.8.0.mod) = YkVnRZxumUesSr3gtwNO5h3Ltqk3P1lwCUwLs+gSGWQ=
|
||||
SHA256 (go_modules/golang.org/x/mod/@v/v0.8.0.zip) = SugXZ5nYzagZ5wcxumhVc1AD5+STBDbjRYTHXJbEluA=
|
||||
SHA256 (go_modules/golang.org/x/net/@v/v0.8.0.mod) = 6275vWQFrOPZnkOB0CVs5B+Dxm0aILTigwpMd2JF9xo=
|
||||
SHA256 (go_modules/golang.org/x/net/@v/v0.8.0.zip) = wokY3rZokGghxOO12jZDwmL/TMxIsbLgIc4YhpSvnbo=
|
||||
SHA256 (go_modules/golang.org/x/sys/@v/v0.5.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
|
||||
SHA256 (go_modules/golang.org/x/sys/@v/v0.6.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
|
||||
SHA256 (go_modules/golang.org/x/sys/@v/v0.6.0.zip) = jBWGDjhQ486lpxhrt5uM+Y9RPZrFSYCZ073f1Jxt/D8=
|
||||
SHA256 (go_modules/golang.org/x/term/@v/v0.6.0.mod) = ZDWbnGU3CEePAgcpiFBE/z2ABxhtnUQRJf6HSBfnEgE=
|
||||
SHA256 (go_modules/golang.org/x/term/@v/v0.6.0.zip) = NpkIStEQSmoKAnoIceZ5hzBNc6arsncMj35c49fB0xQ=
|
||||
SHA256 (go_modules/golang.org/x/text/@v/v0.8.0.mod) = Q29ZLne1k7AvvqN04jrTNpyGI/8NKckd594eZnLbmkE=
|
||||
SHA256 (go_modules/golang.org/x/text/@v/v0.8.0.zip) = GUuif9enQ9d3jhd4jkNhlJmIWtz2oyLaQJWBSoPnOnc=
|
||||
SHA256 (go_modules/golang.org/x/tools/@v/v0.6.0.mod) = gw7Xjc0+mSfEEuJkEjAwhEd0nVE9MQJNJ24kQ7IBZgk=
|
||||
SHA256 (go_modules/golang.org/x/tools/@v/v0.6.0.zip) = minIkEwqzUtlgl6RbL2vQXCG81u2jFSvmmKDoOE0HoU=
|
||||
SHA256 (iigo-v0.0.1.zip) = yXL407wjoZw++RChub+YYeeen26alwIBvc6+EqDz04c=
|
||||
SIZE (go_modules/golang.org/x/crypto/@v/v0.7.0.mod) = 171
|
||||
SIZE (go_modules/golang.org/x/crypto/@v/v0.7.0.zip) = 1761498
|
||||
SIZE (go_modules/golang.org/x/mod/@v/v0.8.0.mod) = 84
|
||||
SIZE (go_modules/golang.org/x/mod/@v/v0.8.0.zip) = 161670
|
||||
SIZE (go_modules/golang.org/x/net/@v/v0.8.0.mod) = 123
|
||||
SIZE (go_modules/golang.org/x/net/@v/v0.8.0.zip) = 1561602
|
||||
SIZE (go_modules/golang.org/x/sys/@v/v0.5.0.mod) = 33
|
||||
SIZE (go_modules/golang.org/x/sys/@v/v0.6.0.mod) = 33
|
||||
SIZE (go_modules/golang.org/x/sys/@v/v0.6.0.zip) = 1892073
|
||||
SIZE (go_modules/golang.org/x/term/@v/v0.6.0.mod) = 67
|
||||
SIZE (go_modules/golang.org/x/term/@v/v0.6.0.zip) = 19924
|
||||
SIZE (go_modules/golang.org/x/text/@v/v0.8.0.mod) = 215
|
||||
SIZE (go_modules/golang.org/x/text/@v/v0.8.0.zip) = 8614767
|
||||
SIZE (go_modules/golang.org/x/tools/@v/v0.6.0.mod) = 211
|
||||
SIZE (go_modules/golang.org/x/tools/@v/v0.6.0.zip) = 3008760
|
||||
SIZE (iigo-v0.0.1.zip) = 56163
|
|
@ -0,0 +1,12 @@
|
|||
MODGO_MODULES = \
|
||||
golang.org/x/crypto v0.7.0 \
|
||||
golang.org/x/mod v0.8.0 \
|
||||
golang.org/x/net v0.8.0 \
|
||||
golang.org/x/sys v0.6.0 \
|
||||
golang.org/x/term v0.6.0 \
|
||||
golang.org/x/text v0.8.0 \
|
||||
golang.org/x/tools v0.6.0
|
||||
|
||||
MODGO_MODFILES = \
|
||||
golang.org/x/sys v0.5.0
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
II-GO is idec node realization written in golang.
|
||||
|
||||
It has no dependencies and very compact.
|
||||
You can easy setup it and make your own ii/idec node.
|
||||
|
||||
Ported from https://github.com/hugeping/ii-go
|
|
@ -0,0 +1 @@
|
|||
see iigo(1), ii-node(1), ii-tool(1), ii-gemini(1) and /usr/local/share/doc/pkg-readmes/iigo
|
|
@ -0,0 +1,32 @@
|
|||
@rcscript ${RCDIR}/iigod
|
||||
@bin bin/ii-gemini
|
||||
@bin bin/ii-node
|
||||
@bin bin/ii-tool
|
||||
@man man/man1/ii-gemini.1
|
||||
@man man/man1/ii-node.1
|
||||
@man man/man1/ii-tool.1
|
||||
@man man/man1/iigo.1
|
||||
share/doc/pkg-readmes/${PKGSTEM}
|
||||
share/iigo/
|
||||
share/iigo/style/
|
||||
share/iigo/style/icon.png
|
||||
share/iigo/style/style.css
|
||||
share/iigo/tpl/
|
||||
share/iigo/tpl/blog.tpl
|
||||
share/iigo/tpl/edit.tpl
|
||||
share/iigo/tpl/error.tpl
|
||||
share/iigo/tpl/footer.tpl
|
||||
share/iigo/tpl/header.tpl
|
||||
share/iigo/tpl/index.tpl
|
||||
share/iigo/tpl/links.tpl
|
||||
share/iigo/tpl/login.tpl
|
||||
share/iigo/tpl/new.tpl
|
||||
share/iigo/tpl/pager.tpl
|
||||
share/iigo/tpl/preview.tpl
|
||||
share/iigo/tpl/profile.tpl
|
||||
share/iigo/tpl/query.tpl
|
||||
share/iigo/tpl/register.tpl
|
||||
share/iigo/tpl/reply.tpl
|
||||
share/iigo/tpl/reset.tpl
|
||||
share/iigo/tpl/topic.tpl
|
||||
share/iigo/tpl/topics.tpl
|
|
@ -0,0 +1,35 @@
|
|||
+-----------------------------------------------------------------------
|
||||
| Running ${PKGSTEM} node on OpenBSD
|
||||
+-----------------------------------------------------------------------
|
||||
|
||||
Running ii-node(1) locally
|
||||
==========================================
|
||||
|
||||
Prepare croot:
|
||||
|
||||
USER_NAME="nobody"
|
||||
HD="/var/www/ii-node"
|
||||
mkdir -p $HD/usr/{lib,libexec}
|
||||
mkdir $HD/etc
|
||||
mkdir $HD/tmp
|
||||
|
||||
echo "nobody:*:32767:32767:Unprivileged user:/nonexistent:/sbin/nologin" > $HD/etc/passwd
|
||||
echo "nogroup:*:32766:" > $HD/etc/group
|
||||
|
||||
cp -v /usr/libexec/ld.so ${HD}/usr/libexec
|
||||
cp -v /usr/lib/libpthread.so.27.0 ${HD}/usr/lib
|
||||
cp -v /usr/lib/libc.so.97.0 ${HD}/usr/lib
|
||||
cp -vr /usr/local/share/iigo/* $HD/
|
||||
cp -v /usr/local/bin/ii-node ${HD}/
|
||||
|
||||
# If need to sync with another node:
|
||||
ii-tool -db $HD/db fetch http://hugeping.tk
|
||||
ftp -o $HD/list.txt http://hugeping.tk/list.txt
|
||||
|
||||
chown -R nobody:nogroup $HD
|
||||
|
||||
# Run ii-node:
|
||||
rcctl enable iigod
|
||||
rcctl start iigod
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/ksh
|
||||
|
||||
daemon="/var/www/ii-node/ii-node"
|
||||
daemon_execdir="$(dirname $daemon)"
|
||||
daemon_flags="-L 127.0.0.1:8080 -sys my.OpenBSD.node"
|
||||
daemon_logger="daemon.info"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_bg=YES
|
||||
rc_reload=NO
|
||||
pexp="./$(basename $daemon) $daemon_flags"
|
||||
|
||||
rc_start() {
|
||||
rc_exec "/usr/sbin/chroot -u nobody ${daemon_execdir} ./$(basename $daemon) ${daemon_flags} | logger -t ii-node 2>&1"
|
||||
}
|
||||
|
||||
rc_cmd $1
|
Loading…
Reference in New Issue