summaryrefslogtreecommitdiffstats
path: root/net/adblock/Makefile
blob: 08a11d73a4496e58a977564b18db3e9aec1eef9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=adblock
PKG_VERSION:=1.5.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>

include $(INCLUDE_DIR)/package.mk

define Package/$(PKG_NAME)
	SECTION:=net
	CATEGORY:=Network
	TITLE:=Powerful adblock script to block ad/abuse domains
	PKGARCH:=all
endef

define Package/$(PKG_NAME)/description
Powerful adblock script to block ad/abuse domains.
The script supports many domain blacklist sites plus manual black- and whitelist overrides.
Please see https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md for further information.

endef

define Package/$(PKG_NAME)/conffiles
/etc/config/adblock
/etc/adblock/adblock.whitelist
/etc/adblock/adblock.blacklist
endef

define Build/Prepare
endef

define Build/Configure
endef

define Build/Compile
endef

define Package/$(PKG_NAME)/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) ./files/adblock-update.sh $(1)/usr/bin/
	$(INSTALL_DATA) ./files/adblock-helper.sh $(1)/usr/bin/

	$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
	$(INSTALL_BIN) ./files/adblock.hotplug $(1)/etc/hotplug.d/iface/90-adblock

	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/adblock.init $(1)/etc/init.d/adblock

	$(INSTALL_DIR) $(1)/etc/config
	$(INSTALL_CONF) ./files/adblock.conf $(1)/etc/config/adblock

	$(INSTALL_DIR) $(1)/etc/adblock
	$(INSTALL_CONF) ./files/adblock.conf $(1)/etc/adblock/adblock.conf.default
	$(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock/
	$(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock/

	$(INSTALL_DIR) $(1)/www/adblock
	$(INSTALL_DATA) ./files/www/adblock/* $(1)/www/adblock/
endef

$(eval $(call BuildPackage,$(PKG_NAME)))