Skip to content

Commit 491680d

Browse files
committed
Add luarocks Rockspec file
First pass at moving the camera package to install via luarocks. > luarocks make camera-1.0-0.rockspec
1 parent 65c8900 commit 491680d

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
22
CMAKE_POLICY(VERSION 2.6)
3+
IF(LUAROCKS_PREFIX)
4+
MESSAGE(STATUS "Installing Torch through Luarocks")
5+
STRING(REGEX REPLACE "(.*)lib/luarocks/rocks.*" "\\1" CMAKE_INSTALL_PREFIX "${LUAROCKS_PREFIX}")
6+
MESSAGE(STATUS "Prefix inferred from Luarocks: ${CMAKE_INSTALL_PREFIX}")
7+
ENDIF()
38
FIND_PACKAGE(Torch REQUIRED)
49

510
if (UNIX AND NOT APPLE)

camera-1.0-0.rockspec

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package = "camera"
2+
version = "1.0-0"
3+
4+
source = {
5+
url = "git://github.com/clementfarabet/lua---camera",
6+
tag = "1.0-0"
7+
}
8+
9+
description = {
10+
summary = "A simple wrapper package to give torch access to a webcam",
11+
detailed = [[
12+
Uses OpenCV on MacOS and video4linux2 on Linux to proved the low level access to the camera hardware.
13+
]],
14+
homepage = "https://github.com/clementfarabet/lua---camera",
15+
license = "BSD"
16+
}
17+
18+
dependencies = {
19+
"torch >= 7.0",
20+
"xlua >= 1.0",
21+
"sys >= 1.0",
22+
}
23+
24+
build = {
25+
type = "cmake",
26+
variables = {
27+
LUAROCKS_PREFIX = "$(PREFIX)"
28+
}
29+
}

0 commit comments

Comments
 (0)