summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1f5f2d22405fdeb93cb46fc272fdfa2f8d7ec9a7 (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
# Maintainer: vitamin1980 <vitamin.novgorod @ yandex.ru>

pkgname=moxa-uport11x0-git
pkgver=1.3.11
pkgrel=1
pkgdesc='Moxa UPort 11x0 USB to Serial Hub driver'
url='http://www.moxa.com/product/usb_to_serial_converters.htm'
arch=('i686' 'x86_64')
license=('GPL')
depends=('linux')
makedepends=('linux-headers' 'make' 'git')
conflicts=('moxa-uport11x0-git-dkms')
source=("https://github.com/ellysh/mxu11x0.git"
        "install"
        "mxu11x0.conf" )
sha256sums=('SKIP'
            'eedaf97118ded07bd09be79706c358fbcac53c63f2a93de9b1d3ec6c63fce2ff'
            'a80410b68b562c731e80419eb77849766c0acaf4882d84dfe5d865221d3f3a76')

_kernmajor="$(pacman -Q linux | awk '{print $2}' | cut -d - -f1 | cut -d . -f1,2)"
_extramodules="extramodules-${_kernmajor}-ARCH"
_kernver=$(pacman -Q linux | cut -d " " -f2)-"ARCH"

install=install

build() {
  git clone https://github.com/ellysh/mxu11x0.git
  cd "${srcdir}/mxu11x0/driver"
  make
}

package() {
  cd "${srcdir}"
  install -Dm644 mxu11x0.conf "${pkgdir}/usr/lib/modules-load.d/mxu11x0.conf"
  cd "${srcdir}/mxu11x0/driver"
  install -Dm644 mxu11x0.ko "${pkgdir}/usr/lib/modules/${_extramodules}/mxu11x0.ko"
  gzip "${pkgdir}/usr/lib/modules/${_extramodules}/mxu11x0.ko"
}