summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorM0Rf302015-06-17 15:39:34 +0200
committerM0Rf302015-06-17 15:39:34 +0200
commitbb250c2676da579eb6396153900a890fe9b153f9 (patch)
tree0c2f1f97e5ef420dacd689fcba6c48903187a612
downloadaur-bb250c2676da579eb6396153900a890fe9b153f9.tar.gz
Initial import
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD40
-rw-r--r--i2p.conf49
-rw-r--r--i2pd.install20
-rw-r--r--i2pd.service17
-rw-r--r--i2pd.tmpfiles.conf2
6 files changed, 153 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..108b1c7ed448
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = i2pd-git
+ pkgdesc = Simplified C++ implementation of I2P client
+ pkgver = 1808.128a8f3
+ pkgrel = 1
+ url = https://github.com/PurpleI2P/i2pd
+ install = i2pd.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = git
+ makedepends = boost
+ depends = crypto++
+ depends = boost-libs
+ backup = var/lib/i2pd/i2p.conf
+ source = i2pd::git+https://github.com/PurpleI2P/i2pd.git
+ source = i2pd.service
+ source = i2p.conf
+ source = i2pd.tmpfiles.conf
+ md5sums = SKIP
+ md5sums = c37b5470c959e826be8eb40c8f1ece93
+ md5sums = b145e41e22806bd4ca4f4064ec4721a2
+ md5sums = 862be388708f2b1bd5f727715ec7508d
+
+pkgname = i2pd-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..76b41e55ab4e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+#Maintainer: M0Rf30
+
+pkgname=i2pd-git
+pkgver=1808.128a8f3
+pkgrel=1
+pkgdesc="Simplified C++ implementation of I2P client"
+arch=('i686' 'x86_64')
+url="https://github.com/PurpleI2P/i2pd"
+license=('GPL2')
+depends=('crypto++' 'boost-libs')
+makedepends=('git' 'boost')
+source=('i2pd::git+https://github.com/PurpleI2P/i2pd.git'
+ i2pd.service
+ i2p.conf
+ i2pd.tmpfiles.conf)
+install=i2pd.install
+backup=var/lib/i2pd/i2p.conf
+
+build() {
+ cd i2pd
+ make CXXFLAGS="$CXXFLAGS"
+}
+
+package(){
+ cd i2pd
+ install -Dm755 i2p $pkgdir/usr/bin/i2p
+ install -Dm0644 $srcdir/i2pd.service $pkgdir/usr/lib/systemd/system/i2pd.service
+ install -Dm0644 ../i2p.conf $pkgdir/var/lib/i2pd/i2p.conf
+ install -Dm0644 $srcdir/i2pd.tmpfiles.conf $pkgdir/usr/lib/tmpfiles.d/i2pd.conf
+}
+
+pkgver() {
+ cd i2pd
+ echo $(git rev-list --count master).$(git rev-parse --short master)
+}
+
+md5sums=('SKIP'
+ 'c37b5470c959e826be8eb40c8f1ece93'
+ 'b145e41e22806bd4ca4f4064ec4721a2'
+ '862be388708f2b1bd5f727715ec7508d')
diff --git a/i2p.conf b/i2p.conf
new file mode 100644
index 000000000000..d14e034bbd14
--- /dev/null
+++ b/i2p.conf
@@ -0,0 +1,49 @@
+# The external IP
+host=1.2.3.4
+
+# The port to listen on
+port=4567
+
+# The http port to listen on
+httpport=7070
+
+# Enable or disable logging to file. 1 for yes, 0 for no
+log=1
+
+# 1 if router is declared as unreachable and works through introducers
+#unreachable=
+
+# 1 if supports communication through ipv6, off by default
+#v6=
+
+# The port to listen on (HTTP Proxy)
+#httpproxyport=
+
+# The port to listen on (SOCKS Proxy)
+#socksproxyport=
+
+# The local port of IRC tunnel to listen on. 6668 by default
+#ircport=
+
+# I2P destination address of IRC server. For example irc.postman.i2p
+#ircdest=
+
+# optional keys file for local destination
+#irckeys=
+
+# File name containing destination keys, for example privKeys.dat. The file will be created if it does
+#not already exist (issue #110)
+#eepkeys=
+
+# Address incoming trafic forward to. 127.0.0.1 by default
+eephost=127.0.0.1
+
+# Port incoming trafic forward to. 80 by default
+eepport=80
+
+# Port of SAM bridge. Usually 7656. SAM is off if not specified
+#samport=7656
+
+# Port of BOB command channel. Usually 2827. BOB is off if not specified
+#bobport=2827
+
diff --git a/i2pd.install b/i2pd.install
new file mode 100644
index 000000000000..2ad255f33188
--- /dev/null
+++ b/i2pd.install
@@ -0,0 +1,20 @@
+home=/var/lib/i2pd
+pidfile=/run/i2pd.pid
+post_install() {
+ groupadd -g 44 i2p &>/dev/null
+ useradd -u 44 -g i2p -d ${home} -s /bin/nologin i2p &> /dev/null
+ chown i2p:i2p -R ${home} ${pidfile} &> /dev/null
+ chmod 700 ${home} &> /dev/null
+ systemd-tmpfiles --create i2pd.conf
+}
+
+post_upgrade() {
+ getent group i2p &>/dev/null || groupadd -g 44 i2p &>/dev/null
+ getent passwd i2p &>/dev/null || useradd -u 44 -g i2p -d ${home} -s /bin/nologin i2p &> /dev/null
+ chown i2p:i2p -R ${home} ${pidfile} &> /dev/null
+}
+
+pre_remove() {
+ getent passwd i2p &>/dev/null && userdel i2p &> /dev/null
+ getent group i2p &>/dev/null && groupdel i2p &> /dev/null
+}
diff --git a/i2pd.service b/i2pd.service
new file mode 100644
index 000000000000..8de42e2f3c42
--- /dev/null
+++ b/i2pd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=I2P Router in C++
+After=network.target
+
+[Service]
+User=i2p
+Group=i2p
+Type=forking
+ExecStart=/usr/bin/i2p --conf=/var/lib/i2pd/i2p.conf --service=1 --daemon=1
+ExecReload=/usr/bin/kill -HUP $MAINPID
+PIDFile=/run/i2pd.pid
+KillSignal=SIGINT
+LimitNOFILE=8192
+PrivateDevices=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/i2pd.tmpfiles.conf b/i2pd.tmpfiles.conf
new file mode 100644
index 000000000000..922f7ce43509
--- /dev/null
+++ b/i2pd.tmpfiles.conf
@@ -0,0 +1,2 @@
+f /run/i2pd.pid 0775 i2p i2p -
+