blob: 5aea79af85949f3aff0c822ae8ae64d4b3152c2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# Maintainer: Leonidas Spyropoulos <artafinde at gmail dot com>
# Contributor: CyrIng <labs[at]cyring[dot]fr>
### 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.92.4
pkgrel=1
pkgdesc="A CPU monitoring software with BIOS like functionalities"
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'
'honor-archlinux-compiler-flags.patch')
b2sums=('b658c38551b829e734376cde9d3c92d86222d53a22c842b48b2d5bef5aea5ada9b3599fc4fe6fa72724b43b9466fbb39358459c48df4ca2add4504fac20dbf98'
'c6d8849944f99195038ac252d010d3e3001cd1dcaee57218c4a7f58fa313aa38842e4ea991d4d9ff7d04063ebaa9900c06ff1eacfa6270341cf37fb752adc00c'
'3f5f9a27863412d620864e8c19e2683e3ef2103c4b95c126438330a9b532e2434664ce4860b6191552298131e434c09f5531428696dde7d70a1cb171b4f13edf')
prepare(){
cd "${_gitname}-${pkgver}"
patch -Np1 < "$srcdir/honor-archlinux-compiler-flags.patch"
}
build() {
cd "${_gitname}-${pkgver}"
if [ -n "${_transparency}" ]; then
make corefreqd corefreq-cli UI_TRANSPARENCY=1
else
make corefreqd corefreq-cli
fi
}
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}"/{*.c,*.h,Makefile} "${pkgdir}/usr/src/${pkgbase}-${pkgver}/"
}
package_corefreq-server() {
pkgdesc="CoreFreq server"
depends=("corefreq-dkms=$pkgver")
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")
cd "${_gitname}-${pkgver}"
install -Dm755 corefreq-cli "${pkgdir}/usr/bin/corefreq-cli"
}
|