From baf8f3e948f4bea34383cfecbf2cd1d2c7d2f00b Mon Sep 17 00:00:00 2001 From: Herbert Leuwer Date: Thu, 12 Dec 2024 20:44:56 +0100 Subject: [PATCH] added target rock in makefile --- README | 7 +++++++ config | 6 +++++- luasnmp-1.1.1-1.rockspec | 4 ++-- makefile | 5 +++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README b/README index 8ff1346..f999e76 100644 --- a/README +++ b/README @@ -82,7 +82,14 @@ LuaSNMP as user root in order to install all relevant files in standard places. The directory /usr/local is the default install prefix. + + +* Installation via Luarocks + ------------------------- + LuaSNMP can be installed via Luarocks. + Type + sudo luarocks --lua-version=5.x install luasnmp LV=5.x * Trap-sink Daemon diff --git a/config b/config index 9ef8595..41dc78e 100644 --- a/config +++ b/config @@ -5,7 +5,7 @@ SYSTEM = $(shell uname) MODULE=luasnmp # Lua Version to use: -LV = 5.3 +LV = 5.2 V = $(subst .,,$(LV)) # Debugging 1 or 0 @@ -23,6 +23,10 @@ INSTALL_EXEC = $(INSTALL) -m 0755 INSTALL_DATA = $(INSTALL) -m 0644 INSTALL_COPY = cp -p -r +# Luarocks stuff +RV?=1.1.1-1 +ROCKSPEC=luasnmp-$(RV).rockspec + # == YOU PROBABLY DO NOT NEED TO CHANGE ANYTHING BELOW ======================= # Platform specific differences diff --git a/luasnmp-1.1.1-1.rockspec b/luasnmp-1.1.1-1.rockspec index babcd7d..552188a 100644 --- a/luasnmp-1.1.1-1.rockspec +++ b/luasnmp-1.1.1-1.rockspec @@ -1,8 +1,8 @@ package="LuaSNMP" -version="1.1.0-1" +version="1.1.1-1" -- LuaDist source source = { - tag = "1.1.0-1", + tag = "1.1.1-1", url = "git://github.com/hleuwer/luasnmp.git" } description = { diff --git a/makefile b/makefile index 02bf692..3b0ba56 100644 --- a/makefile +++ b/makefile @@ -30,6 +30,11 @@ install-doc: uninstall-doc: rm -rf $(INSTALL_DOC) +.PHONY: rock + +rock:: + luarocks --lua-version=$(LV) pack $(ROCKSPEC) + .PHONY: test testd testtrap testtrapd testtraponly testtraponlyd test: $(LUABIN) test.lua -- 2.11.4.GIT