diff options
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | moxa-mxu11x0-install.sh | 15 |
3 files changed, 33 insertions, 12 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Thu Jun 21 00:55:47 UTC 2018 +# Wed Apr 3 21:53:59 UTC 2019 pkgbase = moxa-mxu11x0 pkgdesc = kernel module driver for Moxa UPort USB serial 1110 1130i 1150i RS-232 422 485 pkgver = 1.4 - pkgrel = 1 + pkgrel = 2 url = https://www.moxa.com/support/support_home.aspx install = moxa-mxu11x0-install.sh arch = i686 @@ -14,6 +14,7 @@ pkgbase = moxa-mxu11x0 depends = dkms depends = linux-headers optdepends = setserial: set RS-422 485 modes + options = !strip source = https://www.moxa.com/drivers/IDC_SW/UPort/Driver/UPort%201100%20Series/Linux/V1.4/legacy/driv_linux_kernel2.x_uport1p_v1.4_build_18050314.tgz sha256sums = b9878842c3cd05f66647b584e10ed0689f7614b2b37ac31ba9c4da87d0bcba19 @@ -9,13 +9,14 @@ _opt_DKMS=1 # This can be toggled between installs set -u pkgname='moxa-mxu11x0' pkgver='1.4' -pkgrel='1' +pkgrel='2' pkgdesc='kernel module driver for Moxa UPort USB serial 1110 1130i 1150i RS-232 422 485' arch=('i686' 'x86_64') url='https://www.moxa.com/support/support_home.aspx' license=('GPL') depends=('glibc') optdepends=('setserial: set RS-422 485 modes') +options=('!strip') install="${pkgname}-install.sh" _srcdir="${pkgname#*-}" source=("https://www.moxa.com/drivers/IDC_SW/UPort/Driver/UPort%201100%20Series/Linux/V${pkgver}/legacy/driv_linux_kernel2.x_uport1p_v${pkgver}_build_18050314.tgz") @@ -38,9 +39,9 @@ _install_check() { for _ckvar in '_pkgname' '_modulename' '_builtinmod'; do _ckline="${_ckvar}='${!_ckvar}'" if ! grep -q "^${_ckline}"'$' "${startdir}/${install}"; then + set +u msg "${install} must be fixed" echo "${_ckline}" - set +u false fi done @@ -55,12 +56,12 @@ prepare() { sed -e 's:/lib/:/usr/lib/:g' -i driver/*/Makefile driver/*/mxconf # Fix umbrella Makefile - sed -e '# Too quiet' \ - -e '/make / s: -s::g' \ + sed -e '# Disable silent' \ + -e '/make / s:\s\+-s::g' \ -e '# Disable kernel 2.4 detection' \ -e '/^KERNEL_VERSION_MAJOR_NUMBER/,/^$/ s:^.:#&:g' \ -e '# Improve chdir technique' \ - -e 's:^.*@cd.*$:#&-:g' \ + -e 's:^\t@cd .*$:#&-:g' \ -e 's:^\tmake:\t@make -C $(DRIVER_PATH):g' \ -i 'Makefile' @@ -125,7 +126,18 @@ package() { # Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR # https://aur.archlinux.org/ -blacklist ${_builtinmod} +# This will kill other ti devices +#blacklist ${_builtinmod} + +# Override alias list in ti_usb_3410_5052 +# Moxa 1110 1130 1150 1151 1131 +alias usb:v110Ap1151d*dc*dsc*dp*ic*isc*ip*in* mxu11x0 +alias usb:v110Ap1150d*dc*dsc*dp*ic*isc*ip*in* mxu11x0 +alias usb:v110Ap1131d*dc*dsc*dp*ic*isc*ip*in* mxu11x0 +alias usb:v110Ap1130d*dc*dsc*dp*ic*isc*ip*in* mxu11x0 +alias usb:v110Ap1110d*dc*dsc*dp*ic*isc*ip*in* mxu11x0 +# This prefers the moxa driver over the ti driver for boot and hotplug +softdep ${_builtinmod} pre: ${_modulename} EOF ) "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf" @@ -149,7 +161,6 @@ CLEAN[0]="make -j1 -C 'driver/kernel2.6' clean" DEST_MODULE_LOCATION[0]="/kernel/drivers/usb/serial" EOF ) "${_dkms}/dkms.conf" - install -dm755 "${_dkms}/driver/" cp -pr 'driver/' "${_dkms}/" rm -r "${_dkms}/driver/kernel2.4" rm "${_dkms}/driver/kernel2.6/mxconf" diff --git a/moxa-mxu11x0-install.sh b/moxa-mxu11x0-install.sh index 93677690b8be..306e273b2709 100644 --- a/moxa-mxu11x0-install.sh +++ b/moxa-mxu11x0-install.sh @@ -2,18 +2,27 @@ _pkgname='moxa-mxu11x0' _modulename='mxu11x0' _builtinmod='ti_usb_3410_5052' -post_upgrade() { - set -u +_ui() { if [ ! -d "/usr/src/${_pkgname}"-*/ ]; then # depmod -a # now done by pacman hook modprobe -r "${_builtinmod}" modprobe "${_modulename}" + elif [ "$1" = 'i' ]; then + echo "You can switch to the new module immediately with" + echo " modprobe -r ${_builtinmod}" + echo " modprobe ${_builtinmod}" + # echo " modprobe ${_modulename}" fi +} + +post_upgrade() { + set -u + _ui 'u' set +u } post_install() { - post_upgrade + _ui 'i' } pre_remove() { |