Hi,

I had a glance at the dh-lua source files, but I'm not
sure if I have figured out how dh-lua works, (actually
I'm not familiar to hack dh) so I'd like to ask for
some advise :-)

in file make/dh-lua.Makefile.single:
```
154 # {{{ entrypoints 
155 ifeq "$(CLIB_OBJS)" ""
156 build: sanity
157 test: sanity test-config test-lua-dynamic
158 install: sanity installcommon
[...]
```

There is the entry points corresponding to different
circumstances of a given lua module to be packaged,
and I wonder if adding a `luarocks_support` target
in that Makefile, and appending this target to the
`install` target is a right way to go.

My expected `luarocks_support` target will do:

  1. make a directory for `rock_manifest` file, 
     e.g. rockdir='/usr/lib/luarocks/rocks/lua-cjson/2.1.0-1/'
  2. create a `rock_manifest` under that directory.
     note, just creating a stub works for my machine,
     e.g. echo 'rock_manifest = {}' > $rockdir/rock_manifest

Additionally, there remains several things to be done:

  1. let *.postinst do this:

```
+  if [ -x /usr/bin/luarocks-admin ]; then
+    luarocks-admin make-manifest --local-tree --tree=/usr
+  fi
```

  2. let *.prerm do this:

```
+  if [ -x /usr/bin/luarocks ]; then
+       luarocks remove lua-cjson --local-tree --tree=/usr
+  fi
```

Apart from dh-lua package, maybe we also need to change
the default configuration file of Debian's luaroks,
as suggested by Hisham.

Any advice?

Reply via email to