Skip to content

Commit 9a72f16

Browse files
authored
Update Makefile
Resolve the issue of incorrect makefile format during compilation.
1 parent dba9844 commit 9a72f16

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

Makefile

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,64 +10,64 @@ PKG_MAINTAINER:=Sense <[email protected]>
1010
include $(INCLUDE_DIR)/package.mk
1111

1212
define Package/$(PKG_NAME)
13-
SECTION:=net
14-
CATEGORY:=Network
15-
SUBMENU:=IP Addresses and Names
16-
TITLE:=DDNS extension for AliYun.com
17-
PKGARCH:=all
18-
DEPENDS:=+ddns-scripts +wget +openssl-util
13+
SECTION:=net
14+
CATEGORY:=Network
15+
SUBMENU:=IP Addresses and Names
16+
TITLE:=DDNS extension for AliYun.com
17+
PKGARCH:=all
18+
DEPENDS:=+ddns-scripts +wget +openssl-util
1919
endef
2020

2121
define Package/$(PKG_NAME)/description
22-
Dynamic DNS Client scripts extension for AliYun.com
22+
Dynamic DNS Client scripts extension for AliYun.com
2323
endef
2424

2525
define Build/Configure
2626
endef
2727

2828
define Build/Compile
29-
$(CP) ./*.{sh,json} $(PKG_BUILD_DIR)
29+
$(CP) ./*.{sh,json} $(PKG_BUILD_DIR)
3030
endef
3131

3232
define Package/$(PKG_NAME)/preinst
33-
#!/bin/sh
34-
# if NOT run buildroot then stop service
35-
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
36-
exit 0 # suppress errors
33+
#!/bin/sh
34+
# if NOT run buildroot then stop service
35+
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
36+
exit 0 # suppress errors
3737
endef
3838

3939
define Package/$(PKG_NAME)/install
40-
$(INSTALL_DIR) $(1)/usr/lib/ddns
41-
$(INSTALL_BIN) $(PKG_BUILD_DIR)/update_aliyun_com.sh $(1)/usr/lib/ddns
42-
$(INSTALL_DIR) $(1)/usr/share/ddns/default
43-
$(INSTALL_BIN) $(PKG_BUILD_DIR)/aliyun.com.json $(1)/usr/share/ddns/default
40+
$(INSTALL_DIR) $(1)/usr/lib/ddns
41+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/update_aliyun_com.sh $(1)/usr/lib/ddns
42+
$(INSTALL_DIR) $(1)/usr/share/ddns/default
43+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/aliyun.com.json $(1)/usr/share/ddns/default
4444

4545
endef
4646

4747
define Package/$(PKG_NAME)/postinst
48-
#!/bin/sh
49-
# remove old services file entries
50-
/bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
51-
/bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
52-
# and create new
53-
printf "%s\\t\\t%s\\n" '"aliyun.com"' '"update_aliyun_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
54-
printf "%s\\t\\t%s\\n" '"aliyun.com"' '"update_aliyun_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
55-
# on real system restart service if enabled
56-
[ -z "$${IPKG_INSTROOT}" ] && {
57-
/etc/init.d/ddns enabled && \
58-
/etc/init.d/ddns start >/dev/null 2>&1
59-
}
60-
exit 0 # suppress errors
48+
#!/bin/sh
49+
# remove old services file entries
50+
/bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
51+
/bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
52+
# and create new
53+
printf "%s\\t\\t%s\\n" '"aliyun.com"' '"update_aliyun_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
54+
printf "%s\\t\\t%s\\n" '"aliyun.com"' '"update_aliyun_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
55+
# on real system restart service if enabled
56+
[ -z "$${IPKG_INSTROOT}" ] && {
57+
/etc/init.d/ddns enabled && \
58+
/etc/init.d/ddns start >/dev/null 2>&1
59+
}
60+
exit 0 # suppress errors
6161
endef
6262

6363
define Package/$(PKG_NAME)/prerm
64-
#!/bin/sh
65-
# if NOT run buildroot then stop service
66-
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
67-
# remove services file entries
68-
/bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
69-
/bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
70-
exit 0 # suppress errors
64+
#!/bin/sh
65+
# if NOT run buildroot then stop service
66+
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
67+
# remove services file entries
68+
/bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
69+
/bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
70+
exit 0 # suppress errors
7171
endef
7272

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

0 commit comments

Comments
 (0)