From f17459996bc002a4bcba2986cfd3495a3c250ae6 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 14 May 2007 01:31:27 +0000 Subject: [PATCH] Initial import. --- .cvsignore | 1 + powertop-1.0-makefile-fixes.patch | 21 +++++++++++++++ powertop.spec | 43 +++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 66 insertions(+) create mode 100644 powertop-1.0-makefile-fixes.patch create mode 100644 powertop.spec diff --git a/.cvsignore b/.cvsignore index e69de29..169a8e4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +powertop-1.0.tar.gz diff --git a/powertop-1.0-makefile-fixes.patch b/powertop-1.0-makefile-fixes.patch new file mode 100644 index 0000000..71679b3 --- /dev/null +++ b/powertop-1.0-makefile-fixes.patch @@ -0,0 +1,21 @@ +--- powertop/Makefile.destdir 2007-05-11 15:27:34.000000000 -0400 ++++ powertop/Makefile 2007-05-11 20:04:46.000000000 -0400 +@@ -1,11 +1,14 @@ + BINDIR=/usr/bin + ++CFLAGS ?= -Wall -W -O1 -g ++ + powertop: powertop.c config.c Makefile +- gcc -Wall -W -O1 -g powertop.c config.c -o powertop ++ gcc $(CFLAGS) powertop.c config.c -o powertop + + install: powertop +- cp powertop ${BINDIR} ++ mkdir -p ${DESTDIR}${BINDIR} ++ cp powertop ${DESTDIR}${BINDIR} + + clean: + rm -f *~ powertop +- +\ No newline at end of file ++ diff --git a/powertop.spec b/powertop.spec new file mode 100644 index 0000000..9b03b0f --- /dev/null +++ b/powertop.spec @@ -0,0 +1,43 @@ +Name: powertop +Version: 1.0 +Release: 1%{?dist} +Summary: Power consumption monitor + +Group: Applications/System +License: GPL +URL: http://www.linuxpowertop.org/ +Source0: http://www.linuxpowertop.org/download/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Patch0: powertop-1.0-makefile-fixes.patch + +#BuildRequires: +#Requires: + +%description +PowerTOP is a tool that finds the software component(s) that make your +computer use more power than necessary while it is idle. + +%prep +%setup -q -n %{name} +%patch -p1 -b .build-fixes + +%build +export CFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc COPYING +%{_bindir}/powertop + +%changelog +* Fri May 11 2007 Adam Jackson 1.0-1 +- Initial revision. diff --git a/sources b/sources index e69de29..13d0c98 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c2f64f27cc3f6cb90fa40c2c40c025e5 powertop-1.0.tar.gz