mirror of
https://github.com/openwrt/routing.git
synced 2025-12-21 14:54:33 +04:00
Use INSTALL_CONF instead of INSTALL_DATA to install configuration files under /etc with correct permissions. This improves security by ensuring config files are not world-readable. INSTALL_DATA sets mode 0644, while INSTALL_CONF sets mode 0600. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
58 lines
1.7 KiB
Makefile
58 lines
1.7 KiB
Makefile
# call BuildPackage - OpenWrt buildroot signature
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=luci-app-olsrd2
|
|
PKG_VERSION:=0.2.6
|
|
PKG_RELEASE:=17
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/luci-app-olsrd2
|
|
SECTION:=luci
|
|
CATEGORY:=LuCI
|
|
SUBMENU:=3. Applications
|
|
TITLE:=OLSR2 configuration and status module
|
|
MAINTAINER:=Patrick Grimm <patrick@lunatiki.de>
|
|
EXTRA_DEPENDS:=oonf-olsrd2, luci-mod-admin-full
|
|
PKGARCH:=all
|
|
endef
|
|
|
|
define Build/Prepare
|
|
endef
|
|
|
|
define Build/Configure
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/postinst
|
|
#!/bin/sh
|
|
if [ -z $${IPKG_INSTROOT} ] ; then
|
|
rm -f /tmp/luci-indexcache
|
|
rm -rf /tmp/luci-modulecache/
|
|
killall -HUP rpcd 2>/dev/null
|
|
fi
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/install
|
|
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/olsrd2
|
|
$(INSTALL_DATA) ./htdocs/cgi-bin-olsrd2-neigh.html $(1)/www
|
|
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/olsrd2/* $(1)/www/luci-static/resources/view/olsrd2
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_CONF) ./root/etc/config/* $(1)/etc/config
|
|
$(INSTALL_DIR) $(1)/usr/share/ucitrack
|
|
$(INSTALL_DATA) ./root/usr/share/ucitrack/luci-app-olsrd2.json $(1)/usr/share/ucitrack
|
|
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
|
|
$(INSTALL_BIN) ./root/usr/libexec/rpcd/status.olsrd2 $(1)/usr/libexec/rpcd/status.olsrd2
|
|
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d
|
|
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/* $(1)/usr/share/luci/menu.d
|
|
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
|
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/* $(1)/usr/share/rpcd/acl.d
|
|
$(INSTALL_DIR) $(1)/lib/functions
|
|
$(INSTALL_DATA) ./root/lib/functions/* $(1)/lib/functions
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,luci-app-olsrd2))
|