upg libwacom

add lirc
This commit is contained in:
joborun linux 2022-10-17 19:53:50 +03:00
parent 5b9d8f51de
commit 34df480dea
13 changed files with 262 additions and 7 deletions

View File

@ -6,7 +6,7 @@
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=libwacom
pkgver=2.4.0
pkgver=2.5.0
pkgrel=01
pkgdesc="Library to identify Wacom tablets and their features w/o systemd"
arch=('x86_64')
@ -41,8 +41,11 @@ package() {
license=('MIT')
validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') ## E23B7E70B467F0BF: "Peter Hutterer (Who-T) <office@who-t.net>
validpgpkeys=('594ABBA066118C7A02D10A80A8AF906D9307FBAD') # "Joshua Dickens <Joshua@Joshua-Dickens.com>"
# https://github.com/linuxwacom/libwacom/releases
sha256sums=(d0d022761e3f9ab23e329583b7d2bd470b0450dfb077caeb22c5a0d66c2bd414 # libwacom-2.4.0.tar.xz
d8d5c90d62432f6e81b8d942e645a675a682f2f518eb79d8b4d6be321249512c) # libwacom-2.4.0.tar.xz.sig
sha256sums=(40b69a4c38bbcbc80b1231bc115551107ebbc0ba14d2ad1c3e54355dcd876816 # libwacom-2.5.0.tar.xz
4de4fa7564bbeceaa7a114636dbaa68d894d7d99744f0e8b1e968fbdb654a476) # libwacom-2.5.0.tar.xz.sig

View File

@ -1,7 +1,7 @@
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgname=libwacom
pkgver=2.4.0
pkgver=2.5.0
pkgrel=1
pkgdesc="Library to identify Wacom tablets and their features"
arch=('x86_64')
@ -12,10 +12,11 @@ makedepends=('libxml2' 'meson')
checkdepends=('python-pytest' 'python-libevdev' 'python-pyudev')
optdepends=('python-libevdev: for libwacom-show-stylus')
options=('debug')
validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF')
#validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF')
validpgpkeys=('594ABBA066118C7A02D10A80A8AF906D9307FBAD') # "Joshua Dickens <Joshua@Joshua-Dickens.com>"
source=(https://github.com/linuxwacom/libwacom/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.xz{,.sig})
# https://github.com/linuxwacom/libwacom/releases
sha256sums=('d0d022761e3f9ab23e329583b7d2bd470b0450dfb077caeb22c5a0d66c2bd414'
sha256sums=('40b69a4c38bbcbc80b1231bc115551107ebbc0ba14d2ad1c3e54355dcd876816'
'SKIP')
build() {

View File

@ -6,4 +6,3 @@ python-pyudev
libxml2

View File

@ -1 +1,3 @@
gpg -v --recv-key E23B7E70B467F0BF
gpg -v --recv-key A8AF906D9307FBAD
gpg -v --recv-key A8AF906D9307FBAD

64
lirc/PKGBUILD Normal file
View File

@ -0,0 +1,64 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=lirc
_pkgver=0.10.2
[[ $_pkgver =~ [a-z]$ ]] && pkgver="${_pkgver:0:-1}.${_pkgver: -1}" || pkgver="$_pkgver"
pkgrel=01
epoch=1
pkgdesc="Linux Infrared Remote Control utilities"
arch=('x86_64')
url="https://www.lirc.org/"
depends=('alsa-lib' 'libx11' 'libftdi' 'libusb-compat')
makedepends=('help2man' 'alsa-lib' 'libx11' 'libxslt' 'python' 'python-setuptools'
'python-yaml' )
optdepends=('python: for lirc-setup, irdb-get and pronto2lirc'
'python-gobject: for lirc-setup and irdb-get'
'python-yaml: for lirc-setup and irdb-get')
provides=('lirc-utils')
conflicts=('lirc-utils')
replaces=('lirc-utils')
backup=('etc/lirc/lirc_options.conf' 'etc/lirc/lircd.conf' 'etc/lirc/lircmd.conf')
source=("https://prdownloads.sourceforge.net/${pkgname}/${pkgname}-${_pkgver}.tar.bz2"
lirc.logrotate
lirc.tmpfiles)
build() {
cd lirc-${_pkgver}
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-devinput \
--enable-uinput
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package() {
cd lirc-${_pkgver}
make DESTDIR="${pkgdir}" install
install -Dm644 "${srcdir}"/lirc.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/lirc.conf
install -Dm644 "${srcdir}"/lirc.logrotate "${pkgdir}"/etc/logrotate.d/lirc
rmdir "${pkgdir}"/var/{run/lirc/,run/}
}
#---- license gpg-key sha256sums ----
license=('GPL')
sha256sums=(3d44ec8274881cf262f160805641f0827ffcc20ade0d85e7e6f3b90e0d3d222a # lirc-0.10.2.tar.bz2
bd13ca00e30d85ff9166c03b8f7a20195ef89794e66d7e54f04ba1d014a73e7d # lirc.logrotate
b8eb6ff2a542a9a3b20fe259fe36aece941db8d309598d2eeb1815b779e2f838) # lirc.tmpfiles

53
lirc/PKGBUILD-arch Normal file
View File

@ -0,0 +1,53 @@
# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Paul Mattal <paul@archlinux.org>
pkgname=lirc
_pkgver=0.10.2
[[ $_pkgver =~ [a-z]$ ]] && pkgver="${_pkgver:0:-1}.${_pkgver: -1}" || pkgver="$_pkgver"
pkgrel=1
epoch=1
pkgdesc="Linux Infrared Remote Control utilities"
arch=('x86_64')
url="https://www.lirc.org/"
license=('GPL')
depends=('alsa-lib' 'libx11' 'libftdi' 'libusb-compat')
makedepends=('help2man' 'alsa-lib' 'libx11' 'libxslt' 'python' 'python-setuptools'
'python-yaml' 'systemd')
optdepends=('python: for lirc-setup, irdb-get and pronto2lirc'
'python-gobject: for lirc-setup and irdb-get'
'python-yaml: for lirc-setup and irdb-get')
provides=('lirc-utils')
conflicts=('lirc-utils')
replaces=('lirc-utils')
backup=('etc/lirc/lirc_options.conf' 'etc/lirc/lircd.conf' 'etc/lirc/lircmd.conf')
source=("https://prdownloads.sourceforge.net/${pkgname}/${pkgname}-${_pkgver}.tar.bz2"
lirc.logrotate
lirc.tmpfiles)
sha1sums=('02092890205891b6de5a699294485a1eedba46c5'
'4342b004eb53d51fcbb9af2cf136bb4990874608'
'5cd3f206e6e60632d9bea2ce9d22dbe5283eb129')
build() {
cd lirc-${_pkgver}
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-devinput \
--enable-uinput
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package() {
cd lirc-${_pkgver}
make DESTDIR="${pkgdir}" install
install -Dm644 "${srcdir}"/lirc.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/lirc.conf
install -Dm644 "${srcdir}"/lirc.logrotate "${pkgdir}"/etc/logrotate.d/lirc
rmdir "${pkgdir}"/var/{run/lirc/,run/}
}

1
lirc/clean Normal file
View File

@ -0,0 +1 @@
rm -rf {src,pkg,lirc*tar.bz2}

12
lirc/deps Normal file
View File

@ -0,0 +1,12 @@
alsa-lib
libx11
libftdi
libusb-compat
help2man
alsa-lib
libx11
libxslt
python
python-setuptools
python-yaml

View File

@ -0,0 +1,30 @@
diff --git a/configure.ac b/configure.ac
index 58347d8..8c7fca2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,15 +77,10 @@ AC_TYPE_UINT64_T
dnl AC_TYPE_GETGROUPS seems broken on recent MacOS, so:
AC_MSG_CHECKING([Figure out if getgrouplist() needs gid_t or int])
-oldcflags="$CFLAGS"
-export CFLAGS=-Werror
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <unistd.h>
-#include <grp.h>
- ]], [[
-gid_t groups[32]; int ngroups; const char* user = "root";
-getgrouplist(user, 1, groups, &ngroups);
- ]])],[
+int getgroups(int gidsetsize, gid_t grouplist[]);
+ ]], [[ ]])],[
AC_MSG_RESULT(gid_t)
AC_DEFINE(GETGROUPS_T,[gid_t])
],[
@@ -93,7 +88,6 @@ getgrouplist(user, 1, groups, &ngroups);
AC_DEFINE(GETGROUPS_T,[int])
]
)
-export CFLAGS="$oldcflags"
dnl Checks for library functions.
AC_CHECK_FUNCS(gethostname gettimeofday mkfifo select socket strdup \

5
lirc/lirc.logrotate Normal file
View File

@ -0,0 +1,5 @@
/var/log/lircd {
missingok
notifempty
delaycompress
}

1
lirc/lirc.tmpfiles Normal file
View File

@ -0,0 +1 @@
d /run/lirc 0755 root root -

78
lirc/python-yaml-6.patch Normal file
View File

@ -0,0 +1,78 @@
From bb6a390633f32942ac10f9b7b7fc01dfbd395a48 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@nowhere.net>
Date: Fri, 21 Jan 2022 14:00:54 +0100
Subject: [PATCH] database.py: Handle new PyYAML interface.
---
python-pkg/lirc/database.py | 12 ++++++++----
tools/check_configs.py | 4 ++++
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/python-pkg/lirc/database.py b/python-pkg/lirc/database.py
index d464c2ab..d1f42c64 100644
--- a/python-pkg/lirc/database.py
+++ b/python-pkg/lirc/database.py
@@ -44,6 +44,10 @@ import sys
try:
import yaml
+ try:
+ from yaml import CLoader as Loader, CDumper as Dumper
+ except ImportError:
+ from yaml import Loader, Dumper
except ImportError:
_YAML_MSG = '''
"Cannot import the yaml library. Please install the python3
@@ -66,7 +70,7 @@ def _load_kerneldrivers(configdir):
'''
with open(os.path.join(configdir, "kernel-drivers.yaml")) as f:
- cf = yaml.load(f.read())
+ cf = yaml.load(f.read(), Loader = Loader)
drivers = cf['drivers'].copy()
for driver in cf['drivers']:
if driver == 'default':
@@ -132,14 +136,14 @@ class Database(object):
yamlpath = configdir
db = {}
with open(os.path.join(yamlpath, "confs_by_driver.yaml")) as f:
- cf = yaml.load(f.read())
+ cf = yaml.load(f.read(), Loader = Loader)
db['lircd_by_driver'] = cf['lircd_by_driver'].copy()
db['lircmd_by_driver'] = cf['lircmd_by_driver'].copy()
db['kernel-drivers'] = _load_kerneldrivers(configdir)
db['drivers'] = db['kernel-drivers'].copy()
with open(os.path.join(yamlpath, "drivers.yaml")) as f:
- cf = yaml.load(f.read())
+ cf = yaml.load(f.read(), Loader = Loader)
db['drivers'].update(cf['drivers'].copy())
for key, d in db['drivers'].items():
d['id'] = key
@@ -158,7 +162,7 @@ class Database(object):
configs = {}
for path in glob.glob(configdir + '/*.conf'):
with open(path) as f:
- cf = yaml.load(f.read())
+ cf = yaml.load(f.read(), Loader = Loader)
configs[cf['config']['id']] = cf['config']
db['configs'] = configs
self.db = db
diff --git a/tools/check_configs.py b/tools/check_configs.py
index 1e0d831b..5e458de7 100755
--- a/tools/check_configs.py
+++ b/tools/check_configs.py
@@ -4,6 +4,10 @@
import glob
import yaml
+try:
+ from yaml import CLoader as Loader, CDumper as Dumper
+except ImportError:
+ from yaml import Loader, Dumper
def main():
configs = {}
--
2.34.1

6
lirc/time Normal file
View File

@ -0,0 +1,6 @@
real 1m15.941s
user 1m9.159s
sys 0m8.284s