Commit e958336d authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

remove Lua version number from source file

parent 8e0c7cb2
# Installer Makefile for Alpine Wall
# Copyright (C) 2012-2013 Kaarle Ritvanen
# Copyright (C) 2012-2014 Kaarle Ritvanen
# See LICENSE file for license details
ROOT_DIR := /
LUA_VERSION := 5.1
poldir := usr/share/awall
resdir := usr/share/awall
confdir := etc/awall
all: install
......@@ -34,17 +34,21 @@ files += $(2)
endef
$(eval $(call copy,awall,usr/share/lua/$(LUA_VERSION)/awall,lua))
$(eval $(call copy,json,$(poldir)/mandatory,json))
$(eval $(call copy,json,$(resdir)/mandatory,json))
$(eval $(call rename,awall-cli,usr/sbin/awall,755))
$(eval $(call rename,sample-policy.json,$(poldir)/sample/sample-policy.json,644))
$(eval $(call rename,sample-policy.json,$(resdir)/sample/sample-policy.json,644))
$(eval $(call mkdir,$(confdir)))
$(eval $(call mkdir,$(confdir)/optional))
$(eval $(call mkdir,$(confdir)/private))
$(eval $(call mkdir,$(poldir)/optional))
$(eval $(call mkdir,$(poldir)/private))
$(eval $(call mkdir,$(resdir)/optional))
$(eval $(call mkdir,$(resdir)/private))
install: $(foreach f,$(files),$(ROOT_DIR)/$(f))
$(ROOT_DIR)/$(resdir)/modules:
install -d $(dir $@)
ln -s ../lua/$(LUA_VERSION)/awall/modules $@
install: $(foreach f,$(files),$(ROOT_DIR)/$(f)) $(ROOT_DIR)/$(resdir)/modules
.PHONY: all
......@@ -46,7 +46,7 @@ function M.loadmodules(path)
if path then lfs.chdir(path) end
local modules = {}
for modfile in lfs.dir((path or '/usr/share/lua/5.1')..'/awall/modules') do
for modfile in lfs.dir((path or '/usr/share')..'/awall/modules') do
if stringy.endswith(modfile, '.lua') then
table.insert(modules, 'awall.modules.'..modfile:sub(1, -5))
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment