summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonidas Spyropoulos2021-04-07 18:24:49 +0100
committerLeonidas Spyropoulos2021-04-07 18:26:22 +0100
commit7cbeab87a1c2d287988c19bb80e0c5761d7546d3 (patch)
tree70e2396d8da435250190c19377ef5da47cdc0404
downloadaur-7cbeab87a1c2d287988c19bb80e0c5761d7546d3.tar.gz
Initial commit
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD58
-rw-r--r--dkms.conf7
3 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7962a3be6d4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = corefreq
+ pkgver = 1.84
+ pkgrel = 1
+ url = https://github.com/cyring/CoreFreq
+ arch = x86_64
+ license = GPL2
+ depends = dkms
+ source = corefreq-1.84.tar.gz::https://github.com/cyring/CoreFreq/archive/1.84.tar.gz
+ source = dkms.conf
+ b2sums = c4f956b785ada9a9cfcc508a28e2146cab756cc4da67c25f7c67826e6a921079f95139deadeaae9621231bb982a682db5eee3eec4c760cbf929226aa036a6deb
+ b2sums = c6d8849944f99195038ac252d010d3e3001cd1dcaee57218c4a7f58fa313aa38842e4ea991d4d9ff7d04063ebaa9900c06ff1eacfa6270341cf37fb752adc00c
+
+pkgname = corefreq-client
+ pkgdesc = CoreFreq client
+ depends = corefreq-server=1.84
+ provides = corefreq-client
+
+pkgname = corefreq-server
+ pkgdesc = CoreFreq server
+ depends = corefreq-dkms=1.84
+ provides = corefreq-server
+
+pkgname = corefreq-dkms
+ pkgdesc = CoreFreq - kernel module sources
+ depends = dkms
+ provides = corefreq-dkms=1.84
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2f27526c248
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Leonidas Spyropoulos <artafinde at gmail dot com>
+# Contributor: CyrIng <labs[at]cyring[dot]fr>
+
+pkgbase=corefreq
+pkgname=(corefreq-client corefreq-server corefreq-dkms)
+_gitname=CoreFreq
+pkgver=1.84
+pkgrel=1
+arch=('x86_64')
+url='https://github.com/cyring/CoreFreq'
+license=('GPL2')
+depends=('dkms')
+source=(${pkgbase}-${pkgver}.tar.gz::"${url}/archive/${pkgver}.tar.gz"
+ 'dkms.conf')
+b2sums=('c4f956b785ada9a9cfcc508a28e2146cab756cc4da67c25f7c67826e6a921079f95139deadeaae9621231bb982a682db5eee3eec4c760cbf929226aa036a6deb'
+ 'c6d8849944f99195038ac252d010d3e3001cd1dcaee57218c4a7f58fa313aa38842e4ea991d4d9ff7d04063ebaa9900c06ff1eacfa6270341cf37fb752adc00c')
+
+build() {
+ cd "${_gitname}-${pkgver}"
+ make corefreqd corefreq-cli
+}
+
+package_corefreq-dkms() {
+ pkgdesc="CoreFreq - kernel module sources"
+ depends=('dkms')
+ provides=("corefreq-dkms=$pkgver")
+ _kernelmodule=corefreqk
+
+ # Copy simple dkms.conf
+ install -Dm644 dkms.conf "${pkgdir}/usr/src/${pkgbase}-${pkgver}/dkms.conf"
+ # Set name and version
+ sed -e "s/@_PKGBASE@/${pkgbase}/" \
+ -e "s/@PKGVER@/${pkgver}/" \
+ -e "s/@_KERNELMODULE@/${_kernelmodule}/" \
+ -i "${pkgdir}/usr/src/${pkgbase}-${pkgver}/dkms.conf"
+
+ # Copy sources (including Makefile)
+ cp -r "${_gitname}-${pkgver}"/{*.c,*.h,Makefile} "${pkgdir}/usr/src/${pkgbase}-${pkgver}/"
+}
+
+package_corefreq-server() {
+ pkgdesc="CoreFreq server"
+ depends=("corefreq-dkms=$pkgver")
+ provides=('corefreq-server')
+
+ cd "${_gitname}-${pkgver}"
+ install -Dm755 corefreqd "${pkgdir}/usr/bin/corefreqd"
+ install -Dm 0644 corefreqd.service "${pkgdir}/usr/lib/systemd/system/corefreqd.service"
+}
+
+package_corefreq-client() {
+ pkgdesc="CoreFreq client"
+ depends=("corefreq-server=$pkgver")
+ provides=('corefreq-client')
+
+ cd "${_gitname}-${pkgver}"
+ install -Dm755 corefreq-cli "${pkgdir}/usr/bin/corefreq-cli"
+}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 00000000000..93035bad1eb
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,7 @@
+PACKAGE_NAME="@_PKGBASE@"
+PACKAGE_VERSION="@PKGVER@"
+CLEAN="make -C $source_tree/$PACKAGE_NAME-$PACKAGE_VERSION KERNELDIR=$kernel_source_dir clean"
+MAKE[0]="make -C $source_tree/$PACKAGE_NAME-$PACKAGE_VERSION KERNELDIR=$kernel_source_dir"
+BUILT_MODULE_NAME[0]="@_KERNELMODULE@"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/misc"
+AUTOINSTALL="yes"