Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #
  2. # Copyright (C) 2022 Jo-Philipp Wich <jo@mein.io>
  3. #
  4. # This is free software, licensed under the Apache License, Version 2.0 .
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=luci-base
  8. PKG_BUILD_FLAGS:=no-lto
  9. LUCI_TYPE:=mod
  10. LUCI_BASENAME:=base
  11. LUCI_TITLE:=LuCI core runtime
  12. LUCI_DEPENDS:=\
  13. +rpcd \
  14. +rpcd-mod-file \
  15. +rpcd-mod-luci \
  16. +rpcd-mod-ucode \
  17. +cgi-io \
  18. +ucode \
  19. +ucode-mod-fs \
  20. +ucode-mod-uci \
  21. +ucode-mod-ubus \
  22. +ucode-mod-math \
  23. +ucode-mod-html \
  24. +liblucihttp-ucode
  25. PKG_LICENSE:=Apache-2.0
  26. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)
  27. include $(INCLUDE_DIR)/host-build.mk
  28. define Package/luci-base/conffiles
  29. /etc/luci-uploads
  30. /etc/config/luci
  31. endef
  32. define Package/luci-base/postinst
  33. #!/bin/sh
  34. if [ -z "$${PKG_INSTROOT}" ] && [ -f /etc/config/uhttpd ]; then
  35. if ! uci -q get uhttpd.main.ucode_prefix | grep -sq /cgi-bin/luci; then
  36. uci add_list uhttpd.main.ucode_prefix='/cgi-bin/luci=/usr/share/ucode/luci/uhttpd.uc'
  37. uci commit uhttpd
  38. service uhttpd reload
  39. fi
  40. fi
  41. exit 0
  42. endef
  43. include ../../luci.mk
  44. define Host/Configure
  45. endef
  46. define Host/Compile
  47. $(MAKE) -C src/ clean po2lmo jsmin
  48. endef
  49. define Host/Install
  50. $(INSTALL_DIR) $(1)/bin
  51. $(INSTALL_BIN) src/po2lmo $(1)/bin/po2lmo
  52. $(INSTALL_BIN) src/jsmin $(1)/bin/jsmin
  53. endef
  54. $(eval $(call HostBuild))
  55. # call BuildPackage - OpenWrt buildroot signature