SHA256
1
0
forked from pool/nvdock

- added nvdock-1.02-datadir.patch.in

OBS-URL: https://build.opensuse.org/package/show/hardware/nvdock?expand=0&rev=2
This commit is contained in:
Adam Mizerski 2011-05-04 06:51:39 +00:00 committed by Git OBS Bridge
parent 77d8649d57
commit a5f94fc7e5
3 changed files with 27 additions and 10 deletions

View File

@ -0,0 +1,12 @@
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-05-04 08:37:30.491419448 +0200
@@ -50,7 +50,7 @@ The NVIDIA name and Logo are property of
#define CMD_NVIDIA_VERSION "nvidia-settings -q NvidiaDriverVersion | grep Attribute | cut -d : -f 3 | cut -d ' ' -f 2"
#define CMD_WHICH_QUERY "which %s 2> /dev/null"
-#define ICON "/usr/share/pixmaps/nvdock.png"
+#define ICON "@DATADIR@/pixmaps/nvdock.png"
#define REFRESH_ICON "GTK_STOCK_REFRESH"
#define VERSION_PRINTF "nvDock v%s\nCopyright (c) 2007 Bob Majdak Jr <bob@kateos.org>\nReleased under the BSD License.\n"

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 4 06:44:48 UTC 2011 - adam@mizerski.pl
- added nvdock-1.02-datadir.patch.in
-------------------------------------------------------------------
Tue Mar 22 17:44:05 UTC 2011 - adam@mizerski.pl

View File

@ -14,7 +14,6 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: nvdock
Version: 1.02
@ -23,11 +22,13 @@ Summary: Tray icon for launching NVIDIA Settings
Group: System/X11/Utilities
License: BSD-3
URL: http://www.opsat.net/development/nvdock/
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-FEATURE-OPENSUSE nvdock-1.02-datadir.patch.in adam@mizerski.pl - allow custom datadir
Source3: %{name}-1.02-datadir.patch.in
# 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
@ -43,26 +44,25 @@ Also on the menu it will show the NVIDIA driver version, which is surely to come
%prep
%setup -q
%patch0 -p1
sed -i "s|@DATADIR@|%{_datadir}|g" %{SOURCE3} | patch -p1
%build
%__make -C src -f %{SOURCE1} %{?_smp_mflags}
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
install -m 755 -D src/nvdock %{buildroot}%{_bindir}/nvdock
install -m 644 -D data/nvdock.png %{buildroot}%{_datadir}/pixmaps/nvdock.png
install -m 644 -D %{SOURCE2} %{buildroot}%{_datadir}/applications/nvdock.desktop
%suse_update_desktop_file nvdock
%clean
%__rm -rf %{buildroot}
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_bindir}/nvdock
# path to icon is hardcoced in src/nvdock.h
/usr/share/pixmaps/nvdock.png
%{_datadir}/pixmaps/nvdock.png
%{_datadir}/applications/nvdock.desktop
%doc COPYING ChangeLog README TODO