summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Scafora2015-06-09 14:03:00 +0200
committerGiovanni Scafora2015-06-09 14:03:00 +0200
commit3956294df4dcf743f7b250f23b337e6b71068872 (patch)
tree9fa46c407fb036adbb9ab9a99b41cf434a038c2a
downloadaur-3956294df4dcf743f7b250f23b337e6b71068872.tar.gz
Initial import
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD33
-rw-r--r--eep24c_0.1.2-5.patch46
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..746c4d9061a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = eep24c
+ pkgdesc = Read and write serial I2C eeprom devices
+ pkgver = 0.1.2
+ pkgrel = 1
+ url = http://eep24c.sourcearchive.com/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = glibc
+ backup = etc/eep24c/eep24c.cfg
+ source = http://eep24c.sourcearchive.com/downloads/0.1.2-5/eep24c_0.1.2.orig.tar.gz
+ source = eep24c_0.1.2-5.patch
+ md5sums = b8427a22469116ddb0041cb283ceb11a
+ md5sums = 9d2ab3026a7c22574fcf17bcd5a571aa
+
+pkgname = eep24c
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a5eae47cce6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+
+pkgname=eep24c
+pkgver=0.1.2
+pkgrel=1
+pkgdesc="Read and write serial I2C eeprom devices"
+arch=('i686' 'x86_64')
+url="http://eep24c.sourcearchive.com/"
+license=('GPL')
+depends=('glibc')
+backup=('etc/eep24c/eep24c.cfg')
+source=("http://eep24c.sourcearchive.com/downloads/0.1.2-5/eep24c_0.1.2.orig.tar.gz"
+ 'eep24c_0.1.2-5.patch')
+md5sums=('b8427a22469116ddb0041cb283ceb11a'
+ '9d2ab3026a7c22574fcf17bcd5a571aa')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/eep24c_0.1.2-5.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make CFLAGS="${CFLAGS}"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}/" install
+}
diff --git a/eep24c_0.1.2-5.patch b/eep24c_0.1.2-5.patch
new file mode 100644
index 00000000000..354bbc75b97
--- /dev/null
+++ b/eep24c_0.1.2-5.patch
@@ -0,0 +1,46 @@
+--- eep24c-0.1.2.orig/mcdelay.h
++++ eep24c-0.1.2/mcdelay.h
+@@ -24,7 +24,7 @@
+ #ifndef _MICRODELAY_H
+ #define _MICRODELAY_H
+
+-void microdelay_init(int multiply_factor);
++void microdelay_init(unsigned int multiply_factor);
+ void microdelay(unsigned int microsec);
+
+ #endif
+--- eep24c-0.1.2.orig/mcdelay.c
++++ eep24c-0.1.2/mcdelay.c
+@@ -43,7 +43,7 @@
+ int old_port_value;
+ unsigned int m_f;
+
+-void microdelay_init(int multiply_factor) {
++void microdelay_init(unsigned int multiply_factor) {
+ /* permition to write in port 0x80
+ nothing is suposed to use this port
+ however, we will write the same value we read... */
+@@ -61,19 +61,15 @@
+ }
+
+ void microdelay(unsigned int microsec) {
+- unsigned int i;
+- i = m_f;
++ unsigned long int i;
++ i = m_f * microsec;
+ while (i)
+ {
+- while (microsec)
+- {
+ #ifdef __dos__
+- outportb(0x80, old_port_value);
++ outportb(0x80, old_port_value);
+ #else
+- outb(old_port_value,0x80);
++ outb(old_port_value,0x80);
+ #endif
+- microsec--;
+- }
+ i--;
+ }
+ }