summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorskydrome2020-02-08 01:40:16 -0500
committerskydrome2020-02-08 01:40:16 -0500
commit6976fb77aaa9b8adddf822cb1abc808615fe0172 (patch)
tree910bfa05fd3a6942be2b393491ec3c12d647b4d5
parent2d93ec800efc29d2ab36d55bef714ce94966f4e4 (diff)
downloadaur-6976fb77aaa9b8adddf822cb1abc808615fe0172.tar.gz
add chromium-i2p launcher for i2p
-rw-r--r--PKGBUILD10
-rw-r--r--chromium-i2p.sh58
2 files changed, 64 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index dd10ec6cdf75..c35f3b20e32d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,7 +28,7 @@ _url="https://launchpad.net/i2p/trunk/${pkgver}/+download"
source=("${_url}/i2psource_${pkgver}.tar.bz2"{,.sig}
'i2prouter.service' 'i2p.tmpfiles' 'wrapper.config' 'router.config'
- 'i2prouter.bash' 'i2prouter.sh'
+ 'i2prouter.bash' 'i2prouter.sh' 'chromium-i2p.sh'
upstream-fixes.patch::'https://github.com/i2p/i2p.i2p/compare/f2f29d6...cad3c46.patch')
sha256sums=('9f03a636e2dc7e25455fb75869b3a8313fd177d231e056b0556159efec4d6d9d'
@@ -39,12 +39,14 @@ sha256sums=('9f03a636e2dc7e25455fb75869b3a8313fd177d231e056b0556159efec4d6d9d'
'7a4688db826c3dddb762976cd8c9a5d465255c3577069243d8e5af941a4126e2'
'7a19b9f90c8792460fd58e8b8aa435a065e34d29a942479850472510e9d3078a'
'b5f1a5bb354552acebe2857b9579410f7fd589f2f7d6b12fbbfe4127a2d33fd8'
+ '2d5ae5f5379e6ea095bb30c374b493b1fdd47b06aa536760c6c73bb062eb6eef'
'ad7cf01d7fcc7107dc3360ad4b3f488cdcf2bab64c7d271d2ced89c2f942f613')
prepare() {
cd "$pkgname-$pkgver"
sed 's|BUILD = 1|BUILD = 0|' -i ../upstream-fixes.patch
patch -Np1 -i ../upstream-fixes.patch
+ #patch -Np0 -i $startdir/clock-tuning.patch
}
build() {
@@ -74,6 +76,7 @@ package() {
install -Dm644 "$srcdir/router.config" "opt/i2p/router.config"
install -Dm644 "$srcdir/wrapper.config" "opt/i2p/wrapper.config"
install -Dm755 "$srcdir/i2prouter.sh" "opt/i2p/i2prouter"
+ install -Dm755 "$srcdir/chromium-i2p.sh" "opt/i2p/scripts/chromium-i2p"
install -Dm644 "$srcdir/i2prouter.bash" "usr/share/bash-completion/completions/i2prouter"
install -Dm644 "$srcdir/$pkgname-$pkgver/installer/resources/bash-completion/eepget" \
@@ -84,13 +87,12 @@ package() {
mv opt/i2p/licenses/* "usr/share/licenses/i2p/"
ln -s /opt/i2p/{eepget,i2prouter} "usr/bin/"
- chmod +x opt/i2p/{eepget,i2prouter}
- chmod -x opt/i2p/*.config
+ chmod +x opt/i2p/eepget
sed -i opt/i2p/eepget \
-e 's:%INSTALL_PATH:/opt/i2p:g'
- # dont automatically start the webserver (3) or open a webbrowser (4)
+ # dont automatically start the webserver(3) or open a webbrowser(4)
sed -i opt/i2p/clients.config \
-e "s:clientApp.3.startOnLoad=.*:clientApp.3.startOnLoad=false:" \
-e "s:clientApp.4.startOnLoad=.*:clientApp.4.startOnLoad=false:"
diff --git a/chromium-i2p.sh b/chromium-i2p.sh
new file mode 100644
index 000000000000..e9a9181fcccd
--- /dev/null
+++ b/chromium-i2p.sh
@@ -0,0 +1,58 @@
+ #!/usr/bin/env bash
+set -e
+
+DATADIR=${XDG_CONFIG_HOME:-$HOME/.config}/chromium-i2p
+
+[[ ! -f $DATADIR/.config ]] && {
+ echo "creating config..."
+ install -dm700 $DATADIR
+ cat <<< '
+CACHEDIR=/dev/shm/chromium-i2p # store in ram, or
+#CACHEDIR=$DATADIR/.tmp # keep on disk
+CACHESIZE=128000000 # cache size in bytes
+
+INCOGNITO=--incognito # comment out if you wish to have
+ # urlhistory, passwords, etc. saved
+PROXY=127.0.0.1:4444
+CONSOLE=127.0.0.1:7657
+' >$DATADIR/.config
+ echo "$DATADIR/.config"
+}
+
+source $DATADIR/.config
+
+/usr/bin/chromium "$INCOGNITO" \
+ --user-data-dir="$DATADIR" \
+ --disk-cache-dir="$CACHEDIR" \
+ --disk-cache-size="$CACHESIZE" \
+ --proxy-server="$PROXY" \
+ --proxy-bypass-list=127.0.0.1,localhost \
+ --{connectivity-check,gcm-checkin,gcm-registration,crash-server,google-apis,google-base,override-metrics-upload,realtime-reporting,test-logging}-url=null \
+ --disable-3d-apis \
+ --disable-account-consistency \
+ --disable-background-networking \
+ --disable-breakpad \
+ --disable-bundled-ppapi-flash \
+ --disable-client-side-phishing-detection \
+ --disable-cloud-import \
+ --disable-default-apps \
+ --disable-domain-reliability \
+ --disable-file-system \
+ --disable-logging \
+ --disable-notifications \
+ --disable-ntp-popular-sites \
+ --disable-reading-from-canvas \
+ --disable-remote-fonts \
+ --disable-speech-api \
+ --disable-sync \
+ --disable-translate \
+ --disable-voice-input \
+ --enable-low-end-device-mode \
+ --enable-strict-mixed-content-checking \
+ --force-dark-mode \
+ --no-default-browser-check \
+ --no-pings \
+ --no-report-upload \
+ --site-per-process \
+ --use-fake-device-for-media-stream \
+ ${@:-$CONSOLE}