Merge pull request #5650 from nckx/radeontop2
readeontop: build without patches & include some git bugfixes
This commit is contained in:
commit
e2edf1e01d
@ -1,39 +1,37 @@
|
|||||||
{ stdenv, fetchurl, substituteAll, pkgconfig
|
{ stdenv, fetchgit, pkgconfig, gettext, ncurses, libdrm, libpciaccess }:
|
||||||
, gettext, ncurses, libdrm, libpciaccess }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "radeontop-${version}";
|
name = "radeontop-${version}";
|
||||||
version = "0.8";
|
version = "v0.8-8-g575a416";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchgit {
|
||||||
url = "https://github.com/clbr/radeontop/archive/v${version}.tar.gz";
|
url = git://github.com/clbr/radeontop.git;
|
||||||
sha256 = "12c4kpr9zy2a21k8mck9cbfwm54x1l0i96va97m70pc9ramf2c24";
|
rev = "575a416596dbedb25bc6f3f0b16a0e2296fbb9bb";
|
||||||
|
sha256 = "6100a7159384cfcd71e59ef7096450e975d01786ee4e3a7cf9c0e56045c4ac91";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig gettext ncurses libdrm libpciaccess ];
|
buildInputs = [ pkgconfig gettext ncurses libdrm libpciaccess ];
|
||||||
|
|
||||||
patches = [
|
enableParallelBuilding = true;
|
||||||
./install-paths.patch
|
|
||||||
|
|
||||||
# The default generation of version.h expects a git clone.
|
patchPhase = ''
|
||||||
(substituteAll {
|
substituteInPlace getver.sh --replace ver=unknown ver=${version}
|
||||||
src = ./version-header.patch;
|
|
||||||
inherit version;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace radeontop.c \
|
|
||||||
--replace /usr/share/locale $out/share/locale
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = "DESTDIR=$(out)";
|
makeFlags = "PREFIX=$(out)";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Top-like tool for viewing AMD Radeon GPU utilization";
|
description = "Top-like tool for viewing AMD Radeon GPU utilization";
|
||||||
|
longDescription = ''
|
||||||
|
View GPU utilization, both for the total activity percent and individual
|
||||||
|
blocks. Supports R600 and later cards: even Southern Islands should work.
|
||||||
|
Works with both the open drivers and AMD Catalyst. Total GPU utilization
|
||||||
|
is also valid for OpenCL loads; the other blocks are only useful for GL
|
||||||
|
loads. Requires root rights or other permissions to read /dev/mem.
|
||||||
|
'';
|
||||||
homepage = https://github.com/clbr/radeontop;
|
homepage = https://github.com/clbr/radeontop;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = [ maintainers.rycee ];
|
maintainers = with maintainers; [ rycee nckx ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
diff -Nurp radeontop-0.8-orig/Makefile radeontop-0.8/Makefile
|
|
||||||
--- radeontop-0.8-orig/Makefile 2015-01-03 09:34:30.205507608 +0100
|
|
||||||
+++ radeontop-0.8/Makefile 2015-01-03 09:43:22.835174006 +0100
|
|
||||||
@@ -7,7 +7,6 @@
|
|
||||||
# nostrip disable stripping, default off
|
|
||||||
# plain apply neither -g nor -s.
|
|
||||||
|
|
||||||
-PREFIX ?= /usr
|
|
||||||
INSTALL ?= install
|
|
||||||
|
|
||||||
nls ?= 1
|
|
||||||
@@ -74,10 +73,10 @@ trans:
|
|
||||||
--package-name radeontop
|
|
||||||
|
|
||||||
install: all
|
|
||||||
- $(INSTALL) -D -m755 $(bin) $(DESTDIR)/$(PREFIX)/sbin/$(bin)
|
|
||||||
- $(INSTALL) -D -m644 radeontop.1 $(DESTDIR)/$(PREFIX)/share/man/man1/radeontop.1
|
|
||||||
+ $(INSTALL) -D -m755 $(bin) $(DESTDIR)/sbin/$(bin)
|
|
||||||
+ $(INSTALL) -D -m644 radeontop.1 $(DESTDIR)/share/man/man1/radeontop.1
|
|
||||||
ifeq ($(nls), 1)
|
|
||||||
- $(MAKE) -C translations install PREFIX=$(PREFIX)
|
|
||||||
+ $(MAKE) -C translations install DESTDIR=$(DESTDIR)
|
|
||||||
endif
|
|
||||||
|
|
||||||
man:
|
|
||||||
diff -Nurp radeontop-0.8-orig/translations/Makefile radeontop-0.8/translations/Makefile
|
|
||||||
--- radeontop-0.8-orig/translations/Makefile 2015-01-03 09:34:30.205507608 +0100
|
|
||||||
+++ radeontop-0.8/translations/Makefile 2015-01-03 09:43:40.235309691 +0100
|
|
||||||
@@ -15,6 +15,6 @@ $(obj): $(src)
|
|
||||||
$(MSGFMT) -o $@ $<
|
|
||||||
|
|
||||||
%.inst: %.mo
|
|
||||||
- $(INSTALL) -D -m 644 $< $(DESTDIR)/$(PREFIX)/share/locale/$*/LC_MESSAGES/radeontop.mo
|
|
||||||
+ $(INSTALL) -D -m 644 $< $(DESTDIR)/share/locale/$*/LC_MESSAGES/radeontop.mo
|
|
||||||
|
|
||||||
install: all $(inst)
|
|
@ -1,21 +0,0 @@
|
|||||||
diff -Nurp radeontop-0.8-orig/include/version.h radeontop-0.8/include/version.h
|
|
||||||
--- radeontop-0.8-orig/include/version.h 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ radeontop-0.8/include/version.h 2015-01-03 09:34:58.114335049 +0100
|
|
||||||
@@ -0,0 +1,6 @@
|
|
||||||
+#ifndef VER_H
|
|
||||||
+#define VER_H
|
|
||||||
+
|
|
||||||
+#define VERSION "@version@"
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
diff -Nurp radeontop-0.8-orig/Makefile radeontop-0.8/Makefile
|
|
||||||
--- radeontop-0.8-orig/Makefile 2015-01-03 09:34:30.205507608 +0100
|
|
||||||
+++ radeontop-0.8/Makefile 2015-01-03 09:38:36.765881422 +0100
|
|
||||||
@@ -67,7 +67,6 @@ clean:
|
|
||||||
.git:
|
|
||||||
|
|
||||||
$(verh): .git
|
|
||||||
- ./getver.sh
|
|
||||||
|
|
||||||
trans:
|
|
||||||
xgettext -o translations/radeontop.pot -k_ *.c \
|
|
Loading…
x
Reference in New Issue
Block a user