diff options
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | dkms.conf | 18 | ||||
-rw-r--r-- | honor-archlinux-compiler-flags.patch | 113 |
4 files changed, 165 insertions, 24 deletions
@@ -1,27 +1,26 @@ pkgbase = corefreq pkgdesc = A CPU monitoring software with BIOS like functionalities - pkgver = 1.86.7 + pkgver = 1.97.1 pkgrel = 1 url = https://github.com/cyring/CoreFreq arch = x86_64 - license = GPL2 + license = GPL-2.0-only depends = dkms - source = corefreq-1.86.7.tar.gz::https://github.com/cyring/CoreFreq/archive/1.86.7.tar.gz + source = corefreq-1.97.1.tar.gz::https://github.com/cyring/CoreFreq/archive/1.97.1.tar.gz source = dkms.conf - b2sums = fa861cbf607a628eb769391986923a1a120ac4e2ca036279043303f7bfe429c0b92bf4245d90c89f151c6411d1bf9a8f7894b51f070ba72794c7dfc357003c98 - b2sums = c6d8849944f99195038ac252d010d3e3001cd1dcaee57218c4a7f58fa313aa38842e4ea991d4d9ff7d04063ebaa9900c06ff1eacfa6270341cf37fb752adc00c + source = honor-archlinux-compiler-flags.patch + b2sums = 9bbfd3468a6b8033c34a0c18dacd5d02c18af1b033368e69cfe492de4499b322182ae8fc15074d4f70d58387ac6d14d859e6bd698e29e6ef647336ac46be560b + b2sums = a47306b69244b2c7cfe34a5a19aabc7d22ef8982402da038bfb65a357bed9aa0d9f30b034afa7c6dbc23969448142a0027bd14364a14da92b1c666881e15420c + b2sums = f4299ed5c44052a521988d417410081ddb92a5f481012f9c7a964ec0dee6a63be6123cef8f8618f23be6827e25aeb3fef93f8c270aaa3076cc1f434a6d4ca861 pkgname = corefreq-client pkgdesc = CoreFreq client - depends = corefreq-server=1.86.7 - provides = corefreq-client + depends = corefreq-server=1.97.1 pkgname = corefreq-server pkgdesc = CoreFreq server - depends = corefreq-dkms=1.86.7 - provides = corefreq-server + depends = corefreq-dkms=1.97.1 pkgname = corefreq-dkms pkgdesc = CoreFreq - kernel module sources depends = dkms - provides = corefreq-dkms=1.86.7 @@ -1,30 +1,44 @@ # 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.86.7 +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=('GPL2') +license=('GPL-2.0-only') depends=('dkms') source=(${pkgbase}-${pkgver}.tar.gz::"${url}/archive/${pkgver}.tar.gz" - 'dkms.conf') -b2sums=('fa861cbf607a628eb769391986923a1a120ac4e2ca036279043303f7bfe429c0b92bf4245d90c89f151c6411d1bf9a8f7894b51f070ba72794c7dfc357003c98' - 'c6d8849944f99195038ac252d010d3e3001cd1dcaee57218c4a7f58fa313aa38842e4ea991d4d9ff7d04063ebaa9900c06ff1eacfa6270341cf37fb752adc00c') + '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 corefreqd corefreq-cli + make prepare corefreqd corefreq-cli -j } package_corefreq-dkms() { pkgdesc="CoreFreq - kernel module sources" depends=('dkms') - provides=("corefreq-dkms=$pkgver") _kernelmodule=corefreqk # Copy simple dkms.conf @@ -34,26 +48,25 @@ package_corefreq-dkms() { -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}/" + 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") - provides=('corefreq-server') cd "${_gitname}-${pkgver}" - install -Dm755 corefreqd "${pkgdir}/usr/bin/corefreqd" + 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") - provides=('corefreq-client') cd "${_gitname}-${pkgver}" - install -Dm755 corefreq-cli "${pkgdir}/usr/bin/corefreq-cli" + install -Dm755 build/corefreq-cli "${pkgdir}/usr/bin/corefreq-cli" } diff --git a/dkms.conf b/dkms.conf index 93035bad1ebe..c7fd72f9a2ca 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,7 +1,23 @@ +AUTOINSTALL="yes" 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@" +BUILT_MODULE_LOCATION[0]="build/" DEST_MODULE_LOCATION[0]="/kernel/drivers/misc" -AUTOINSTALL="yes" +# +DAEMON="\$source_tree/\$PACKAGE_NAME-\$PACKAGE_VERSION/build/corefreqd" +CLIENT="\$source_tree/\$PACKAGE_NAME-\$PACKAGE_VERSION/build/corefreq-cli" +SCRIPT="scripter.sh" +COMMAND="install -Dm 0755 -s -t /bin" +OBJECTS="\$source_tree/\$PACKAGE_NAME-\$PACKAGE_VERSION/build/*.o" +BINARIES="/bin/corefreqd /bin/corefreq-cli" +CLEANUP="rm -f" +# +POST_INSTALL="$SCRIPT $CLEANUP -- $OBJECTS" +POST_REMOVE="$SCRIPT $CLEANUP -- $BINARIES" +# +PRE_BUILD="$SCRIPT make -- prepare" +#PRE_INSTALL="$SCRIPT $COMMAND -- $DAEMON $CLIENT" + diff --git a/honor-archlinux-compiler-flags.patch b/honor-archlinux-compiler-flags.patch new file mode 100644 index 000000000000..21523dc31d46 --- /dev/null +++ b/honor-archlinux-compiler-flags.patch @@ -0,0 +1,113 @@ +diff --git a/Makefile b/Makefile +index a21614a..f38386b 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,7 +4,7 @@ + + HW = $(shell uname -m) + CC ?= cc +-WARNING = -Wall -Wfatal-errors ++WARNING = -w + SYMLINK ?= ln -s + INSTALL ?= install + DEPMOD ?= depmod +@@ -39,14 +39,18 @@ ccflags-y += -D CORE_COUNT=$(CORE_COUNT) \ + ccflags-y += $(WARNING) + + ifeq ($(OPTIM_LVL),0) +-OPTIM_FLG = -O$(OPTIM_LVL) ++CFLAGS += -O$(OPTIM_LVL) ++LDFLAGS += -O$(OPTIM_LVL) + ccflags-y += -fno-inline + else ifneq ($(OPTIM_LVL),) +-OPTIM_FLG = -O$(OPTIM_LVL) ++CFLAGS += -O$(OPTIM_LVL) ++LDFLAGS += -O$(OPTIM_LVL) + ccflags-y += -D OPTIM_LVL=$(OPTIM_LVL) +-ccflags-y += $(OPTIM_FLG) ++ccflags-y += -O$(OPTIM_LVL) + endif + ++CFLAGS += $(WARNING) ++ + DEFINITIONS = -D CORE_COUNT=$(CORE_COUNT) -D TASK_ORDER=$(TASK_ORDER) \ + -D MAX_FREQ_HZ=$(MAX_FREQ_HZ) -D UBENCH=$(UBENCH) + +@@ -193,49 +197,48 @@ clean: + fi + + $(BUILD)/corefreqm.o: $(HW)/corefreqm.c +- $(CC) $(OPTIM_FLG) $(WARNING) -pthread $(DEFINITIONS) \ +- -c $(HW)/corefreqm.c -o $(BUILD)/corefreqm.o ++ $(CC) -c $(HW)/corefreqm.c -o $(BUILD)/corefreqm.o \ ++ $(CFLAGS) $(DEFINITIONS) + + $(BUILD)/corefreqd.o: $(HW)/corefreqd.c +- $(CC) $(OPTIM_FLG) $(WARNING) -pthread $(DEFINITIONS) \ +- -c $(HW)/corefreqd.c -o $(BUILD)/corefreqd.o ++ $(CC) -c $(HW)/corefreqd.c -o $(BUILD)/corefreqd.o \ ++ $(CFLAGS) $(DEFINITIONS) -pthread + + $(BUILD)/corefreqd: $(BUILD)/corefreqd.o $(BUILD)/corefreqm.o +- $(CC) $(OPTIM_FLG) -o $(BUILD)/corefreqd \ +- $(BUILD)/corefreqd.o $(BUILD)/corefreqm.o -lpthread -lm -lrt -lc ++ $(CC) $(LDFLAGS) -o $(BUILD)/corefreqd \ ++ $(BUILD)/corefreqd.o $(BUILD)/corefreqm.o -lpthread -lm -lrt + + .PHONY: corefreqd + corefreqd: $(BUILD)/corefreqd + + $(BUILD)/corefreq-ui.o: $(HW)/corefreq-ui.c +- $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \ +- -c $(HW)/corefreq-ui.c -o $(BUILD)/corefreq-ui.o ++ $(CC) -c $(HW)/corefreq-ui.c -o $(BUILD)/corefreq-ui.o \ ++ $(CFLAGS) $(DEFINITIONS) + + $(BUILD)/corefreq-cli.o: $(HW)/corefreq-cli.c +- $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) $(LAYOUT) \ +- -c $(HW)/corefreq-cli.c -o $(BUILD)/corefreq-cli.o ++ $(CC) -c $(HW)/corefreq-cli.c -o $(BUILD)/corefreq-cli.o \ ++ $(CFLAGS) $(DEFINITIONS) $(LAYOUT) + + $(BUILD)/corefreq-cli-rsc.o: $(HW)/corefreq-cli-rsc.c +- $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) $(LAYOUT) \ +- -c $(HW)/corefreq-cli-rsc.c -o $(BUILD)/corefreq-cli-rsc.o ++ $(CC) -c $(HW)/corefreq-cli-rsc.c -o $(BUILD)/corefreq-cli-rsc.o \ ++ $(CFLAGS) $(DEFINITIONS) $(LAYOUT) + + $(BUILD)/corefreq-cli-json.o: $(HW)/corefreq-cli-json.c +- $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \ +- -c $(HW)/corefreq-cli-json.c -o $(BUILD)/corefreq-cli-json.o ++ $(CC) -c $(HW)/corefreq-cli-json.c -o $(BUILD)/corefreq-cli-json.o \ ++ $(CFLAGS) $(DEFINITIONS) + + $(BUILD)/corefreq-cli-extra.o: $(HW)/corefreq-cli-extra.c +- $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \ +- -c $(HW)/corefreq-cli-extra.c -o $(BUILD)/corefreq-cli-extra.o ++ $(CC) -c $(HW)/corefreq-cli-extra.c -o $(BUILD)/corefreq-cli-extra.o \ ++ $(CFLAGS) $(DEFINITIONS) + + $(BUILD)/corefreq-cli: $(BUILD)/corefreq-cli.o \ + $(BUILD)/corefreq-ui.o \ + $(BUILD)/corefreq-cli-rsc.o \ + $(BUILD)/corefreq-cli-json.o \ + $(BUILD)/corefreq-cli-extra.o +- $(CC) $(OPTIM_FLG) -o $(BUILD)/corefreq-cli \ +- $(BUILD)/corefreq-cli.o $(BUILD)/corefreq-ui.o \ +- $(BUILD)/corefreq-cli-rsc.o $(BUILD)/corefreq-cli-json.o \ +- $(BUILD)/corefreq-cli-extra.o -lm -lrt -lc ++ $(CC) $(LDFLAGS) -o $(BUILD)/corefreq-cli \ ++ $(BUILD)/corefreq-cli.o $(BUILD)/corefreq-ui.o $(BUILD)/corefreq-cli-rsc.o \ ++ $(BUILD)/corefreq-cli-json.o $(BUILD)/corefreq-cli-extra.o -lm -lrt -lc + + .PHONY: corefreq-cli + corefreq-cli: $(BUILD)/corefreq-cli +@@ -244,6 +247,8 @@ corefreq-cli: $(BUILD)/corefreq-cli + info: + $(info HW [$(HW)]) + $(info CC [$(shell whereis -b $(CC))]) ++ $(info CFLAGS [$(CFLAGS)]) ++ $(info LDFLAGS [$(LDFLAGS)]) + $(info WARNING [$(WARNING)]) + $(info PWD [$(PWD)]) + $(info BUILD [$(BUILD)]) |