diff options
author | Tomasz Pakuła | 2023-11-19 09:50:23 +0100 |
---|---|---|
committer | Tomasz Pakuła | 2023-11-19 09:50:23 +0100 |
commit | ab2aff2e025f3fb85125a3986016d0636daefdb2 (patch) | |
tree | 138948608c984190f494f95aa1732560eadf452b | |
download | aur-ab2aff2e025f3fb85125a3986016d0636daefdb2.tar.gz |
Initial commit
-rw-r--r-- | PKGBUILD | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1afd7284796b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Tomasz Pakula <forest10pl@gmail.com> +_reponame=hid-logitech-hidpp +pkgname=hidpp-logitech-g-pro-wheel-dkms-git +pkgver=0.1 +pkgrel=1 +pkgdesc="hid-logitech-hidpp with G Pro Racing Wheel PC/XBOX support" +arch=('x86_64') +url="https://github.com/Lawstorant/hid-logitech-hidpp" +license=('GPL2') +depends=(dkms) +makedepends=(git) +source=(git+https://github.com/Lawstorant/hid-logitech-hidpp) +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/$_reponame" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +package() { + cd "$srcdir/$_reponame" + + find . -type f \( -name 'dkms.conf' -o -name '*.c' \) -exec sed -i "s/#VERSION#/$pkgver/" {} + + echo 'ccflags-y += -DDEBUG' >> "Kbuild" + + echo "* Copying module into /usr/src..." + install -dm755 "${pkgdir}/usr/src/${_reponame}-${pkgver}" + cp -r ${srcdir}/$_reponame/* "${pkgdir}/usr/src/${_reponame}-${pkgver}" +} |