diff --git a/nvdock-1.02-datadir.patch.in b/nvdock-1.02-datadir.patch.in new file mode 100644 index 0000000..1a1e5e5 --- /dev/null +++ b/nvdock-1.02-datadir.patch.in @@ -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 \nReleased under the BSD License.\n" + diff --git a/nvdock.changes b/nvdock.changes index afe2d65..58fa89d 100644 --- a/nvdock.changes +++ b/nvdock.changes @@ -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 diff --git a/nvdock.spec b/nvdock.spec index 3dd27d6..b137f1b 100644 --- a/nvdock.spec +++ b/nvdock.spec @@ -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