summaryrefslogtreecommitdiff
path: root/repo/system/i2pd/i2pd.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-18 23:40:38 +0100
committerdavidovski <david@davidovski.xyz>2022-05-18 23:40:38 +0100
commit0b977787374349328a21af0deade30d534cf3978 (patch)
tree3c2be28ef9a6f74a36f21cd48a34cb06b3080960 /repo/system/i2pd/i2pd.xibuild
parentdccab9b94dcfc5e040647210ba22b9cc4bddc742 (diff)
fixed gcc loader/linker errors
Diffstat (limited to 'repo/system/i2pd/i2pd.xibuild')
-rw-r--r--repo/system/i2pd/i2pd.xibuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/repo/system/i2pd/i2pd.xibuild b/repo/system/i2pd/i2pd.xibuild
new file mode 100644
index 0000000..78532c4
--- /dev/null
+++ b/repo/system/i2pd/i2pd.xibuild
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+NAME="i2pd"
+DESC="I2P Router written in C++"
+
+MAKEDEPS="make "
+DEPS="boost sbase openssl musl "
+
+PKG_VER=2.41.0
+SOURCE="https://github.com/PurpleI2P/i2pd/archive/$PKG_VER/i2pd-$PKG_VER.tar.gz"
+ADDITIONAL="i2pd.initd i2pd.confd "
+
+prepare () {
+ # Makefile.linux assumes some gnu/linux features (expr match)
+ # so we will use the bsd makefile instead
+ mv Makefile.bsd Makefile.linux
+}
+
+build () {
+ make PREFIX=/usr
+}
+
+package () {
+ install -D -m 755 i2pd "$PKG_DEST"/usr/sbin/i2pd
+
+ install -dm755 -o i2p \
+ "$PKG_DEST"/etc/i2pd \
+ "$PKG_DEST"/usr/share/i2pd \
+ "$PKG_DEST"/var/lib/i2pd \
+ "$PKG_DEST"/var/log/i2pd
+
+ install -D -m 644 contrib/tunnels.conf "$PKG_DEST"/etc/i2pd/tunnels.conf
+ install -D -m 644 contrib/i2pd.conf "$PKG_DEST"/etc/i2pd/i2pd.conf
+ cp -r contrib/certificates/ "$PKG_DEST"/usr/share/i2pd/certificates
+ ln -s /usr/share/i2pd/certificates "$PKG_DEST"/var/lib/i2pd/certificates
+
+ install -m755 -D i2pd.initd \
+ "$PKG_DEST"/etc/init.d/i2pd
+ install -m644 -D i2pd.confd \
+ "$PKG_DEST"/etc/conf.d/i2pd
+}
+
+postinstall () {
+ adduser -S -D -H -h /var/lib/i2p -s /sbin/nologin -g tor tor 2>/dev/null
+ return 0
+}