Skip to content

Debian package

Francesc Guasch edited this page Mar 4, 2020 · 4 revisions

Trying to build a debian package

dzil dhmakeperl

Trying to install dist::zilla and the plugin command dhmakeperl.

Pros:

  • Creates files for you
  • I managed to create a package

Cons:

  • The scripts, etc and other directories are not packaged

ExtUtils::MakeMaker;

I copied the file Makefile.PL created by dzil dhmakeperl. It lacked scripts so I added like this:

EXE_FILES => [ "script/rvd_back", "script/rvd_front"]

Those got copied to /usr/bin and I coulnd't find a way to copy to /usr/sbin but we at least we have something.

It is not easy to create the config files, I found advice about Module::Build .

Module::Build

Tried for a while. It looks like it is deprecated, back to square 1

dist::zilla 2

Try again dist::zilla with MakeMaker::Awesome

script

We manage to install the scripts with these:

exe_file = script/rvd_front`
exe_file = script/rvd_back`
gather_files = script

etc

Now we have to install config and shared files. Config files usually go to /etc/, it looks like it is not advised to do so with Perl Modules and I couldn't find a way to do it.

share

Shared files can be installed with ShareDir. But we have a bunch of dirs to install. Let's try one:

[ShareDir]
dir = templates

It gets installed in /usr/share/perl5/auto/share/dist/Ravada/. But it won't create a templates directory. All the contents get installed there. So if I wanted to add more directories all of them would get mixed up there.

I'd rather see those files go to /usr/share/ravada/templates but I couldn't manage to do it.

Clone this wiki locally