new package: surf

This commit is contained in:
Tee KOBAYASHI 2022-04-24 07:42:03 +09:00 committed by xtkoba
parent 0de794c1d1
commit abbfb668b2
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,11 @@
TERMUX_PKG_HOMEPAGE=https://surf.suckless.org/
TERMUX_PKG_DESCRIPTION="A simple web browser based on WebKit2/GTK+"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.1
TERMUX_PKG_SRCURL=https://dl.suckless.org/surf/surf-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=72e582920ba25a646203e93c2d2331d87f03037a28894d6c7e99af00ee043257
TERMUX_PKG_DEPENDS="gcr, glib, gtk3, libx11, webkit2gtk"
TERMUX_PKG_RECOMMENDS="curl, dmenu, st, xorg-xprop"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="PREFIX=$TERMUX_PREFIX"

View File

@ -0,0 +1,37 @@
--- a/config.def.h
+++ b/config.def.h
@@ -66,7 +66,7 @@
/* SETPROP(readprop, setprop, prompt)*/
#define SETPROP(r, s, p) { \
- .v = (const char *[]){ "/bin/sh", "-c", \
+ .v = (const char *[]){ "@TERMUX_PREFIX@/bin/sh", "-c", \
"prop=\"$(printf '%b' \"$(xprop -id $1 $2 " \
"| sed \"s/^$2(STRING) = //;s/^\\\"\\(.*\\)\\\"$/\\1/\")\" " \
"| dmenu -p \"$4\" -w $1)\" && xprop -id $1 -f $3 8s -set $3 \"$prop\"", \
@@ -76,7 +76,7 @@
/* DOWNLOAD(URI, referer) */
#define DOWNLOAD(u, r) { \
- .v = (const char *[]){ "st", "-e", "/bin/sh", "-c",\
+ .v = (const char *[]){ "st", "-e", "@TERMUX_PREFIX@/bin/sh", "-c",\
"curl -g -L -J -O -A \"$1\" -b \"$2\" -c \"$2\"" \
" -e \"$3\" \"$4\"; read", \
"surf-download", useragent, cookiefile, r, u, NULL \
@@ -88,14 +88,14 @@
* "http://" or "https://" should be opened.
*/
#define PLUMB(u) {\
- .v = (const char *[]){ "/bin/sh", "-c", \
+ .v = (const char *[]){ "@TERMUX_PREFIX@/bin/sh", "-c", \
"xdg-open \"$0\"", u, NULL \
} \
}
/* VIDEOPLAY(URI) */
#define VIDEOPLAY(u) {\
- .v = (const char *[]){ "/bin/sh", "-c", \
+ .v = (const char *[]){ "@TERMUX_PREFIX@/bin/sh", "-c", \
"mpv --really-quiet \"$0\"", u, NULL \
} \
}