summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO25
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD58
-rw-r--r--asix-dkms.install50
-rw-r--r--dkms.conf6
-rw-r--r--time_date_errors.patch11
6 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..74ca2fc51963
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = asix-dkms
+ pkgdesc = Driver for USB ASIX Ethernet models AX88772C 772B 772A 760 772 178
+ pkgver = v4.17.0
+ pkgrel = 1
+ url = http://www.asix.com.tw/
+ install = asix-dkms.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = dkms
+ provides = asix-dkms
+ provides = asix-module
+ conflicts = asix-module
+ options = !strip
+ source = http://www.asix.com.tw/FrootAttach/driver/AX88772C_772B_772A_760_772_178_LINUX_DRIVER_v4.17.0_Source.tar.bz2
+ source = dkms.conf
+ source = asix-dkms.install
+ source = time_date_errors.patch
+ md5sums = 611a447e67ac0443d36d16fd065a5a41
+ md5sums = fc33b5dd739e8964a346525a1434143e
+ md5sums = 5710bd634c776a8aa842687125386c12
+ md5sums = a13efd5ba934b4b983496d1172ee716a
+
+pkgname = asix-dkms
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..2c5a4a97e0f3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.tar.bz2
+*.tar.xz
+pkg/
+src/
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5d3c3c36be1d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: madmack <ali@devasque.com> (up to 4.6)
+# Maintainer: Andre Ericson <de.ericson@gmail.com> (4.6+)
+
+_pkgbase=asix
+pkgname=asix-dkms
+pkgver=v4.17.0
+pkgrel=1
+pkgdesc="Driver for USB ASIX Ethernet models AX88772C 772B 772A 760 772 178"
+arch=('i686' 'x86_64')
+url="http://www.asix.com.tw/"
+license=('GPL')
+depends=('dkms')
+provides=('asix-dkms' 'asix-module')
+conflicts=("asix-module")
+install=${pkgname}.install
+options=(!strip)
+_pkgname="AX88772C_772B_772A_760_772_178_LINUX_DRIVER"
+_pkgname2="Source"
+
+source=("http://www.asix.com.tw/FrootAttach/driver/${_pkgname}_${pkgver}_${_pkgname2}.tar.bz2"
+ "dkms.conf"
+ "asix-dkms.install"
+ "time_date_errors.patch")
+
+md5sums=('611a447e67ac0443d36d16fd065a5a41'
+ 'fc33b5dd739e8964a346525a1434143e'
+ '5710bd634c776a8aa842687125386c12'
+ 'a13efd5ba934b4b983496d1172ee716a')
+
+package() {
+
+ installDir="$pkgdir/usr/src/${_pkgbase}-${pkgver}"
+
+ install -dm755 "$installDir"
+ install -m644 "$srcdir/dkms.conf" "$installDir"
+ install -dm755 "$pkgdir/etc/modprobe.d"
+ install -dm755 "$pkgdir/etc/modules-load.d"
+
+ sed -e "s/@_PKGBASE@/${_pkgbase}/" \
+ -e "s/@PKGVER@/${pkgver}/" \
+ -i $installDir/dkms.conf
+
+ cd "${srcdir}/${_pkgname}_${pkgver}_${_pkgname2}/"
+
+ patch -p1 -i $srcdir/time_date_errors.patch
+
+ for d in `find . -type d`
+ do
+ install -dm755 "$installDir/$d"
+ done
+
+ for f in `find . -type f`
+ do
+ install -m644 "${srcdir}/${_pkgname}_${pkgver}_${_pkgname2}/$f" "$installDir/$f"
+ done
+}
+
+
diff --git a/asix-dkms.install b/asix-dkms.install
new file mode 100644
index 000000000000..da6973d6c4a4
--- /dev/null
+++ b/asix-dkms.install
@@ -0,0 +1,50 @@
+post_install (){
+ DKMS=$(which dkms)
+
+ $DKMS add -m asix -v v4.17.0
+ $DKMS build -m asix -v v4.17.0
+ $DKMS install -m asix -v v4.17.0
+
+ echo " >> "
+ echo " >> rmmod asix"
+ rmmod asix
+ echo " >> depmod -a"
+ depmod -a
+ echo " >> modprobe asix"
+ modprobe asix
+ echo " >> done "
+
+}
+
+pre_upgrade(){
+ pre_remove
+}
+
+post_upgrade(){
+ post_install
+}
+
+pre_remove (){
+ _inmemory=$(/usr/bin/lsmod | /usr/bin/grep asix)
+ if [ ! -z "$_inmemory" ]; then
+ /usr/bin/rmmod asix &> /dev/null
+ fi
+
+ DKMS=$(which dkms)
+
+ _line=$($DKMS status -m asix)
+ if echo "$_line" | grep -E 'added|built|installed'; then
+ version=$(echo "$_line" | sed 's/asix,\([^,]*\)[,:].*/\1/;t;d')
+ $DKMS remove -m asix -v $version --all
+ fi
+
+}
+
+post_remove () {
+ /sbin/depmod -a
+ modprobe asix
+}
+
+op=$1
+shift
+$op $*
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 000000000000..7ca298abef03
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,6 @@
+PACKAGE_NAME="@_PKGBASE@"
+PACKAGE_VERSION="@PKGVER@"
+MAKE[0]="make"
+BUILT_MODULE_NAME[0]="asix"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/net/usb"
+AUTOINSTALL="yes"
diff --git a/time_date_errors.patch b/time_date_errors.patch
new file mode 100644
index 000000000000..363bd64cb418
--- /dev/null
+++ b/time_date_errors.patch
@@ -0,0 +1,11 @@
+diff -aur AX88772C_772B_772A_760_772_178_LINUX_DRIVER_v4.17.0_Source.pristine/Makefile AX88772C_772B_772A_760_772_178_LINUX_DRIVER_v4.17.0_Source.new/Makefile
+--- AX88772C_772B_772A_760_772_178_LINUX_DRIVER_v4.17.0_Source.pristine/Makefile 2014-05-21 00:50:13.949688787 -0300
++++ AX88772C_772B_772A_760_772_178_LINUX_DRIVER_v4.17.0_Source.new/Makefile 2014-05-21 00:50:43.493684335 -0300
+@@ -10,6 +10,7 @@
+ endif
+
+ EXTRA_CFLAGS = -DEXPORT_SYMTAB
++EXTRA_CFLAGS += -Wno-date-time
+ PWD = $(shell pwd)
+ DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR)
+