I am trying to modify this debian source package which requires the the user to manually install the current Linux kernel's header (with sudo apt install linux-headers-$(uname -r) before installing droidcam.
However, can this be automated using the debian/control file or the postinst script, so that the user does not have to manually install it?
1 Answer
Well, this is not a complete solution. It does not cover if the user want keep an older kernel.
Instead of headers only
Depends: ${misc:Depends}, build-essential, linux-headers-generic | linux-headers-generic-pae | linux-headers-lowlatency | linux-headers-lowlatency-paePut kernel & headers as requirement
Depends: ${misc:Depends}, build-essential, linux-generic | linux-generic-pae | linux-lowlatency | linux-lowlatency-paeSo this way:
- If the kernel is last version, it will install its headers.
- If the kernel is old version, it will install both the last version kernel with its headers.