|
1 | | -SRC_NAME = smartdns-38.1 |
2 | | -SRC_URL=https://github.com/pymumu/smartdns/archive/refs/tags/Release42.tar.gz |
| 1 | +include $(ROOTDIR)/rules.mk |
3 | 2 |
|
4 | | -THISDIR = $(shell pwd) |
| 3 | +PKG_NAME:=smartdns |
| 4 | +PKG_VERSION:=1.2023.43 |
5 | 5 |
|
6 | | -all: download_test extract_test config_test |
7 | | - $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME) |
| 6 | +PKG_SOURCE_PROTO:=git |
| 7 | +PKG_SOURCE_URL:=https://www.github.com/pymumu/smartdns.git |
| 8 | +PKG_SOURCE_VERSION:=1ba6ee7cb98b5b6448bc2a2be318eb3518d4de79 |
| 9 | +PKG_MIRROR_HASH:=a31c1d79ffb253507a1a8e0bb8e6d93fa65efef22a3cdd098400157187bbfe20 |
8 | 10 |
|
9 | | -download_test: |
10 | | - ( if [ ! -f $(THISDIR)/$(SRC_NAME).tar.gz ]; then \ |
11 | | - wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \ |
12 | | - fi ) |
| 11 | +include $(INCLUDE_DIR)/package.mk |
13 | 12 |
|
14 | | -extract_test: |
15 | | - ( if [ ! -d $(SRC_NAME) ]; then \ |
16 | | - mkdir $(SRC_NAME); \ |
17 | | - tar zxf $(SRC_NAME).tar.gz --strip-components=1 -C $(SRC_NAME) ; \ |
18 | | - fi ) |
19 | | - |
20 | | -config_test: |
21 | | - ( if [ -f ./config_done ]; then \ |
22 | | - echo "the same configuration"; \ |
23 | | - else \ |
24 | | - touch config_done; \ |
25 | | - fi ) |
26 | | - |
27 | | -clean: |
28 | | - if [ -f $(SRC_NAME)/Makefile ] ; then \ |
29 | | - $(MAKE) -C $(SRC_NAME) clean ; \ |
30 | | - fi ; \ |
31 | | - rm -f config_done |
| 13 | +$(eval $(call BuildPackage,smartdns)) |
32 | 14 |
|
33 | 15 | romfs: |
34 | | - $(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME)/src/smartdns /usr/bin/smartdns |
35 | | - $(ROMFSINST) -p +x $(THISDIR)/smartdns.sh /usr/bin/smartdns.sh |
36 | | - $(ROMFSINST) /etc_ro/smartdns_address.conf |
37 | | - $(ROMFSINST) /etc_ro/smartdns_blacklist-ip.conf |
38 | | - $(ROMFSINST) /etc_ro/smartdns_custom.conf |
39 | | - $(ROMFSINST) /etc_ro/smartdns_whitelist-ip.conf |
| 16 | + $(INSTALL_DIR) $(ROMFSDIR)/usr/bin |
| 17 | + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smartdns $(ROMFSDIR)/usr/bin/smartdns |
| 18 | + $(INSTALL_BIN) ./smartdns.sh $(ROMFSDIR)/usr/bin/smartdns.sh |
| 19 | + $(INSTALL_DIR) $(ROMFSDIR)/etc_ro |
| 20 | + $(INSTALL_DATA) ./conf/*.conf $(ROMFSDIR)/etc_ro/ |
0 commit comments