Accepting request 67666 from openSUSE:Factory:Contrib

please add nvdock to hardware

OBS-URL: https://build.opensuse.org/request/show/67666
OBS-URL: https://build.opensuse.org/package/show/hardware/nvdock?expand=0&rev=1
This commit is contained in:
Ismail Dönmez 2011-04-29 15:52:00 +00:00 committed by Git OBS Bridge
commit 77d8649d57
8 changed files with 188 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

7
Makefile Normal file
View File

@ -0,0 +1,7 @@
CC = gcc
CFLAGS = $(shell pkg-config --cflags gtk+-2.0) ${RPM_OPT_FLAGS}
LDLIBS = $(shell pkg-config --libs gtk+-2.0)
all: nvdock
nvdock: nvdock.o icon.o util.o

70
nvdock-1.02-argptr.patch Normal file
View File

@ -0,0 +1,70 @@
diff -rupN nvdock-1.02/src/nvdock.c nvdock-1.02_mod/src/nvdock.c
--- nvdock-1.02/src/nvdock.c 2007-10-19 12:05:06.000000000 +0200
+++ nvdock-1.02_mod/src/nvdock.c 2011-03-22 18:17:01.478213919 +0100
@@ -40,7 +40,7 @@ bob_main_quit(void) {
return;
}
-int main(int argc, char *argv) {
+int main(int argc, char **argv) {
if(!exists_application("cut") || !exists_application("grep")) {
puts("error: make sure `cut` and `grep` are installed.");
@@ -59,7 +59,7 @@ int main(int argc, char *argv) {
unsigned int pid = 0;
- arg = (argstruct *)argc_argv_parse(argc,argv);
+ argc_argv_parse(argc,argv);
//. more preliminary checks.
arg->has_nvclock = exists_application("nvclock");
diff -rupN nvdock-1.02/src/nvdock.h nvdock-1.02_mod/src/nvdock.h
--- nvdock-1.02/src/nvdock.h 2007-10-19 12:07:19.000000000 +0200
+++ nvdock-1.02_mod/src/nvdock.h 2011-03-23 00:38:31.472213662 +0100
@@ -79,13 +79,15 @@ typedef struct _argc_argv {
gboolean has_nvclock:1;
gboolean has_nvclock_gtk:1;
- unsigned char nvversion[32];
+ char nvversion[32];
} argstruct;
argstruct *arg;
BobStatusIcon *bsi;
+void argc_argv_parse(int argc, char **argv);
+
gboolean exists_application(const char *);
gboolean exists_icon_file(const char *);
diff -rupN nvdock-1.02/src/util.c nvdock-1.02_mod/src/util.c
--- nvdock-1.02/src/util.c 2007-11-24 12:17:51.000000000 +0100
+++ nvdock-1.02_mod/src/util.c 2011-03-22 18:17:22.350213797 +0100
@@ -33,14 +33,14 @@ The NVIDIA name and Logo are property of
#include "nvdock.h"
-argstruct *
+void
argc_argv_parse(int argc, char **argv) {
//. this function requires the typedef struct _argc_argv, which has been
//. placed in nvdock.h for this application.
int a = 1;
- argstruct *arg = (argstruct *)malloc(sizeof(argstruct));
+ arg = (argstruct *)malloc(sizeof(argstruct));
arg->version = 0;
arg->help = 0;
@@ -78,8 +78,6 @@ argc_argv_parse(int argc, char **argv) {
++a;
}
-
- return arg;
}
int

3
nvdock-1.02.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fe37d3c2386475b68c4de28c8672f0e8e0c03cdb4e1e054211c7029b086ca72d
size 11881

5
nvdock.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Tue Mar 22 17:44:05 UTC 2011 - adam@mizerski.pl
- new package

10
nvdock.desktop Normal file
View File

@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=NVIDIA Dock
GenericName=Tray dock
Comment=Tray icon launcher for NVIDIA settings
Exec=nvdock
Icon=nvdock
Categories=TrayIcon;
OnlyShowIn=GNOME;KDE;XFCE;LXDE;

69
nvdock.spec Normal file
View File

@ -0,0 +1,69 @@
#
# spec file for package nvdock
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: nvdock
Version: 1.02
Release: 1
Summary: Tray icon for launching NVIDIA Settings
Group: System/X11/Utilities
License: BSD-3
URL: http://www.opsat.net/development/nvdock/
Source0: http://bobmajdakjr.googlecode.com/files/%{name}-%{version}.tar.bz2
# The provided Makefile sucks, so I did this one. -- adam@mizerski.pl
Source1: Makefile
Source2: %{name}.desktop
# PATCH-FIX-UPSTREAM nvdock-1.02-argptr.patch adam@mizerski.pl - Get rid of "warning: cast to pointer from integer of different size"
Patch0: %{name}-1.02-argptr.patch
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: update-desktop-files
%description
Little NVIDIA tray icon.
Hover over it and it will tell you your GPU temperature if your card is into that kind of thing.
A double click will launch the NVIDIA settings control panel, and right click will bring up a nifty menu with a few options.
Also on the menu it will show the NVIDIA driver version, which is surely to come in handy at least one time in your life.
%prep
%setup -q
%patch0 -p1
%build
%__make -C src -f %{SOURCE1} %{?_smp_mflags}
%install
%__install -m 755 -D src/nvdock %buildroot%{_bindir}/nvdock
# path to icon is hardcoced in src/nvdock.h
%__install -m 644 -D data/nvdock.png %buildroot/usr/share/pixmaps/nvdock.png
%__install -m 644 -D %{SOURCE2} %buildroot%{_datadir}/applications/nvdock.desktop
%suse_update_desktop_file nvdock
%clean
%__rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_bindir}/nvdock
# path to icon is hardcoced in src/nvdock.h
/usr/share/pixmaps/nvdock.png
%{_datadir}/applications/nvdock.desktop
%doc COPYING ChangeLog README TODO
%changelog