vrld / HC

General purpose collision detection library for the use with LÖVE.
http://hc.readthedocs.org/
404 stars 48 forks source link

luarocks won't accept the rockspec #54

Closed leftiness closed 6 years ago

leftiness commented 6 years ago

I have to do some work before luarocks will install hc using the rockspec.

I can make you a pull request if you want it. Maybe I'm doing something wrong.

First attempt

luarocks --tree=. install https://raw.githubusercontent.com/vrld/HC/master/HC-0.1-1.rockspec
Error: /tmp/luarocks_luarocks-rockspec-HC-0.1-1-4821/HC-0.1-1.rockspec: Unknown field 1

Second attempt. I removed the description field, which is invalid because it's numerically indexed.

rockspec=HC-0.1-1.rockspec
wget -q https://raw.githubusercontent.com/vrld/HC/master/$rockspec
sed -i '/description/d' $rockspec
luarocks --tree=. install $rockspec
Error: Inconsistency between rockspec filename (HC-0.1-1.rockspec) and its contents (hc-0.1-1.rockspec).

Third attempt. I renamed the file to meet the required lowercase format.

in=HC-0.1-1.rockspec
out=hc-0.1-1.rockspec
url=https://raw.githubusercontent.com/vrld/HC/master/$in
curl -s $url > $out
sed -i '/description/d' $out
luarocks --tree=. install $out
hc 0.1-1 is now built and installed in /home/brandon/secrets/foo/.