You are not logged in.

#1 2020-10-22 15:39:31

pagwin
Member
Registered: 2019-07-18
Posts: 8

[SOLVED]have correct linux-headers as dependency in PKGBUILD

sorry in advance if I posted to the wrong section of the forums

as the title describes, I'm trying to make a PKGBUILD for https://github.com/umlaeute/v4l2loopback/ which depends on linux-headers to be built. I want to be able to setup the PKGBUILD to depend on the correct linux-headers depending on the kernel(s) installed aka if linux-lts is installed it should depend on linux-lts-headers instead of linux-headers and should depend on linux-headers if the normal linux kernel is installed etc.

sidenote: even if a PKGBUILD for this kernel module already exists I still want to know how I would do this for future reference

Last edited by pagwin (2020-10-22 15:59:13)

Offline

#2 2020-10-22 15:51:28

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,645

Re: [SOLVED]have correct linux-headers as dependency in PKGBUILD

DKMS is the cleanest way to do this, and it already in Community

https://www.archlinux.org/packages/comm … back-dkms/

You can't assume things and change deps at build time like you're talking.

Last edited by Scimmia (2020-10-22 15:52:19)

Online

#3 2020-10-22 15:53:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,076

Re: [SOLVED]have correct linux-headers as dependency in PKGBUILD

You should not. Set up distinct packages/split packages for the relevant header subsystem -lts for -lts no suffix for normal etc.

If you still want to do this you should still not do this and instead opt for a dkms package, like is done for the repo version of the package you are trying this with https://github.com/archlinux/svntogit-c … k/PKGBUILD

For more information on DKMS read https://wiki.archlinux.org/index.php/Dy … le_Support

Last edited by V1del (2020-10-22 15:55:05)

Offline

#4 2020-10-22 15:58:43

pagwin
Member
Registered: 2019-07-18
Posts: 8

Re: [SOLVED]have correct linux-headers as dependency in PKGBUILD

V1del wrote:

You should not. Set up distinct packages/split packages for the relevant header subsystem -lts for -lts no suffix for normal etc.

If you still want to do this you should still not do this and instead opt for a dkms package, like is done for the repo version of the package you are trying this with https://github.com/archlinux/svntogit-c … k/PKGBUILD

For more information on DKMS read https://wiki.archlinux.org/index.php/Dy … le_Support

okay thank you good to know that

Offline

#5 2020-10-22 21:40:40

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED]have correct linux-headers as dependency in PKGBUILD

https://git.archlinux.org/svntogit/comm … roadcom-wl

You can have a PKGBUILD that makedepends on the dkms package and generates a per-kernel compiled module package. Simply edit the PKGBUILD to specify _kernelname= and it will template the rest.

The AUR does not permit uploading anything that detects the kernelname on its own.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB