Browse Source

[snap] update metadata (#9)

Make in buildable with snapcraft 4+
master
R4SAS 1 year ago committed by GitHub
parent
commit
8d68d01b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 0
      snap/gui/i2pd.png
  3. 19
      snap/local/i2pd-wrapper
  4. 68
      snap/snapcraft.yaml

2
README.md

@ -1,5 +1,5 @@
<h1 align="center"> <h1 align="center">
<img src="i2pd-logo.png" alt="i2pd"> <img src="snap/gui/i2pd.png" alt="i2pd">
<br /> <br />
i2pd - Invisible Internet Protocol Daemon i2pd - Invisible Internet Protocol Daemon
</h1> </h1>

0
i2pd-logo.png → snap/gui/i2pd.png

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

19
snap/local/i2pd-wrapper

@ -1,9 +1,14 @@
#!/bin/sh #!/bin/env bash
if [ ! -d "$SNAP_DATA/datadir" ]; then if [ "$1" == 'reload' ]; then
mkdir $SNAP_DATA/datadir/ exec "$SNAP/bin/kill" -1 $(cat $SNAP_DATA/datadir/i2pd.pid)
cp -R $SNAP/certificates $SNAP_DATA/datadir/ elif [ "$1" == 'graceful' ]; then
cp -R $SNAP/i2pd.conf $SNAP_DATA/datadir/ exec "$SNAP/bin/kill" -2 $(cat $SNAP_DATA/datadir/i2pd.pid)
fi else
if [ ! -d "$SNAP_DATA/datadir" ]; then
mkdir $SNAP_DATA/datadir
cp -R $SNAP/appdata/* $SNAP_DATA/datadir/
fi
exec "$SNAP/bin/i2pd" --datadir=$SNAP_DATA/datadir/ exec "$SNAP/bin/i2pd" --datadir=$SNAP_DATA/datadir/
fi

68
snap/snapcraft.yaml

@ -1,16 +1,19 @@
name: i2pd name: i2pd
version: 2.45.1
summary: Distributed anonymous networking framework summary: Distributed anonymous networking framework
description: | description: |
i2pd (I2P Daemon) is a full-featured C++ implementation of I2P client. i2pd (I2P Daemon) is a full-featured C++ implementation of I2P client.
I2P (Invisible Internet Protocol) is a universal anonymous network layer. I2P (Invisible Internet Protocol) is a universal anonymous network layer.
All communications over I2P are anonymous and end-to-end encrypted, All communications over I2P are anonymous and end-to-end encrypted,
participants don't reveal their real IP addresses. participants don't reveal their real IP addresses.
version: 2.45.1
base: core18 website: https://i2pd.website/
source-code: https://github.com/PurpleI2P/i2pd-snap
issues: https://github.com/PurpleI2P/i2pd/issues
license: BSD-3-Clause
icon: i2pd-logo.png icon: snap/gui/i2pd.png
type: app base: core20
grade: stable grade: stable
confinement: strict confinement: strict
@ -18,38 +21,47 @@ apps:
daemon: daemon:
command: i2pd-wrapper command: i2pd-wrapper
daemon: simple daemon: simple
plugs: [network,network-bind] plugs:
- network
- network-bind
graceful-shutdown: graceful-shutdown:
command: kill -2 `cat $SNAP_DATA/datadir/i2pd.pid` command: i2pd-wrapper graceful
reload-tunnels-conf: reload-tunnels-conf:
command: kill -1 `cat $SNAP_DATA/datadir/i2pd.pid` command: i2pd-wrapper reload
parts: parts:
i2pd: i2pd:
plugin: make
source: https://github.com/PurpleI2P/i2pd.git source: https://github.com/PurpleI2P/i2pd.git
source-type: git source-type: git
source-tag: 2.45.1 #source-tag: 2.45.1
plugin: make source-commit: 6ca6591c4365d62873eeac6328e5b1932862a614
make-parameters:
- USE_UPNP=yes
- DEBUG=no
build-packages: build-packages:
- build-essential - build-essential
- libboost-date-time-dev - libboost-date-time-dev
- libboost-filesystem-dev - libboost-filesystem-dev
- libboost-program-options-dev - libboost-program-options-dev
- libboost-system-dev - libboost-system-dev
- libminiupnpc-dev - libminiupnpc-dev
- libssl-dev - libssl-dev
- zlib1g-dev - zlib1g-dev
artifacts: override-build: |
- i2pd make DEBUG=no USE_UPNP=yes -j`nproc`
- contrib/certificates mkdir $SNAPCRAFT_PART_INSTALL/appdata
- contrib/i2pd.conf cp i2pd $SNAPCRAFT_PART_INSTALL/bin
organize: cp -r contrib/i2pd.conf contrib/tunnels.conf contrib/certificates $SNAPCRAFT_PART_INSTALL/appdata
i2pd: bin/ stage-packages:
contrib/*: . - libboost-date-time1.71.0
- libboost-filesystem1.71.0
- libboost-program-options1.71.0
- libboost-system1.71.0
- libminiupnpc17
- libssl1.1
- zlib1g
wrapper: wrapper:
plugin: dump plugin: dump
source: snap/local/ source: snap/local/
stage: [i2pd-wrapper] stage:
- i2pd-wrapper

Loading…
Cancel
Save