rpms/linuxdcpp/devel linuxdcpp-1.0.2-xdg.patch, NONE, 1.1 linuxdcpp.spec, 1.7, 1.8

Marcin Garski mgarski at fedoraproject.org
Thu Sep 25 14:37:02 UTC 2008


Author: mgarski

Update of /cvs/pkgs/rpms/linuxdcpp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15166

Modified Files:
	linuxdcpp.spec 
Added Files:
	linuxdcpp-1.0.2-xdg.patch 
Log Message:
- Use XDG Downloads directory (#460749)


linuxdcpp-1.0.2-xdg.patch:

--- NEW FILE linuxdcpp-1.0.2-xdg.patch ---
diff -ur linuxdcpp-1.0.2-orig/client/SConstruct linuxdcpp-1.0.2/client/SConstruct
--- linuxdcpp-1.0.2-orig/client/SConstruct	2008-05-04 20:55:24.000000000 +0200
+++ linuxdcpp-1.0.2/client/SConstruct	2008-09-21 22:37:32.000000000 +0200
@@ -45,7 +45,10 @@
 
 Import('env')
 
+env_client = env.Clone()
+env_client.ParseConfig('pkg-config --cflags glib-2.0')
+
 # Build the client_files
-clientObjs = env.Object(client_files)
+clientObjs = env_client.Object(client_files)
 
 Return('clientObjs')
diff -ur linuxdcpp-1.0.2-orig/client/SettingsManager.cpp linuxdcpp-1.0.2/client/SettingsManager.cpp
--- linuxdcpp-1.0.2-orig/client/SettingsManager.cpp	2008-05-04 20:55:25.000000000 +0200
+++ linuxdcpp-1.0.2/client/SettingsManager.cpp	2008-09-21 22:38:17.000000000 +0200
@@ -16,6 +16,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include <glib.h>
+
 #include "stdinc.h"
 #include "DCPlusPlus.h"
 
@@ -112,7 +114,10 @@
 		int64Settings[k] = 0;
 	}
 
-	setDefault(DOWNLOAD_DIRECTORY, Util::getConfigPath() + "Downloads" PATH_SEPARATOR_STR);
+	const char* xdgDir = g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD);
+	const string downloadDir = xdgDir ? string(xdgDir) + PATH_SEPARATOR_STR : Util::getConfigPath() + "Downloads" PATH_SEPARATOR_STR;
+
+	setDefault(DOWNLOAD_DIRECTORY, downloadDir);
 	setDefault(TEMP_DOWNLOAD_DIRECTORY, Util::getConfigPath() + "Incomplete" PATH_SEPARATOR_STR);
 	setDefault(SLOTS, 1);
 	setDefault(TCP_PORT, 0);
diff -ur linuxdcpp-1.0.2-orig/SConstruct linuxdcpp-1.0.2/SConstruct
--- linuxdcpp-1.0.2-orig/SConstruct	2008-07-03 05:54:11.000000000 +0200
+++ linuxdcpp-1.0.2/SConstruct	2008-09-21 22:37:32.000000000 +0200
@@ -126,6 +126,11 @@
 		print '\tNote: You might have the lib but not the headers'
 		Exit(1)
 
+	if not conf.CheckPKG('glib-2.0 >= 2.14'):
+		print '\tglib >= 2.14 not found.'
+		print '\tNote: You might have the lib but not the headers'
+		Exit(1)
+
 	if not conf.CheckHeader('time.h'):
 		Exit(1)
 


Index: linuxdcpp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/linuxdcpp/devel/linuxdcpp.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- linuxdcpp.spec	6 Jul 2008 00:29:57 -0000	1.7
+++ linuxdcpp.spec	25 Sep 2008 14:36:32 -0000	1.8
@@ -1,6 +1,6 @@
 Name:		linuxdcpp
 Version:	1.0.2
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Direct Connect client
 
 Group:		Applications/Internet
@@ -8,9 +8,10 @@
 URL:		http://linuxdcpp.berlios.de/
 Source0:	ftp://ftp.berlios.de/pub/linuxdcpp/linuxdcpp-%{version}.tar.bz2
 Source1:	%{name}.desktop
+Patch0:		linuxdcpp-1.0.2-xdg.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires:	scons gtk2-devel >= 2.8.0 glib2-devel >= 2.4.0 pkgconfig
+BuildRequires:	scons gtk2-devel >= 2.8.0 glib2-devel >= 2.14.0 pkgconfig
 BuildRequires:	libglade2-devel >= 2.4.0 zlib-devel bzip2-devel openssl-devel
 BuildRequires:	desktop-file-utils
 
@@ -19,6 +20,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 CXXFLAGS="$RPM_OPT_FLAGS" scons %{?_smp_mflags} PREFIX="%{_prefix}"
@@ -58,6 +60,9 @@
 %{_datadir}/pixmaps/linuxdcpp.png
 
 %changelog
+* Thu Sep 25 2008 Marcin Garski <mgarski[AT]post.pl> 1.0.2-2
+- Use XDG Downloads directory (#460749)
+
 * Sun Jul 06 2008 Marcin Garski <mgarski[AT]post.pl> 1.0.2-1
 - Update to 1.0.2
 - Drop all patches (all upstream now)




More information about the fedora-extras-commits mailing list