This commit is contained in:
jun7 2023-02-12 11:02:20 +09:00
parent 9f117999bc
commit 3d8bbc9095
3 changed files with 15 additions and 23 deletions

View File

@ -1,17 +0,0 @@
# Maintainer: jun7 <jun7@hush.com>
pkgname=wyebadblock-vimb
pkgver=1
pkgrel=1
pkgdesc="adblock link to wyebadblock for vimb."
arch=('x86_64')
url="https://github.com/jun7/wyebadblock"
license=('GPL3')
depends=('wyebadblock-git' 'vimb')
makedepends=()
source=()
package() {
mkdir -p "$pkgdir/usr/lib/vimb"
ln -s /usr/lib/wyebrowser/adblock.so "$pkgdir/usr/lib/vimb"
}

View File

@ -26,6 +26,11 @@ wyebadblock only checks 'easylist.txt'
You can check whether wyebab has found easylist.txt by `wyebab --css`
## for webkit2gtk-4.1
WEBKITVER=4.1 make
sudo WEBKITVER=4.1 make install
Make sure this adds a dir /4.1 before the adblock.so
## Addition for other webkit2gtk browsers
webkit2gtk loads extensions in a dir designated by each apps.
So we have to make a link to wyebab in the dir.
@ -53,9 +58,7 @@ There is a PKGBUILD file. see the 'PKGBULDs' dir.
### vimb
sudo ln -s /usr/lib/wyebrowser/adblock.so /usr/lib/vimb
There is a PKGBUILD file. see the 'PKGBULDs' dir.
sudo ln -s /usr/lib/wyebrowser/4.1/adblock.so /usr/lib/vimb
If the path doesn't work, check https://fanglingsu.github.io/vimb/howto.html#block

View File

@ -1,6 +1,11 @@
LISTNAME=easylist.txt
PREFIX ?= /usr
WEBKITVER ?= 4.0
EXTENSION_DIR ?= $(PREFIX)/lib/wyebrowser
ifneq ($(WEBKITVER), 4.0)
VERDIR=/$(WEBKITVER)
endif
ifeq ($(DEBUG), 1)
CFLAGS += -Wall
else
@ -13,7 +18,7 @@ all: adblock.so wyebab librun.o testrun
adblock.so: ab.c ephy-uri-tester.c ephy-uri-tester.h librun.o makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< librun.o -shared -fPIC \
`pkg-config --cflags --libs gtk+-3.0 glib-2.0 webkit2gtk-4.0` \
`pkg-config --cflags --libs gtk+-3.0 glib-2.0 webkit2gtk-$(WEBKITVER)` \
$(DDEBUG) -DISEXT -DEXENAME=\"wyebab\"
wyebab: ab.c ephy-uri-tester.c ephy-uri-tester.h librun.o makefile
@ -39,11 +44,12 @@ clean:
install:
install -Dm755 wyebab $(DESTDIR)$(PREFIX)/bin/wyebab
install -Dm755 adblock.so $(DESTDIR)$(EXTENSION_DIR)/adblock.so
install -Dm755 adblock.so $(DESTDIR)$(EXTENSION_DIR)$(VERDIR)/adblock.so
uninstall:
rm -f $(PREFIX)/bin/wyebab
rm -f $(EXTENSION_DIR)/adblock.so
rm -f $(EXTENSION_DIR)$(VERDIR)/adblock.so
-rmdir $(EXTENSION_DIR)$(VERDIR)
-rmdir $(EXTENSION_DIR)