summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Dienstbier2016-02-27 12:03:06 +0100
committerMatthias Dienstbier2016-02-27 12:03:06 +0100
commitd024168847edfdf6b959edd4952e7ac826a6217f (patch)
tree1231d6118d7116cd3811228e1451c052bfc34e08
parent799b0df0b893ae7eefa4bb7bd9c77bd82f635556 (diff)
downloadaur-d024168847edfdf6b959edd4952e7ac826a6217f.tar.gz
Update to 0.3.2.12.19-2
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD28
-rw-r--r--dkms.conf7
-rw-r--r--phc-intel.install50
-rw-r--r--phc-intel.sh37
5 files changed, 64 insertions, 69 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b5a6f18d0301..79664e0a65cf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,16 @@
+# Generated by mksrcinfo v8
+# Sat Feb 27 11:02:01 UTC 2016
pkgbase = phc-intel
pkgdesc = frequency driver for Intel CPUs with undervolting feature
pkgver = 0.3.2.12.19
- pkgrel = 1
+ pkgrel = 2
url = http://www.linux-phc.org
install = phc-intel.install
arch = any
license = GPL
+ depends = dkms
+ optdepends = linux-headers
+ optdepends = linux-lts-headers
provides = linux-phc
backup = etc/default/phc-intel
source = phc-intel-pack-rev19.tar.bz2::http://www.linux-phc.org/forum/download/file.php?id=168
@@ -13,11 +18,13 @@ pkgbase = phc-intel
source = phc-intel.sh
source = phc-intel.sleep
source = phc-intel.system-sleep
+ source = dkms.conf
sha256sums = 48e1e866e42cee5b80cabbbf62ca4d96f4cc6337f375bd2553c3a99bc595fbaa
sha256sums = ce08a5a4107be1d5723f1f169d515e67b6c77893f3994fc2d0d2ccf611307ed3
- sha256sums = c48fea46501c98c1f2aee0a49fd6abc68ac5a691bbdd3e3e41eb25dd2080c17f
+ sha256sums = b526f3e8e66f6495531f13f2e6867d3a07b2ec7a7c3b8aa061f22be1cd6e770f
sha256sums = 569b85988cb38380fec85c25688b76abc24a46601aa8f58eb24eaebf863eebef
sha256sums = 2e17c90d7bfae8f5070e46388e95d443188eaa7beb5ffdd418a0da090f2e7557
+ sha256sums = 7b44882a96eeb7c79dbb7fe5b1ff8cded68c2b6a374c95bdc5e08c414cfd3549
pkgname = phc-intel
diff --git a/PKGBUILD b/PKGBUILD
index 41f027bef95d..fe45049d4d4b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,39 @@
# Maintainer: fs4000 <matthias_dienstbier[at]yahoo[dot]de>
-# Maintainer: trapanator <trap[at]trapanator[dot]com>
-# Maintainer: tomprogrammer <Thomas-Bahn[at]gmx[dot]net>
+# Contributor: trapanator <trap[at]trapanator[dot]com>
+# Contributor: tomprogrammer <Thomas-Bahn[at]gmx[dot]net>
pkgname=phc-intel
-pkgver=0.3.2.12.19
+_phcver=0.3.2
+pkgver=$_phcver.12.19
_realver=pack-rev19
-pkgrel=1
+pkgrel=2
pkgdesc="frequency driver for Intel CPUs with undervolting feature"
url="http://www.linux-phc.org"
arch=('any')
license=('GPL')
+depends=('dkms')
+optdepends=('linux-headers' 'linux-lts-headers')
provides=('linux-phc')
-backup=(etc/default/phc-intel)
+backup=('etc/default/phc-intel')
install=phc-intel.install
source=(phc-intel-$_realver.tar.bz2::$url/forum/download/file.php?id=168
- phc-intel.{default,sh,sleep,system-sleep})
+ phc-intel.{default,sh,sleep,system-sleep}
+ dkms.conf)
sha256sums=('48e1e866e42cee5b80cabbbf62ca4d96f4cc6337f375bd2553c3a99bc595fbaa'
'ce08a5a4107be1d5723f1f169d515e67b6c77893f3994fc2d0d2ccf611307ed3'
- 'c48fea46501c98c1f2aee0a49fd6abc68ac5a691bbdd3e3e41eb25dd2080c17f'
+ 'b526f3e8e66f6495531f13f2e6867d3a07b2ec7a7c3b8aa061f22be1cd6e770f'
'569b85988cb38380fec85c25688b76abc24a46601aa8f58eb24eaebf863eebef'
- '2e17c90d7bfae8f5070e46388e95d443188eaa7beb5ffdd418a0da090f2e7557')
+ '2e17c90d7bfae8f5070e46388e95d443188eaa7beb5ffdd418a0da090f2e7557'
+ '7b44882a96eeb7c79dbb7fe5b1ff8cded68c2b6a374c95bdc5e08c414cfd3549')
prepare() {
cd phc-intel-$_realver
- sed -e 's,$(DESTDIR)/lib/modules/$(KERNELRELEASE)/extra$,$(DESTDIR)/usr/lib/modules/$(KERNELRELEASE)/extramodules,' \
- -e 's,^\tinstall -m 644 -o root -g root phc-intel.modprobe,#\tinstall -m 644 -o root -g root phc-intel.modprobe,' -i Makefile
+ sed -i 's,all: .prepare $(TARGET),all: $(TARGET)\n$(SOURCE): .prepare,' Makefile
sed -i 's,/sbin/modprobe phc-intel |,/sbin/modprobe phc-intel \&\& /usr/bin/phc-intel set |,' phc-intel.modprobe
}
package() {
+ install -Dm644 dkms.conf "$pkgdir/usr/src/phc-intel-$_phcver/dkms.conf"
install -Dm644 phc-intel.default "$pkgdir/etc/default/phc-intel"
install -Dm755 phc-intel.sh "$pkgdir/usr/bin/phc-intel"
install -Dm755 phc-intel.sleep "$pkgdir/usr/lib/pm-utils/sleep.d/00phc-intel"
@@ -36,6 +41,5 @@ package() {
cd phc-intel-$_realver
install -Dm644 phc-intel.modprobe "$pkgdir/usr/lib/modprobe.d/phc-intel.conf"
- install -d "$pkgdir/usr/src/phc-intel/"
- cp -R inc Makefile "$pkgdir/usr/src/phc-intel/"
+ cp -R inc Makefile "$pkgdir/usr/src/phc-intel-$_phcver/"
}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 000000000000..db660379ac53
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,7 @@
+PACKAGE_NAME="phc-intel"
+PACKAGE_VERSION=0.3.2
+AUTOINSTALL="yes"
+
+BUILT_MODULE_NAME[0]="phc-intel"
+DEST_MODULE_LOCATION[0]="/extra"
+MAKE[0]="make KERNELSRC=$kernel_source_dir"
diff --git a/phc-intel.install b/phc-intel.install
index 287d0b85d262..fb69a8b4a045 100644
--- a/phc-intel.install
+++ b/phc-intel.install
@@ -1,30 +1,32 @@
post_install() {
- cat << EOF
-Run "phc-intel setup" to build the module for current kernel.
-You can enter the desired voltage IDs in /etc/default/phc-intel.
-Booting with nophc kernel parameter skips setting of VIDs in case of failure.
-EOF
+ cat <<-EOF
+ You can enter the desired voltage IDs in /etc/default/phc-intel.
+ Booting with nophc kernel parameter skips setting of VIDs in case of failure.
+ EOF
}
-post_upgrade() {
- rm -f var/log/phc-intel.log
+pre_upgrade() {
+ if (( "$(vercmp $2 0.3.2.12.19-2)" < 0 )); then
+ cd usr/lib/modules/
+ for i in *; do
+ if [ -f "$i/extramodules/phc-intel.ko" ]; then
+ rm -f "$i/extramodules/phc-intel.ko"
+ [ -d "$i/kernel" ] && depmod "$i"
+ elif [ -f "$i/phc-intel.ko" ]; then
+ rm -f "$i/phc-intel.ko"
+ rmdir -p --ignore-fail-on-non-empty "$i"
+ elif [ -f "$i/extra/phc-intel.ko" ]; then
+ rm -f "$i/extra/phc-intel.ko"
+ rmdir -p --ignore-fail-on-non-empty "$i/extra"
+ [ -d "$i/kernel" ] && depmod "$i"
+ fi
+ done
+ fi
}
-post_remove() {
- echo Removing built modules ...
- rm -rf usr/src/phc-intel/
- cd usr/lib/modules/
- for i in *; do
- if [ -f "$i/extramodules/phc-intel.ko" ]; then
- rm -f "$i/extramodules/phc-intel.ko"
- [ -d "$i/kernel" ] && depmod "$i"
- elif [ -f "$i/phc-intel.ko" ]; then
- rm -f "$i/phc-intel.ko"
- rmdir -p --ignore-fail-on-non-empty "$i"
- elif [ -f "$i/extra/phc-intel.ko" ]; then
- rm -f "$i/extra/phc-intel.ko"
- rmdir -p --ignore-fail-on-non-empty "$i/extra"
- [ -d "$i/kernel" ] && depmod "$i"
- fi
- done
+post_upgrade() {
+ if (( "$(vercmp $2 0.3.2.12.19-2)" < 0 )); then
+ rm -rf usr/src/phc-intel/
+ echo '===> The kernel module gets automatically built by DKMS now.'
+ fi
}
diff --git a/phc-intel.sh b/phc-intel.sh
index 8a63053cf608..cce4bf96ad91 100644
--- a/phc-intel.sh
+++ b/phc-intel.sh
@@ -15,19 +15,19 @@ start)
;;
stop)
echo ':: Resetting default PHC VIDs'
- for i in /sys/devices/system/cpu/cpu*/cpufreq; do
- [ -e "$i/phc_default_vids" -a -e "$i/phc_vids" ] && cp "$i"/phc_{default_,}vids
+ for i in /sys/devices/system/cpu/cpu*/cpufreq/phc_vids; do
+ cp "${i%vids}default_vids" "$i"
done
;;
status)
check_off () {
- for i in /sys/devices/system/cpu/cpu*/cpufreq; do
- [ "$(< $i/phc_vids)" = "$(< $i/phc_default_vids)" ] || return;
+ for i in /sys/devices/system/cpu/cpu*/cpufreq/phc_vids; do
+ [ "$(< "$i")" = "$(< "${i%vids}default_vids")" ] || return;
done
}
check_on () {
for i in /sys/devices/system/cpu/cpu*/cpufreq/phc_vids; do
- [[ "$(< $i)" =~ "$VIDS" ]] || return;
+ [[ "$(< "$i")" =~ "$VIDS" ]] || return;
done
}
echo -n 'PHC status: '
@@ -40,31 +40,6 @@ status)
echo 'unknown'
fi
;;
-setup)
- echo ':: Removing old phc-intel modules'
- echo
- for i in /usr/lib/modules/*; do
- if [ -f "$i/phc-intel.ko" -a ! -f "$i/version" ]; then
- rm -f "$i/phc-intel.ko"
- rmdir --ignore-fail-on-non-empty "$i"
- elif [ -f "$i/extra/phc-intel.ko" -a ! -d "$i/kernel" ]; then
- rm -f "$i/extra/phc-intel.ko"
- rmdir -p --ignore-fail-on-non-empty "$i/extra"
- fi
- done
- echo ':: Compiling new phc-intel module'
- echo
- cd /usr/src/phc-intel/
- make
- echo
- echo ':: Installing new phc-intel module'
- echo
- make install
- echo
- echo ':: Cleaning up'
- echo
- make clean
- ;;
set)
. /etc/default/phc-intel
[ -z "$VIDS" ] && exit
@@ -76,5 +51,5 @@ set)
done
;;
*)
- echo "usage: $0 {start|stop|status|setup|set}"
+ echo "usage: $0 {start|stop|status|set}"
esac