Description
It would be nice for users of Debian and/or Ubuntu to simply run:
$ sudo apt install libhalide libhalide-dev libhalide-doc
However, the rules for getting a package upstreamed are stringent and there's a veritable book of package guidelines for Debian, here:
https://www.debian.org/doc/manuals/debmake-doc/
and Ubuntu extends it here:
https://packaging.ubuntu.com/html/index.html
However, PPAs are more "anything goes". I think the right strategy is to figure out deb packaging enough that we get an established user base on the PPA and then try to make the package conform to upstream guidelines, possibly with some help from maintainers.
Even with the flexible Ubuntu PPA rules, there are a few things that we do need to keep in mind to be good citizens:
- We should build and link against Ubuntu's own shared libraries. This just means LLVM.
- We need to split our library across three packages:
a.libhalide
which includes the.so
[1] and the autoscheduler modules.
b.libhalide-dev
which includes most other things:.a
, headers, tools, etc.
c.libhalide-doc
which includes the tutorials and the doxygen documentation. - We need to list libjpeg-dev, libpng-dev as "recommended" packages of
libhalide-dev
- We need to list
libhalide
as a dependency oflibhalide-dev
andlibhalide-doc
as a suggested package forlibhalide-dev
. libhalide-doc
shouldn't have any dependencies.- We need to package from inside a chroot with a minimal environment.
[1] I did an apt-file
search for every .a
in my /usr
directory and of the 500+ static libs there, all but 47 were in the corresponding -dev
package. The others were from liblld-10
, which I'm nearly certain is mis-packaged; ocaml-nox
, which I'm guessing needs them for linking; and valgrind
, pristine-tar
, and python3-numpy
for unknown reasons.