summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Salmanovich2015-11-07 11:37:22 +0000
committerDenis Salmanovich2015-11-07 11:37:22 +0000
commit37584197d0b27d61d96bc6cc9397e8bb8b296ddc (patch)
treeb09eec6389fcbe3dd5679f393998d27400fdf382
downloadaur-37584197d0b27d61d96bc6cc9397e8bb8b296ddc.tar.gz
Init commit
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD32
-rw-r--r--gctwimax-0.0.3rc4_libusb_context_fix.patch32
-rw-r--r--modacom-u3500.service12
4 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..250fc145e3a7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = gctwimax-modacom-u3500
+ pkgdesc = Linux driver for modacom-u3500 GCT Semiconductor WiMax chip. Used by mezon.lt in Lithuania
+ pkgver = 1.0
+ pkgrel = 1
+ url = https://code.google.com/p/gctwimax
+ arch = i686
+ arch = x86_64
+ arch = armv6h
+ license = custom
+ depends = libusb
+ depends = libeap-modacom-u3500
+ depends = usb_modeswitch
+ depends = wpa_supplicant
+ source = http://gctwimax.googlecode.com/files/gctwimax-0.0.3rc4.tar.gz
+ source = gctwimax-0.0.3rc4_libusb_context_fix.patch
+ source = modacom-u3500.service
+ md5sums = 55d643a2e18811207b96a31751dcd2ab
+ md5sums = f298ac40355f613b79c92d94bd20a7ce
+ md5sums = 733eea0fcfc0464d23e9855199f4f558
+
+pkgname = gctwimax-modacom-u3500
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..acc012eccc20
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer : Denis Salmanovich <denis.salmanovich@gmail.com>
+
+pkgname=gctwimax-modacom-u3500
+pkgver=1.0
+pkgrel=1
+pkgdesc="Linux driver for modacom-u3500 GCT Semiconductor WiMax chip. Used by mezon.lt in Lithuania"
+arch=('i686' 'x86_64' 'armv6h')
+url="https://code.google.com/p/gctwimax"
+license=('custom')
+depends=('libusb' 'libeap-modacom-u3500' 'usb_modeswitch' 'wpa_supplicant')
+source=('http://gctwimax.googlecode.com/files/gctwimax-0.0.3rc4.tar.gz'
+ 'gctwimax-0.0.3rc4_libusb_context_fix.patch'
+ 'modacom-u3500.service')
+
+build()
+{
+ cd ${srcdir}/gctwimax-0.0.3rc4
+ patch -p1 < ${srcdir}/gctwimax-0.0.3rc4_libusb_context_fix.patch
+ make
+}
+package()
+{
+ cd ${srcdir}/gctwimax-0.0.3rc4
+ install -Dm755 gctwimax ${pkgdir}/usr/bin/gctwimax
+ install -Dm644 ${srcdir}/modacom-u3500.service ${pkgdir}/usr/lib/systemd/system/modacom-u3500.service
+ install -Dm755 src/event.sh ${pkgdir}/usr/share/gctwimax/event.sh
+ install -Dm644 src/gctwimax.conf ${pkgdir}/usr/share/gctwimax/gctwimax.conf
+}
+
+md5sums=('55d643a2e18811207b96a31751dcd2ab'
+ 'f298ac40355f613b79c92d94bd20a7ce'
+ '733eea0fcfc0464d23e9855199f4f558') \ No newline at end of file
diff --git a/gctwimax-0.0.3rc4_libusb_context_fix.patch b/gctwimax-0.0.3rc4_libusb_context_fix.patch
new file mode 100644
index 000000000000..d57514891f1f
--- /dev/null
+++ b/gctwimax-0.0.3rc4_libusb_context_fix.patch
@@ -0,0 +1,32 @@
+Date: 2012-04-28 22:16:26.652869800 +0200
+Subject: [PATCH] gctwimax: add libusb context when open device
+
+--- a/src/wimax.c 2011-11-26 23:41:27.659546400 +0200
++++ b/src/wimax.c 2012-04-28 22:16:26.652869800 +0300
+@@ -266,7 +266,7 @@
+ {
+ struct libusb_device_handle *handle = NULL;
+ int r;
+- handle = libusb_open_device_with_vid_pid(NULL, 0x1076, 0x7f40);
++ handle = libusb_open_device_with_vid_pid(ctx, 0x1eb8, 0x7f40);
+ if (handle != NULL ){
+ int disk_if = 0;
+
+@@ -316,7 +316,7 @@
+ struct libusb_device_handle *handle = NULL;
+
+ //Switch modem the same as in usb_modeswitch
+- handle = libusb_open_device_with_vid_pid(NULL, 0x1076, 0x7f00);
++ handle = libusb_open_device_with_vid_pid(ctx, 0x1eb8, 0x7f00);
+ if (handle == NULL){
+ if (switch_wimax_device()){
+
+@@ -324,7 +324,7 @@
+ do
+ {
+ sleep(1); // Wait while device switching
+- handle = libusb_open_device_with_vid_pid(NULL, 0x1076, 0x7f00);
++ handle = libusb_open_device_with_vid_pid(ctx, 0x1eb8, 0x7f00);
+ }
+ while (retry++ < 5 && !handle);
+
diff --git a/modacom-u3500.service b/modacom-u3500.service
new file mode 100644
index 000000000000..12a3d386d777
--- /dev/null
+++ b/modacom-u3500.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Mezon modem daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/gctwimax -C /usr/share/gctwimax/gctwimax.conf
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=always
+
+[Install]
+WantedBy=multi-user.target