summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd009e5f848edd6e9133e14dfdc114435900c8e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=input-remapper-bin
pkgver=2.0.1
pkgrel=4
_pythonver=3.13
pkgdesc="A tool to change and program the mapping of your input device buttons.(Prebuilt version)"
arch=('x86_64')
url="https://github.com/sezanzeb/input-remapper/"
license=('GPL-3.0-only')
prodives=("${pkgname%-bin}=${pkgver}")
conflicts=(
    "${pkgname%-bin}"
    'key-mapper'
)
depends=(
    'python-gobject'
    'python-pydbus'
    'python-evdev'
    'gtk3'
    'python-setuptools'
    'gtksourceview4'
    'python-pydantic'
    'python-cairo'
    'python-packaging'
    'python-psutil'
)
optdepends=(
    'xorg-xmodmap: symbol names matching the keyboard layout'
)
source=("${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/${pkgver}/${pkgname%-bin}-${pkgver}.deb")
sha256sums=('5c5adbac775578e8f98f7615f627a161822ff7ee57e40a45a7483a89cc9040fe')
prepare() {
	bsdtar -xf "${srcdir}/data."*
    sed -i "s/\/usr\/share\/${pkgname%-bin}\/${pkgname%-bin}.svg/${pkgname%-bin}/g" \
        {"${srcdir}/etc/xdg/autostart/${pkgname%-bin}-autoload.desktop","${srcdir}/usr/share/applications/${pkgname%-bin}-gtk.desktop"}
    rm -rf "${srcdir}/usr/local"
    install -Dm755 -d "${srcdir}/usr/lib/python${_pythonver}"
    mv "${srcdir}/usr/lib/python3/dist-packages" "${srcdir}/usr/lib/python${_pythonver}/site-packages"
    rm -rf "${srcdir}/usr/lib/python3"
}
package() {
	cp -Pr --no-preserve=ownership "${srcdir}/"{etc,usr} "${pkgdir}"
    install -Dm644 "${srcdir}/usr/share/${pkgname%-bin}/${pkgname%-bin}.svg" -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps"
}