Skip to content

Commit 0c7a8f6

Browse files
committed
chore(rockspec) add scm rockspec and a ./rockspecs directory
1 parent 0475e60 commit 0c7a8f6

File tree

3 files changed

+58
-4
lines changed

3 files changed

+58
-4
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ Then you may install the luamqtt library itself:
8282
luarocks install luamqtt
8383
```
8484

85+
Or for development purposes;
86+
```sh
87+
# development branch:
88+
luarocks install luamqtt --dev
89+
90+
# or from the cloned repo:
91+
luarocks make
92+
```
93+
8594
[LuaRocks page](http://luarocks.org/modules/xhaskx/luamqtt)
8695

8796
# Examples
@@ -193,10 +202,10 @@ Standard MIT License, see LICENSE file for full text
193202
* in file `./mqtt/const.lua`: change `_VERSION` table field
194203
* in file `./openwrt/make-package-without-openwrt-sources.sh`: change `Version: X.Y.Z-P` in $PKG_ROOT/control
195204
* in file `./openwrt/Makefile`: change `PKG_VERSION:=X.Y.Z` and maybe `PKG_RELEASE:=1`
196-
* in file `./luamqtt-X.Y.Z-P.rockspec`: change `version = "X.Y.Z-P"`, `tag = "vX.Y.Z"`, and rename the file itself
205+
* copy file `./luamqtt-scm-1.rockspec` to `./rockspecs/luamqtt-X.Y.Z-1.rockspec` change `local package_version = "scm"`, `local package_version = "X.Y.Z"`
197206
* run `./tests/run-luacheck.sh` and check output for errors
198207
* run `./tests/run-for-all-lua-versions.sh` and check output for errors
199208
* run `./openwrt/make-package-without-openwrt-sources.sh` and check output for errors
200209
* run `git commit`, `git tag vX.Y.Z`
201-
* upload renamed `./luamqtt-X.Y.Z-P.rockspec` to https://luarocks.org/upload
202-
* run `git push`, `git push --tags`
210+
* run `git push`, `git push --tags`
211+
* upload to LuaRocks; `luarocks upload ./rockspecs/luamqtt-X.Y.Z-1.rockspec --api-key=ABCDEFGH`

luamqtt-scm-1.rockspec

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
local package_name = "luamqtt"
2+
local package_version = "scm"
3+
local rockspec_revision = "1"
4+
local github_account_name = "xHasKx"
5+
local github_repo_name = "luamqtt"
6+
7+
package = package_name
8+
version = package_version.."-"..rockspec_revision
9+
source = {
10+
url = "git+https://github.com/"..github_account_name.."/"..github_repo_name..".git",
11+
branch = (package_version == "scm") and "master" or nil,
12+
tag = (package_version ~= "scm") and "v"..package_version or nil,
13+
}
14+
description = {
15+
summary = "luamqtt - Pure-lua MQTT v3.1.1 and v5.0 client",
16+
detailed = [[
17+
luamqtt - MQTT v3.1.1 and v5.0 client library written in pure-lua.
18+
The only dependency is luasocket to establish network connection to MQTT broker.
19+
No C-dependencies.
20+
]],
21+
homepage = "https://github.com/"..github_account_name.."/"..github_repo_name,
22+
license = "MIT",
23+
}
24+
dependencies = {
25+
"lua >= 5.1, <= 5.4",
26+
"luasocket >= 3.0rc1-2",
27+
}
28+
build = {
29+
type = "builtin",
30+
modules = {
31+
mqtt = "mqtt/init.lua",
32+
["mqtt.client"] = "mqtt/client.lua",
33+
["mqtt.const"] = "mqtt/const.lua",
34+
["mqtt.ioloop"] = "mqtt/ioloop.lua",
35+
["mqtt.bit53"] = "mqtt/bit53.lua",
36+
["mqtt.bitwrap"] = "mqtt/bitwrap.lua",
37+
["mqtt.luasocket"] = "mqtt/luasocket.lua",
38+
["mqtt.luasocket_ssl"] = "mqtt/luasocket_ssl.lua",
39+
["mqtt.luasocket-copas"] = "mqtt/luasocket-copas.lua",
40+
["mqtt.ngxsocket"] = "mqtt/ngxsocket.lua",
41+
["mqtt.protocol"] = "mqtt/protocol.lua",
42+
["mqtt.protocol4"] = "mqtt/protocol4.lua",
43+
["mqtt.protocol5"] = "mqtt/protocol5.lua",
44+
["mqtt.tools"] = "mqtt/tools.lua",
45+
},
46+
}

luamqtt-3.4.3-1.rockspec renamed to rockspecs/luamqtt-3.4.3-1.rockspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ build = {
2323
modules = {
2424
mqtt = "mqtt/init.lua",
2525
["mqtt.client"] = "mqtt/client.lua",
26-
["mqtt.const"] = "mqtt/const.lua",
2726
["mqtt.ioloop"] = "mqtt/ioloop.lua",
2827
["mqtt.bit53"] = "mqtt/bit53.lua",
2928
["mqtt.bitwrap"] = "mqtt/bitwrap.lua",

0 commit comments

Comments
 (0)