On Tue, Sep 18, 2012 at 04:34:20PM +0600, Ildar Mulyukov wrote:

> >Full manifest rebuilt in
> >/usr/lib/pk-rocks-tree/lib/luarocks/manifest.d
> >install/remove operation. Little "runtime support" care about it.
> >
> >I believe this tool can be enchanced to support other major linux
> >distributives (generate .spec for RPM for example).
> >
> >PS All paths taken from "live" prototype, it not published yet. But we
> >have plans to release it soon (when it will work fine for us, and look
> >less ugly than now)
> 
> As you mentioned RPM .spec, I couldn't keep silent :)
> Let me show what I got (see attachment). It is generated
> automatically with a little clean up & small fixes work afterwards.
> Given rocspec+tarball it compiles an RPM with all deps correctly set
> etc.

My script generate more-or-less similiar stuff for debian/
I'm highligt few difference now.

> # Original package name LuaSocket
> %define oname luasocket
> %define oversion 2.0.2-3
> %define rockspec luasocket-2.0.2-3.rockspec
> Name: lua-module-luasocket

We use different prefix, pk-rock-*  (and I believe this should be 
configurable)

> Version: 2.0.2
...
> #TODO Requires
> BuildPreReq: rpm-macros-lua
> # Automatically added by buildreq on ...
> BuildRequires: liblua5-devel luarocks

We also inject ordinary requires from rockspec here (with same 
transformation as package name itself).
Build-requirements discovering done via apt-file. (rapt-file really)

> 
> %files
> %lua_modulesdir/*
> %lua_modulesdir_noarch/*
> %luarocks_dbdir/%oname
> %doc LICENSE NEW README docs_from_rockstree/*
> %exclude %luarocks_dbdir/manifest
> 

And we don't exclude manifest, we mangle manifest's name, and later 
reconstruct it in postinstall hook. So _patched_ luarocks can see rocks 
as preinstalled.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to