|
| 1 | +local package_name = "copas" |
| 2 | +local package_version = "4.12.0" |
| 3 | +local rockspec_revision = "1" |
| 4 | +local github_account_name = "lunarmodules" |
| 5 | +local github_repo_name = package_name |
| 6 | + |
| 7 | + |
| 8 | +package = package_name |
| 9 | +version = package_version.."-"..rockspec_revision |
| 10 | +source = { |
| 11 | + url = "git+https://github.com/"..github_account_name.."/"..github_repo_name..".git", |
| 12 | + branch = (package_version == "cvs") and "master" or nil, |
| 13 | + tag = (package_version ~= "cvs") and package_version or nil, |
| 14 | +} |
| 15 | +description = { |
| 16 | + summary = "Coroutine Oriented Portable Asynchronous Services", |
| 17 | + detailed = [[ |
| 18 | + Copas is a dispatcher based on coroutines that can be used by |
| 19 | + TCP/IP servers. It uses LuaSocket as the interface with the |
| 20 | + TCP/IP stack. A server registered with Copas should provide a |
| 21 | + handler for requests and use Copas socket functions to send |
| 22 | + the response. Copas loops through requests and invokes the |
| 23 | + corresponding handlers. For a full implementation of a Copas |
| 24 | + HTTP server you can refer to Xavante as an example. |
| 25 | + ]], |
| 26 | + license = "MIT/X11", |
| 27 | + homepage = "https://github.com/"..github_account_name.."/"..github_repo_name, |
| 28 | +} |
| 29 | +dependencies = { |
| 30 | + "lua >= 5.1, < 5.6", |
| 31 | + "luasocket ~> 3", |
| 32 | + "coxpcall >= 1.14", |
| 33 | + "binaryheap >= 0.4", |
| 34 | + "timerwheel ~> 1", |
| 35 | +} |
| 36 | +build = { |
| 37 | + type = "builtin", |
| 38 | + install = { |
| 39 | + bin = { |
| 40 | + copas = "bin/copas.lua", |
| 41 | + } |
| 42 | + }, |
| 43 | + modules = { |
| 44 | + ["copas"] = "src/copas.lua", |
| 45 | + ["copas.http"] = "src/copas/http.lua", |
| 46 | + ["copas.ftp"] = "src/copas/ftp.lua", |
| 47 | + ["copas.smtp"] = "src/copas/smtp.lua", |
| 48 | + ["copas.timer"] = "src/copas/timer.lua", |
| 49 | + ["copas.lock"] = "src/copas/lock.lua", |
| 50 | + ["copas.semaphore"] = "src/copas/semaphore.lua", |
| 51 | + ["copas.future"] = "src/copas/future.lua", |
| 52 | + ["copas.queue"] = "src/copas/queue.lua", |
| 53 | + }, |
| 54 | + copy_directories = { |
| 55 | + "docs", |
| 56 | + }, |
| 57 | +} |
0 commit comments