# Maintainer: Leonidas Spyropoulos # Contributor: CyrIng ### BUILD OPTIONS # Set the next variables to ANYTHING that is not null to enable them # Enable transparency mode in terminal _transparency= ### Do no edit below this line unless you know what you're doing pkgbase=corefreq pkgname=(corefreq-client corefreq-server corefreq-dkms) _gitname=CoreFreq pkgver=1.97.1 pkgrel=1 pkgdesc="A CPU monitoring software with BIOS like functionalities" arch=('x86_64') url='https://github.com/cyring/CoreFreq' license=('GPL-2.0-only') depends=('dkms') source=(${pkgbase}-${pkgver}.tar.gz::"${url}/archive/${pkgver}.tar.gz" 'dkms.conf' 'honor-archlinux-compiler-flags.patch') b2sums=('9bbfd3468a6b8033c34a0c18dacd5d02c18af1b033368e69cfe492de4499b322182ae8fc15074d4f70d58387ac6d14d859e6bd698e29e6ef647336ac46be560b' 'a47306b69244b2c7cfe34a5a19aabc7d22ef8982402da038bfb65a357bed9aa0d9f30b034afa7c6dbc23969448142a0027bd14364a14da92b1c666881e15420c' 'f4299ed5c44052a521988d417410081ddb92a5f481012f9c7a964ec0dee6a63be6123cef8f8618f23be6827e25aeb3fef93f8c270aaa3076cc1f434a6d4ca861') prepare(){ cd "${_gitname}-${pkgver}" patch -Np1 < "$srcdir/honor-archlinux-compiler-flags.patch" } build() { cd "${_gitname}-${pkgver}" make prepare corefreqd corefreq-cli -j } package_corefreq-dkms() { pkgdesc="CoreFreq - kernel module sources" depends=('dkms') _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}"/{Makefile,scripter.sh} "${pkgdir}/usr/src/${pkgbase}-${pkgver}/" cp -r "${_gitname}-${pkgver}"/${CARCH} "${pkgdir}/usr/src/${pkgbase}-${pkgver}/" } package_corefreq-server() { pkgdesc="CoreFreq server" depends=("corefreq-dkms=$pkgver") cd "${_gitname}-${pkgver}" install -Dm755 build/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") cd "${_gitname}-${pkgver}" install -Dm755 build/corefreq-cli "${pkgdir}/usr/bin/corefreq-cli" }