summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Tremblay2017-03-13 10:08:59 -0400
committerGabriel Tremblay2017-03-13 10:08:59 -0400
commit1f8a45b97c6588f62a498d517567636687bd76c8 (patch)
treeb690a9fa0d34031b47ddea566bddf12199576294
downloadaur-1f8a45b97c6588f62a498d517567636687bd76c8.tar.gz
Git package for i8kutils
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD45
-rw-r--r--fix_Makefile.patch29
-rw-r--r--i8kmon.service9
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3955c4531edd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = i8kutils-git
+ pkgdesc = Fan control for Dell laptops
+ pkgver = 20170306.976c36a
+ pkgrel = 1
+ url = https://github.com/vitorafsr/i8kutils
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ depends = bash
+ optdepends = tcl: for i8kmon daemon
+ optdepends = acpi: for i8kmon daemon
+ optdepends = tk: for i8kmon GUI mode
+ conflicts = i8kutils
+ backup = etc/i8kutils/i8kmon.conf
+ source = git+https://github.com/vitorafsr/i8kutils.git
+ source = fix_Makefile.patch
+ source = i8kmon.service
+ sha1sums = SKIP
+ sha1sums = fe5407464f59c023c5b52fdadd3275abdac720a4
+ sha1sums = 5c20f5241de7e60b46117269f4e867b08734cdc8
+
+pkgname = i8kutils-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..24c23b41c8c8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Gabriel Tremblay gabriel@delvelabs.ca
+pkgname=i8kutils-git
+_pkgname=i8kutils
+pkgrel=1
+pkgver=20170306.976c36a
+pkgdesc="Fan control for Dell laptops"
+makedepends=("git")
+conflicts=("$_pkgname")
+arch=("i686" "x86_64")
+url="https://github.com/vitorafsr/$_pkgname"
+license=("GPL")
+depends=("bash")
+optdepends=("tcl: for i8kmon daemon" "acpi: for i8kmon daemon" "tk: for i8kmon GUI mode")
+backup=("etc/$_pkgname/i8kmon.conf")
+source=("git+https://github.com/vitorafsr/$_pkgname.git"
+ "fix_Makefile.patch"
+ "i8kmon.service")
+
+sha1sums=("SKIP"
+ "fe5407464f59c023c5b52fdadd3275abdac720a4"
+ "5c20f5241de7e60b46117269f4e867b08734cdc8")
+
+prepare() {
+ cd $srcdir
+ cd $_pkgname
+ # conform to Arch Linux guidelines
+ sed -i "s|/etc/i8kmon|/etc/$_pkgname/i8kmon.conf|g" i8kmon.1
+ sed -i "s|/etc/i8kmon.conf|/etc/$_pkgname/i8kmon.conf|g" i8kmon
+ make clean
+}
+
+build() {
+ cd $_pkgname
+ make
+}
+
+package() {
+ cd $_pkgname
+ install -d "$pkgdir"/usr/{bin,share/man/man1}
+ install -D -m644 i8kctl.1 i8kmon.1 "$pkgdir/usr/share/man/man1"
+ install -D -m755 i8kctl i8kfan i8kmon "$pkgdir/usr/bin"
+
+ install -D -m644 i8kmon.conf "$pkgdir/etc/i8kutils/i8kmon.conf"
+ install -D -m644 ../i8kmon.service "$pkgdir/usr/lib/systemd/system/i8kmon.service"
+}
diff --git a/fix_Makefile.patch b/fix_Makefile.patch
new file mode 100644
index 000000000000..38fc8d9e296f
--- /dev/null
+++ b/fix_Makefile.patch
@@ -0,0 +1,29 @@
+diff -Naur i8kutils/Makefile i8kutils_new/Makefile
+--- i8kutils/Makefile 2014-12-09 16:40:11.000000000 +0100
++++ i8kutils_new/Makefile 2015-01-31 13:15:21.031912744 +0100
+@@ -14,16 +14,19 @@
+ # General Public License for more details.
+
+ ccflags-y = -Wall
++CC = gcc
+
+ all: i8kctl probe_i8k_calls_time
+
+-i8kctl: i8kctl.c i8kctl.o
+- gcc -Wall i8kctl.c -o i8kctl
++i8kctl: i8kctl.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -Wall i8kctl.c -o i8kctl
+
+-probe_i8k_calls_time: probe_i8k_calls_time.c
+- gcc -Wall -c -g -DLIB i8kctl.c
+- gcc -Wall -c -g -DLIB probe_i8k_calls_time.c
+- gcc -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o
++i8kctl_DLIB.o: i8kctl.c
++ $(CC) $(CFLAGS) -Wall -c -g -DLIB i8kctl.c -o i8kctl_DLIB.o
++
++probe_i8k_calls_time: i8kctl_DLIB.o probe_i8k_calls_time.c
++ $(CC) $(CFLAGS) -Wall -c -g -DLIB probe_i8k_calls_time.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -Wall -o probe_i8k_calls_time i8kctl_DLIB.o probe_i8k_calls_time.o
+
+ i8k:
+ make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
diff --git a/i8kmon.service b/i8kmon.service
new file mode 100644
index 000000000000..3b80f46334af
--- /dev/null
+++ b/i8kmon.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Dell laptop thermal monitoring
+ConditionPathExists=/proc/i8k
+
+[Service]
+ExecStart=/usr/bin/i8kmon -d
+
+[Install]
+WantedBy=multi-user.target