On Tue, Oct 16, 2012 at 6:16 PM, Klaus <k...@goppertsweiler.de> wrote:
> Dear list,
>
> Is there a way to specify custom uninstall steps within a rockspec ?
>
> Background:
> I have created a shared library
> (https://github.com/oberhofer/luacwrap/tree/develop)
> which provides a Lua and a C interface.
> Due to the dual nature of this library which
> - must be loadable by Lua via require()
> - and must be linkable to other C based modules
> the makefiles install target creates the necessary files and links in
> /usr/local/lib/ and /usr/local/lib/lua/5.1/
> A corresponding uninstall target removes the files and links.
>
> As the next step I created a makefile based rockspeck for the project.
> Installation via the rockspec works, as it calls the makefile's install
> target.
> Removing the rock seems to succeed, but the makefile's uninstall target
> is never called.
> This behaviour is quite obvious as luarocks does not store the makefile
> for later use,
> but maybe there is another way to achieve a correct uninstall.

LuaRocks is not designed to install programs in locations other than
the module's own $(PREFIX). It then moves the Lua C modules to the
proper lib/lua/5.1 subdirectory (as configured for your system). In
particular, it must not install files directly in /usr/local/lib. This
is done to avoid clashes with the rest of the system. My suggestion is
for you to deploy the Lua-loadable module via LuaRocks and the
C-loadable module through other means, or to link the module in C
using -L/usr/local/lib/lua/5.1/

For more info:
http://luarocks.org/en/Recommended_practices_for_Makefiles

-- Hisham
http://hisham.hm/

------------------------------------------------------------------------------
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to