Skip to content

Commit

Permalink
Simplify code (pexcn#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 authored Sep 26, 2020
1 parent 0eba2a3 commit 6ca03cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 34 deletions.
39 changes: 5 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,39 +1,10 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-chinadns-ng
PKG_VERSION:=1.0
PKG_RELEASE:=4

include $(INCLUDE_DIR)/package.mk

define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=LuCI support for chinadns-ng
LUCI_DEPENDS:=+chinadns-ng
endef

define Build/Prepare
$(foreach po,$(wildcard ${CURDIR}/luasrc/i18n/*.po), \
po2lmo $(po) ${CURDIR}/luasrc/i18n/$(patsubst %.po,%.lmo,$(notdir $(po)));)
endef

define Build/Configure
endef
PKG_RELEASE:=5

define Build/Compile
endef
LUCI_TITLE:=LuCI support for chinadns-ng
LUCI_DEPENDS:=+chinadns-ng

define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d/
$(INSTALL_DATA) root/usr/share/rpcd/acl.d/luci-app-chinadns-ng.json $(1)/usr/share/rpcd/acl.d/luci-app-chinadns-ng.json
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
$(INSTALL_DATA) ${CURDIR}/luasrc/i18n/*.lmo $(1)/usr/lib/lua/luci/i18n/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi
$(INSTALL_DATA) luasrc/model/cbi/chinadns-ng.lua $(1)/usr/lib/lua/luci/model/cbi/chinadns-ng.lua
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_DATA) luasrc/controller/chinadns-ng.lua $(1)/usr/lib/lua/luci/controller/chinadns-ng.lua
endef
include $(TOPDIR)/feeds/luci/luci.mk

$(eval $(call BuildPackage,$(PKG_NAME)))
# call BuildPackage - OpenWrt buildroot signature
Binary file removed luasrc/i18n/chinadns-ng.zh-cn.lmo
Binary file not shown.
File renamed without changes.

0 comments on commit 6ca03cd

Please sign in to comment.