summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChris Severance2018-11-16 11:06:58 -0500
committerChris Severance2018-11-16 11:06:58 -0500
commite23593c23762ad65b2dd6df6ec5cd4ea764ce85b (patch)
treebd2b653a92e771f0834b1e178ba93fba37d5c86f /PKGBUILD
parenta5b2559564ff8297368d53e6fe6f5928f4d2c7fe (diff)
downloadaur-e23593c23762ad65b2dd6df6ec5cd4ea764ce85b.tar.gz
autu: Update to 1.4.0-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD27
1 files changed, 20 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b370c7348321..04ef3d8fb4c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,7 +20,7 @@ _modulename='ax99100'
set -u
pkgname="asix-${_modulename,,}"
-pkgver='1.2.0'
+pkgver='1.4.0'
pkgrel='1'
pkgdesc='kernel module driver for Asix serial RS-232 port'
arch=('i686' 'x86_64')
@@ -30,8 +30,8 @@ makedepends=('gzip' 'findutils' 'sed' 'diffutils' 'patch')
#backup=("etc/modprobe.d/${_modulename}.conf")
install="${pkgname}-install.sh"
_srcdir="AX99100_SP_PP_SPI_LINUX_Driver_v${pkgver}_Source"
-source=("http://www.asix.com.tw/FrootAttach/driver/${_srcdir}.tar.gz")
-sha256sums=('0e2c7d9cc7c89ab212088fb02ea48f38541eef8fc3b5c856fc87c4285876fdbf')
+source=("https://www.asix.com.tw/FrootAttach/driver/${_srcdir}.tar.bz2")
+sha256sums=('1e40ab499f669dfdea7bfd43ae6a09efcb0c135a481b99ed9bd0e334a8e705a3')
if [ "${_opt_DKMS}" -ne 0 ]; then
depends+=('linux' 'dkms' 'linux-headers')
@@ -73,7 +73,7 @@ prepare() {
-e '# RM isnt set anywhere so why use it?' \
-e 's:\$(RM):rm -f:g' \
-e '# Forgot to clean something' \
- -e '/^clean:/,/^$/ s:\*\.mod\.c \*\.o:*.mod.c .*.o.d *.o:g' \
+ -e '/^clean:/,/^$/ s:\*\.mod\.c \*\.o:*.mod.c .*.o.d *.o .cache.mk:g' \
-e 's:/usr/:"$(DESTDIR)"&:g' \
-e 's:/etc/:"$(DESTDIR)"&:g' \
-e '/ln -s/ s:"$(DESTDIR)"::' \
@@ -100,8 +100,20 @@ prepare() {
#cp -p 'ax99100_sp.c'{,.orig}
sed -e '/"/ s:\bAX99100\b:ax99100:g' -i 'ax99100_sp.c'
- # Branding, and forgot to update the version
- sed -e 's:^\(#define DRV_VERSION\s\).*$:\1"'"${pkgver}"' Arch Linux":g' -i 'ax99100_sp.h'
+ # Branding
+ if ! :; then
+ # forgot to update the version
+ sed -e 's:^\(#define DRV_VERSION\s\).*$:\1"'"${pkgver}"' Arch Linux":g' -i 'ax99100_sp.h'
+ else
+ local _vers
+ _vers="$(sed -n -e 's:^#define DRV_VERSION\s"\([^"]\+\)".*$:\1:p' 'ax99100_sp.h')" # '
+ if [ "${_vers}" != "${pkgver}" ]; then
+ echo "Version mismatch ${_vers} ${pkgver}"
+ set +u
+ false
+ fi
+ sed -e '/^#define DRV_VERSION/ s:"\(.*\)":"\1 Arch Linux":g' -i 'ax99100_sp.h'
+ fi
'ma'ke -s clean
set +u
@@ -141,7 +153,8 @@ package() {
done
if [ "${_opt_DKMS}" -ne 0 ]; then
- rm -rf "${pkgdir}/usr/lib/modules/"
+ rm -r "${pkgdir}/usr/lib/modules/"
+ rmdir --ignore-fail-on-non-empty -p "${pkgdir}/usr/lib"
local _dkms="${pkgdir}/usr/src/${pkgname}-${pkgver}"
install -Dm644 <(cat << EOF
# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR