{"id":1762,"date":"2015-05-01T16:06:55","date_gmt":"2015-05-01T14:06:55","guid":{"rendered":"https:\/\/adrhc.go.ro\/wordpress\/?p=1762"},"modified":"2017-10-07T17:26:56","modified_gmt":"2017-10-07T15:26:56","slug":"compiling-and-using-luarocks","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/compiling-and-using-luarocks\/","title":{"rendered":"Compiling and using luarocks"},"content":{"rendered":"<pre class=\"brush:bash shell\">\r\n#See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh script and other things not defined here.\r\n#Before starting do declare the environment variables specified to the link above.\r\n\r\nNEW_BUILD_NAME=luarocks\r\nNEW_BUILD_VER=2.2.2\r\nNEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER\r\nls -l \/tmp\/$NEW_BUILD_NAME-*\r\nls -l ~\/ffp_0.7_armv5\/packages\/$NEW_BUILD_NAME-*\r\nNEW_BUILD_NR=0\r\n\r\ncd \/ffp\/home\/root\/compile\/luarocks-2.2.2\r\n~\/x.sh ffpg\r\n.\/configure --help > configure.help.txt\r\n.\/configure --prefix=\/ffp\r\nmake build\r\n\r\nrm -r $HOME\/temp\/$NEW_BUILD_NAME_AND_VER\r\nmake install DESTDIR=$HOME\/temp\/$NEW_BUILD_NAME_AND_VER\r\ncd $HOME\/temp\/$NEW_BUILD_NAME_AND_VER\r\nmakepkg $NEW_BUILD_NAME $NEW_BUILD_VER $NEW_BUILD_NR\r\ncp -v \/tmp\/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz ~\/ffp_0.7_armv5\/packages\/\r\nfunpkg -q $NEW_BUILD_NAME\r\nfunpkg -i ~\/apache-htdocs\/ffp_0.7_armv5\/packages\/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz\r\n\r\n#using luarocks\r\nluarocks search cjson\r\nluarocks install lua-cjson --deps-mode all\r\nluarocks install router --deps-mode all\r\n#*.lua rocks are installed to \/ffp\/share\/lua\/5.1\/\r\n#*.so rocks are installed to \/ffp\/lib\/lua\/5.1\/\r\n\r\n#nginx configuration\r\nlua_package_cpath\t'\/ffp\/lib\/lua\/5.1\/?.so;;';\r\nlua_package_path\t'\/ffp\/share\/lua\/5.1\/?.lua;;';\r\n\r\n#using router; for some versions ngx.var.request_method must be lower-case: \r\nrouter:execute(string.lower(ngx.var.request_method), ngx.var.restPaths)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh script and other things not defined here. #Before starting do declare the environment variables specified to the link above. NEW_BUILD_NAME=luarocks NEW_BUILD_VER=2.2.2 NEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER ls -l \/tmp\/$NEW_BUILD_NAME-* ls -l ~\/ffp_0.7_armv5\/packages\/$NEW_BUILD_NAME-* NEW_BUILD_NR=0 cd \/ffp\/home\/root\/compile\/luarocks-2.2.2 ~\/x.sh ffpg .\/configure [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/compiling-and-using-luarocks\/#more-1762\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Compiling and using luarocks<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,11,163,10],"tags":[55,125],"class_list":["post-1762","post","type-post","status-publish","format-standard","hentry","category-compiling-from-source","category-linux","category-nsa310","category-programming","tag-lua","tag-luarocks"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=1762"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1762\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=1762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=1762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=1762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}