From: Robert Möker Date: Sat, 2 Apr 2011 14:18:36 +0000 (+0200) Subject: cpufrequtils: New package. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1864e714527d8d341564bed122af20db4fee1038;p=ipfire-3.x.git cpufrequtils: New package. --- diff --git a/pkgs/cpufrequtils/cpufrequtils.nm b/pkgs/cpufrequtils/cpufrequtils.nm new file mode 100644 index 000000000..c2d2d59d5 --- /dev/null +++ b/pkgs/cpufrequtils/cpufrequtils.nm @@ -0,0 +1,53 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = cpufrequtils +PKG_VER = 008 +PKG_REL = 1 + +PKG_MAINTAINER = +PKG_GROUPS = Base Applications/System +PKG_URL = http://htop.sourceforge.net/ +PKG_LICENSE = GPLv2 +PKG_SUMMARY = Command line tools to determine current CPUfreq settings and to modify them + +PKG_BUILD_DEPS+= gettext libtool sysfsutils + +define PKG_DESCRIPTION + Command line tools to determine current CPUfreq settings and to modify them +endef + +PKG_TARBALL = $(THISAPP).tar.gz + +define STAGE_BUILD + cd $(DIR_APP) && make +endef + +define STAGE_INSTALL + cd $(DIR_APP) && make install DESTDIR=$(BUILDROOT) mandir=/usr/share/man +endef + + diff --git a/pkgs/cpufrequtils/patches/cpufrequtils-008-aperf-32bit.patch b/pkgs/cpufrequtils/patches/cpufrequtils-008-aperf-32bit.patch new file mode 100644 index 000000000..ae94b0acd --- /dev/null +++ b/pkgs/cpufrequtils/patches/cpufrequtils-008-aperf-32bit.patch @@ -0,0 +1,11 @@ +--- cpufrequtils-008/utils/aperf.c 2010-07-05 17:43:17.000000000 +0200 ++++ cpufrequtils-008/utils/aperf.c.new 2011-02-07 16:34:17.421278000 +0100 +@@ -96,7 +96,7 @@ + return -1; + if (lseek(fd, idx, SEEK_CUR) == -1) + goto err; +- if (read(fd, val, sizeof val) != sizeof *val) ++ if (read(fd, val, sizeof *val) != sizeof *val) + goto err; + close(fd); + return 0; diff --git a/pkgs/cpufrequtils/patches/cpufrequtils-008-no-aperf-on-ppc.patch b/pkgs/cpufrequtils/patches/cpufrequtils-008-no-aperf-on-ppc.patch new file mode 100644 index 000000000..8bfca0109 --- /dev/null +++ b/pkgs/cpufrequtils/patches/cpufrequtils-008-no-aperf-on-ppc.patch @@ -0,0 +1,45 @@ +--- cpufrequtils-008/Makefile 2011-02-10 13:04:49.235589962 +0100 ++++ cpufrequtils-008/Makefile.new 2011-02-10 13:08:00.481589942 +0100 +@@ -118,7 +118,7 @@ + CPPFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \ + -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE + +-UTIL_SRC = utils/info.c utils/set.c utils/aperf.c utils/cpuid.h ++UTIL_SRC = utils/info.c utils/set.c + LIB_HEADERS = lib/cpufreq.h lib/interfaces.h + LIB_SRC = lib/cpufreq.c + LIB_OBJS = lib/cpufreq.o +@@ -199,7 +199,7 @@ + $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@ utils/$@.o -lcpufreq + $(QUIET) $(STRIPCMD) $@ + +-utils: cpufreq-info cpufreq-set cpufreq-aperf ++utils: cpufreq-info cpufreq-set + + po/$(PACKAGE).pot: $(UTIL_SRC) + @xgettext --default-domain=$(PACKAGE) --add-comments \ +@@ -229,7 +229,7 @@ + clean: + -find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \ + | xargs rm -f +- -rm -f cpufreq-info cpufreq-set cpufreq-aperf ++ -rm -f cpufreq-info cpufreq-set + -rm -f libcpufreq.so* + -rm -f build/ccdv + -rm -rf po/*.gmo po/*.pot +@@ -246,7 +246,6 @@ + $(INSTALL) -d $(DESTDIR)${bindir} + $(INSTALL_PROGRAM) cpufreq-set $(DESTDIR)${bindir}/cpufreq-set + $(INSTALL_PROGRAM) cpufreq-info $(DESTDIR)${bindir}/cpufreq-info +- $(INSTALL_PROGRAM) cpufreq-aperf $(DESTDIR)${bindir}/cpufreq-aperf + + install-man: + $(INSTALL_DATA) -D man/cpufreq-set.1 $(DESTDIR)${mandir}/man1/cpufreq-set.1 +@@ -270,7 +269,6 @@ + - rm -f $(DESTDIR)${includedir}/cpufreq.h + - rm -f $(DESTDIR)${bindir}/cpufreq-set + - rm -f $(DESTDIR)${bindir}/cpufreq-info +- - rm -f $(DESTDIR)${bindir}/cpufreq-aperf + - rm -f $(DESTDIR)${mandir}/man1/cpufreq-set.1 + - rm -f $(DESTDIR)${mandir}/man1/cpufreq-info.1 + - for HLANG in $(LANGUAGES); do \ diff --git a/pkgs/cpufrequtils/patches/cpufrequtils-multilib.patch b/pkgs/cpufrequtils/patches/cpufrequtils-multilib.patch new file mode 100644 index 000000000..cc4d8d24b --- /dev/null +++ b/pkgs/cpufrequtils/patches/cpufrequtils-multilib.patch @@ -0,0 +1,12 @@ +--- cpufrequtils-008/Makefile 2010-07-05 17:43:17.000000000 +0200 ++++ Makefile.multilib 2010-07-16 11:31:40.294161413 +0200 +@@ -206,6 +206,9 @@ + --keyword=_ --keyword=N_ $(UTIL_SRC) && \ + test -f $(PACKAGE).po && \ + mv -f $(PACKAGE).po po/$(PACKAGE).pot ++# Avoid multilib issues by forcing the POT creation date ++ sed -i 's/POT-Creation-Date: .*\\/Pot-Creation-Date: 2010-07-16 11:00+0200\\/' \ ++ po/${PACKAGE}.pot + + update-gmo: po/$(PACKAGE).pot + @for HLANG in $(LANGUAGES); do \ diff --git a/pkgs/cpufrequtils/patches/disable-gsic.patch b/pkgs/cpufrequtils/patches/disable-gsic.patch new file mode 100644 index 000000000..ccf059c06 --- /dev/null +++ b/pkgs/cpufrequtils/patches/disable-gsic.patch @@ -0,0 +1,11 @@ +--- cpufrequtils-0.3/debug/i386/Makefile~ 2004-12-04 15:58:54.287473296 -0500 ++++ cpufrequtils-0.3/debug/i386/Makefile 2004-12-04 15:59:08.035383296 -0500 +@@ -12,7 +12,7 @@ intel_gsic: intel_gsic.c + powernow-k8-decode: powernow-k8-decode.c + $(CC) $(CFLAGS) -o powernow-k8-decode powernow-k8-decode.c + +-all: centrino-decode dump_psb intel_gsic powernow-k8-decode ++all: centrino-decode dump_psb powernow-k8-decode + + clean: + rm -rf centrino-decode dump_psb intel_gsic powernow-k8-decode