rpms/freenx-client/devel freenx-client-0.9-fixes.patch, 1.1, 1.2 freenx-client.spec, 1.3, 1.4

athimm athimm at fedoraproject.org
Sat Jul 25 22:30:22 UTC 2009


Author: athimm

Update of /cvs/extras/rpms/freenx-client/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9774/freenx-client/devel

Modified Files:
	freenx-client-0.9-fixes.patch freenx-client.spec 
Log Message:
- Split package into several subpackages.
- Add some patches from CentOS (multiple-id-key & mode 0660 for key).
- Use some patches from up to svn 545 (dated 2008-07-10).


freenx-client-0.9-fixes.patch:
 nxcl/configure.ac        |    2 
 nxcl/doc/Makefile.am     |    2 
 nxcl/lib/notQt.cpp       |   26 ++++++++++-
 nxcl/lib/notQt.h         |   17 +++++++
 nxcl/lib/nxclientlib.cpp |  109 +++++++++++++++++++++++++++++++++++++++++------
 nxcl/lib/nxsession.cpp   |   13 +++++
 nxcl/nxcl/nxcl.cpp       |    2 
 qtnx/qtnx.pro            |    4 +
 qtnx/qtnxwindow.cpp      |    6 +-
 9 files changed, 160 insertions(+), 21 deletions(-)

Index: freenx-client-0.9-fixes.patch
===================================================================
RCS file: /cvs/extras/rpms/freenx-client/devel/freenx-client-0.9-fixes.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- freenx-client-0.9-fixes.patch	23 Apr 2008 16:57:39 -0000	1.1
+++ freenx-client-0.9-fixes.patch	25 Jul 2009 22:30:22 -0000	1.2
@@ -1,5 +1,30 @@
---- freenx-client-0.9/nxcl/lib/notQt.cpp~	2008-03-11 00:13:08.000000000 +0100
-+++ freenx-client-0.9/nxcl/lib/notQt.cpp	2008-04-05 20:36:05.000000000 +0200
+diff -Naur freenx-client-0.9/nxcl/configure.ac freenx-client.svn545.plusfixes/nxcl/configure.ac
+--- freenx-client-0.9/nxcl/configure.ac	2008-03-11 00:13:08.000000000 +0100
++++ freenx-client.svn545.plusfixes/nxcl/configure.ac	2008-07-10 10:01:24.000000000 +0200
+@@ -5,7 +5,7 @@
+ AC_REVISION([$Revision$])
+ AC_PREFIX_DEFAULT(/usr/local)
+ 
+-AM_INIT_AUTOMAKE([1.10 foreign])
++AM_INIT_AUTOMAKE([1.9 foreign])
+ 
+ AM_CONFIG_HEADER(config.h)
+ AM_MAINTAINER_MODE
+diff -Naur freenx-client-0.9/nxcl/doc/Makefile.am freenx-client.svn545.plusfixes/nxcl/doc/Makefile.am
+--- freenx-client-0.9/nxcl/doc/Makefile.am	2008-03-11 00:13:08.000000000 +0100
++++ freenx-client.svn545.plusfixes/nxcl/doc/Makefile.am	2008-07-10 10:01:24.000000000 +0200
+@@ -2,8 +2,6 @@
+ 
+ DOXYFILE = Doxyfile
+ 
+-docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION)
+-
+ EXTRA_DIST = html
+ 
+ SEDCMD1 = s/$$title/GNU nxcl documentation version $(VERSION)/g
+diff -Naur freenx-client-0.9/nxcl/lib/notQt.cpp freenx-client.svn545.plusfixes/nxcl/lib/notQt.cpp
+--- freenx-client-0.9/nxcl/lib/notQt.cpp	2008-03-11 00:13:08.000000000 +0100
++++ freenx-client.svn545.plusfixes/nxcl/lib/notQt.cpp	2009-07-25 17:07:36.000000000 +0200
 @@ -19,6 +19,7 @@
  
  #include <iostream>
@@ -8,28 +33,396 @@
  extern "C" {
  #include <unistd.h>
  #include <errno.h>
---- freenx-client-0.9/nxcl/lib/nxclientlib.cpp~	2008-03-11 00:13:08.000000000 +0100
-+++ freenx-client-0.9/nxcl/lib/nxclientlib.cpp	2008-04-05 20:54:18.000000000 +0200
-@@ -27,6 +27,7 @@
+@@ -26,8 +27,10 @@
+ #include <sys/wait.h>
+ #include <sys/stat.h>
+ #include <sys/poll.h>	
++#include <sys/socket.h>	
+ #include <signal.h>
+ }
++#include <stdlib.h>
+ 
  #include "../config.h"
+ #include "notQt.h"
+@@ -52,7 +55,8 @@
+     progName("unknown"),
+     error (NOTQPROCNOERROR),
+     pid(0),
+-    signalledStart(false)
++    signalledStart(false),
++    parentFD(-1)
+ {
+     // Set up the polling structs
+     this->p = static_cast<struct pollfd*>(malloc (2*sizeof (struct pollfd)));	
+@@ -62,6 +66,15 @@
+ notQProcess::~notQProcess ()
+ {
+     free (this->p);
++    if (parentFD != -1)
++    {
++    	close(parentFD);
++	parentFD=-1;
++    }
++    // FIXME: this should be closed here
++   // close (parentToChild[READING_END]);
++   // close (childToParent[WRITING_END]);
++   // close (childErrToParent[WRITING_END]);
+ }
  
- #include <fstream>
-+#include <cstdlib>
+     void
+@@ -84,10 +97,18 @@
+     // NB: The first item in the args list should be the program name.
+     this->progName = program;
  
- extern "C" {
-     #include <errno.h>
---- freenx-client-0.9/nxcl/lib/nxclientlib.cpp~	2008-04-05 20:54:18.000000000 +0200
-+++ freenx-client-0.9/nxcl/lib/nxclientlib.cpp	2008-04-06 06:37:37.000000000 +0200
-@@ -28,6 +28,7 @@
++#ifdef NXCL_USE_NXSSH
+     // Set up our pipes
+     if (pipe(parentToChild) == -1 || pipe(childToParent) == -1 || pipe(childErrToParent) == -1) {
+         return NOTQTPROCESS_FAILURE;
+     }
++#else /* We need a socketpair for that to work */
++    if (socketpair(AF_UNIX, SOCK_STREAM, 0, parentToChild) == -1 || pipe(childErrToParent) == -1)
++        return NOTQTPROCESS_FAILURE;
++    
++    childToParent[READING_END]=dup(parentToChild[WRITING_END]);
++    childToParent[WRITING_END]=dup(parentToChild[READING_END]);
++#endif
+ 
+     this->pid = fork();
+ 
+@@ -339,6 +360,9 @@
+     fn << "/tmp/notQt" << time(NULL);
+     this->theFileName = fn.str();
+     this->f.open (this->theFileName.c_str(), ios::in|ios::out|ios::trunc);
++    if (chmod(this->theFileName.c_str(), S_IRUSR | S_IWUSR) == -1) {
++        perror("chmod");
++    }
+ }
+ 
+     void
+diff -Naur freenx-client-0.9/nxcl/lib/notQt.h freenx-client.svn545.plusfixes/nxcl/lib/notQt.h
+--- freenx-client-0.9/nxcl/lib/notQt.h	2008-03-11 00:13:08.000000000 +0100
++++ freenx-client.svn545.plusfixes/nxcl/lib/notQt.h	2008-03-12 04:40:04.000000000 +0100
+@@ -117,6 +117,18 @@
+ 		pid_t getPid (void) { return this->pid; }
+ 		int getError (void) { return this->error; }
+ 		void setError (int e) { this->error = e; }
++		
++		int getParentFD() 
++		{ 
++			this->parentFD = this->parentToChild[1];
++			close(this->childToParent[0]);
++
++			// Create new pipes
++			pipe(this->parentToChild);
++			pipe(this->childToParent);
++
++			return this->parentFD;
++		}
+ 
+ 		/*!
+ 		 * Setter for the callbacks.
+@@ -180,6 +192,11 @@
+ 		 * Pointer to a callback object
+ 		 */
+ 		notQProcessCallbacks * callbacks;
++
++		/*! 
++		 * old parent FD for comm with child
++		 */
++		int parentFD;
+ 	};
+ 
+ 	/*!
+diff -Naur freenx-client-0.9/nxcl/lib/nxclientlib.cpp freenx-client.svn545.plusfixes/nxcl/lib/nxclientlib.cpp
+--- freenx-client-0.9/nxcl/lib/nxclientlib.cpp	2008-03-11 00:13:08.000000000 +0100
++++ freenx-client.svn545.plusfixes/nxcl/lib/nxclientlib.cpp	2009-07-25 16:59:24.000000000 +0200
+@@ -8,7 +8,8 @@
+                          :     Author: Sebastian James
+                          : (C) 2008 Defuturo Ltd
+                          :     Author: George Wright
+-    email                : seb at esfnet.co.uk, gwright at kde.org
++                         : (C) 2008 Fabian Franz
++    email                : seb at esfnet.co.uk, gwright at kde.org, freenx at fabian-franz.de
+  ***************************************************************************/
+ 
+ /***************************************************************************
+@@ -27,6 +28,16 @@
+ #include "../config.h"
  
  #include <fstream>
- #include <cstdlib>
++#include <cstdlib>
 +#include <cstring>
++
++// Define to use nxssh
++#if defined(NXCL_CYGWIN) || defined(NXCL_DARWIN)
++
++// FF-FIXME That does not work.
++//#define NXCL_USE_NXSSH 1
++
++#endif
  
  extern "C" {
      #include <errno.h>
---- freenx-client-0.9/nxcl/nxcl/nxcl.cpp~	2008-03-11 00:13:08.000000000 +0100
-+++ freenx-client-0.9/nxcl/nxcl/nxcl.cpp	2008-04-06 06:48:34.000000000 +0200
+@@ -34,6 +45,8 @@
+     #include <sys/stat.h>
+     #include <unistd.h>
+ }
++#include <stdlib.h>
++#include <string.h>
+ 
+ /*
+  * On the location of nxproxy and nxssh binaries
+@@ -186,10 +199,14 @@
+ 
+     // Start to build the arguments for the nxssh command.
+     // notQProcess requires that argv[0] contains the program name
++#ifdef NXCL_USE_NXSSH
+     arguments.push_back ("nxssh");
+ 
+     argtmp << "-nx";
+     arguments.push_back (argtmp.str());
++#else
++    arguments.push_back ("ssh");
++#endif
+ 
+     argtmp.str("");
+     argtmp << "-p" << port;
+@@ -215,6 +232,7 @@
+     }
+ 
+     argtmp.str("");
++    // FF-FIXME: Perhaps the user wants to login as user directly
+     argtmp << "nx@" << serverHost;
+     arguments.push_back (argtmp.str());
+ 
+@@ -227,9 +245,13 @@
+     arguments.push_back ("-oRSAAuthentication no");
+     arguments.push_back ("-oRhostsRSAAuthentication no");
+     arguments.push_back ("-oPubkeyAuthentication yes");
++    // FF-FIXME: Perhaps the user wants to login as user directly
++    //arguments.push_back ("-c nxserver");
+ 
+     if (encryption == true) {
++#ifdef NXCL_USE_NXSSH
+         arguments.push_back("-B");
++#endif
+         session.setEncryption (true);
+     } else {
+         session.setEncryption (false);
+@@ -240,10 +262,16 @@
+     // nxssh -E gives this message when called:
+     // NX> 285 Enabling skip of SSH config files
+     // ...so there you have the meaning.
++#ifdef NXCL_USE_NXSSH
+     arguments.push_back ("-E");
++#endif
+ 
+     // Find a path for the nxssh process using getPath()
++#ifdef NXCL_USE_NXSSH
+     string nxsshPath = this->getPath ("nxssh");
++#else
++    string nxsshPath = this->getPath ("ssh");
++#endif
+ 
+     this->nxsshProcess->start(nxsshPath, arguments);
+ 
+@@ -365,8 +393,9 @@
+ 
+         // On some connections this is sent via stdout instead of stderr?
+         if (proxyData.encrypted && readyForProxy &&
+-                ((*msgiter).find("NX> 999 Bye")!=string::npos)) {
+-
++                ((*msgiter).find("NX> 999 Bye")!=string::npos)) 
++#ifdef NXCL_USE_NXSSH
++	{
+             // This is "NX> 299 Switching connection to: " in
+             // version 1.5.0. This was changed in nxssh version
+             // 2.0.0-8 (see the nxssh CHANGELOG).
+@@ -388,6 +417,11 @@
+             this->externalCallbacks->connectedSuccessfullySignal();
+             this->sessionRunning = true;
+         }
++#else /* don't use nxssh, start nxproxy -stdin */
++	{
++		invokeProxy();
++	}
++#endif
+ 
+         if ((*msgiter).find("Password") != string::npos) {
+             this->externalCallbacks->write
+@@ -402,6 +436,9 @@
+                 dbgln ("NXClientLib::processParseStdout: Got auth failed"
+                         " or capacity reached, calling this->parseSSH.");
+                 msg = this->parseSSH (*msgiter);
++#ifndef NXCL_USE_NXSSH
++		this->isFinished = true;
++#endif
+             }
+             if (msg.size() > 0) {
+                 this->write (msg);
+@@ -436,7 +473,9 @@
+                 + (*msgiter) + "'(end msg)");
+ 
+         if (proxyData.encrypted && readyForProxy &&
+-                ((*msgiter).find("NX> 999 Bye") != string::npos)) {
++                ((*msgiter).find("NX> 999 Bye") != string::npos)) 
++#ifdef NXCL_USE_NXSSH
++	{
+ 
+             string switchCommand = "NX> 299 Switch connection to: ";
+             stringstream ss;
+@@ -478,6 +517,11 @@
+                  _("SSH host key verification failed"));
+             this->isFinished = true;
+         }
++#else /* don't use nxssh, use nxproxy -stdin */
++	{
++		invokeProxy();
++	}
++#endif
+     }
+ }
+ 
+@@ -580,21 +624,41 @@
+         this->externalCallbacks->serverCapacitySignal();
+         this->isFinished = true;
+ 
+-    } else if
++    } 
++#ifdef NXCL_USE_NXSSH
++    else if
+         (message.find ("NX> 204 Authentication failed.") != string::npos) {
+ 
+         this->externalCallbacks->write
+             (204, _("NX SSH Authentication Failed, finishing"));
+         this->isFinished = true;
+     }
++#endif
+ 
+     if (message.find("NX> 710 Session status: running") != string::npos) {
+ 
+         this->externalCallbacks->write
+             (710, _("Session status is \"running\""));
++    }
++
++    // FF-FIXME: This is technically incorrect as the proxy is just ready once 1002 and 1006 have 
++    // been sent.
++    if (message.find("NX> 710 Session status: running") != string::npos) {
++        
++	//this->externalCallbacks->write
++        //    (1006, _("Session status is \"running\""));
++
++#ifdef NXCL_USE_NXSSH
+         invokeProxy();
++#else
++	if (!proxyData.encrypted)
++        	invokeProxy();
++#endif
+         session.wipeSessions();
+-        rMessage = "bye\n";
++        if (proxyData.encrypted)
++	        rMessage = "bye\n";
++	else
++	        rMessage = "quit\n";
+     }
+ 
+     return rMessage;
+@@ -700,18 +764,24 @@
+     stringstream data;
+  
+     if (proxyData.encrypted) {
++#ifdef NXCL_USE_NXSSH
+         data << "nx/nx" << x11Display << ",session=session,encryption=1,cookie="
+             << proxyData.cookie
+             << ",id=" << proxyData.id << ",listen=" 
+             << proxyData.port << ":" << proxyData.display << "\n";
+         // may also need shmem=1,shpix=1,font=1,product=...
++#else
++	data << "nx/nx" << x11Display << ",session=session,encryption=1,cookie="
++            << proxyData.cookie
++            << ",id=" << proxyData.id << ":" << proxyData.display << "\n";
++#endif
+ 
+     } else {
+-        // Not tested yet
++        // Not tested yet, FF-FIXME: Test
+         data << "nx/nx" << x11Display << ",session=session,cookie=" << proxyData.cookie
+-            << ",id=" << proxyData.id
+-            // << ",connect=" << proxyData.server << ":" << proxyData.display
+-            << ",listen=" << proxyData.port << ":" << proxyData.display
++            << ",connect=" << proxyData.server << ":" << proxyData.port
++            << ",id=" << proxyData.id << ":" << proxyData.display
++            //<< ",listen=" << proxyData.port << ":" << proxyData.display
+             << "\n";
+     }
+ 
+@@ -726,10 +796,23 @@
+     list<string> arguments;
+     arguments.push_back("nxproxy"); // argv[0] has to be the program name
+     arguments.push_back("-S");
++
+     ss.str("");
+-    ss << "options=" << nxdir;
+-    ss << ":" << proxyData.display;
+-    arguments.push_back(ss.str());	
++    ss << "nx/nx,options=" << nxdir << ":" << proxyData.display;
++
++    setenv("NX_DISPLAY", ss.str().c_str(), 1);
++
++#ifndef NXCL_USE_NXSSH
++    if (proxyData.encrypted)
++    {
++    	ss.str("");
++    	ss << this->nxsshProcess->getParentFD();
++	fprintf(stderr, "NX_COMMFD=%d", this->nxsshProcess->getParentFD());
++    	setenv("NX_COMMFD", ss.str().c_str(), 1);
++	// FF-FIXME: need to wait for 2 secs due to race condition with "bye" in buffer
++	sleep(2);
++    }
++#endif
+ 
+     // Find a path for the nxproxy process using getPath()
+     string nxproxyPath = this->getPath ("nxproxy");
+diff -Naur freenx-client-0.9/nxcl/lib/nxsession.cpp freenx-client.svn545.plusfixes/nxcl/lib/nxsession.cpp
+--- freenx-client-0.9/nxcl/lib/nxsession.cpp	2008-03-11 00:13:08.000000000 +0100
++++ freenx-client.svn545.plusfixes/nxcl/lib/nxsession.cpp	2008-03-12 04:40:04.000000000 +0100
+@@ -69,6 +69,7 @@
+     int response = parseResponse (message);
+     string returnMessage;
+ 
++#ifdef NXCL_USE_NXSSH
+     if (response == 211) {
+         if (doSSH == true) {
+             returnMessage = "yes";
+@@ -80,6 +81,7 @@
+     if (response == 204) { // Authentication failed
+         returnMessage = "204";
+     }
++#endif
+ 
+     if (response == 147) { // Server capacity reached
+         returnMessage = "147";
+@@ -90,6 +92,17 @@
+         case HELLO_NXCLIENT:
+             dbgln ("HELLO_NXCLIENT stage");
+ 
++	    if (message.find("Are you sure you want to continue connecting (yes/no)?") != string::npos)
++            	returnMessage = "yes"; // FF-FIXME: Or 211?
++	    
++	    if (message.find("assword") != string::npos)
++            	returnMessage = nxPassword; // FF-FIXME: -> What to do? What to do?
++	    
++	    if (message.find("Permission denied") != string::npos || 
++	            message.find("su: Authentication failure") != string::npos || 
++		    message.find("Unknown id:") != string::npos)
++                returnMessage = "204"; // Authentication failed
++
+             if (message.find("HELLO NXSERVER - Version") != string::npos) {
+                 this->callbacks->authenticatedSignal();
+                 returnMessage = "hello NXCLIENT - Version ";
+diff -Naur freenx-client-0.9/nxcl/nxcl/nxcl.cpp freenx-client.svn545.plusfixes/nxcl/nxcl/nxcl.cpp
+--- freenx-client-0.9/nxcl/nxcl/nxcl.cpp	2008-03-11 00:13:08.000000000 +0100
++++ freenx-client.svn545.plusfixes/nxcl/nxcl/nxcl.cpp	2009-07-25 16:59:24.000000000 +0200
 @@ -20,6 +20,7 @@
  #include "nxclientlib_i18n.h"
  #include "nxclientlib.h"
@@ -38,3 +431,52 @@
  
  #include "nxcl.h"
  
+@@ -30,6 +31,7 @@
+ #include <dbus/dbus.h>
+ #include <X11/Xlib.h>
+ }
++#include <stdlib.h>
+ 
+ using namespace nxcl;
+ using namespace std;
+diff -Naur freenx-client-0.9/qtnx/qtnx.pro freenx-client.svn545.plusfixes/qtnx/qtnx.pro
+--- freenx-client-0.9/qtnx/qtnx.pro	2008-03-11 00:13:09.000000000 +0100
++++ freenx-client.svn545.plusfixes/qtnx/qtnx.pro	2008-07-10 10:01:24.000000000 +0200
+@@ -24,6 +24,8 @@
+ DEPENDPATH	+= $(QTDIR)/include
+ 
+ 
+-QT += ui xml
++QT += gui xml
+ 
+ TARGET		= qtnx
++target.path = $$[QT_INSTALL_BINS]
++INSTALLS += target
+diff -Naur freenx-client-0.9/qtnx/qtnxwindow.cpp freenx-client.svn545.plusfixes/qtnx/qtnxwindow.cpp
+--- freenx-client-0.9/qtnx/qtnxwindow.cpp	2008-03-11 00:13:09.000000000 +0100
++++ freenx-client.svn545.plusfixes/qtnx/qtnxwindow.cpp	2009-07-25 17:07:19.000000000 +0200
+@@ -274,7 +274,8 @@
+         key = config.key;
+         session.key = "supplied";
+     } else
+-        session.key = "default";
++        session.key = "id.key";
++	
+ 
+     if (config.sessionType == "unix-application")
+         session.customCommand = config.customCommand;
+@@ -290,13 +291,12 @@
+ 
+     m_NXClient->setDepth(getDepth());
+ 
+-    QString keyPath = "id.key";
+ 
+ #ifdef Q_WS_MAC
+     keyPath = binaryPath + "/id.key";
+ #endif
+ 
+-    m_NXClient->invokeNXSSH(keyPath.toStdString(), config.serverHost, config.encryption, "",
++    m_NXClient->invokeNXSSH(session.key, config.serverHost, config.encryption, config.key,
+             config.serverPort);
+ 
+     processProbe->start(30);


Index: freenx-client.spec
===================================================================
RCS file: /cvs/extras/rpms/freenx-client/devel/freenx-client.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- freenx-client.spec	24 Jul 2009 23:10:31 -0000	1.3
+++ freenx-client.spec	25 Jul 2009 22:30:22 -0000	1.4
@@ -1,7 +1,7 @@
 Summary: Free client libraries and binaries for the NX protocol
 Name: freenx-client
 Version: 0.9
-Release: 9%{?dist}
+Release: 10%{?dist}
 License: GPLv2+
 Group: Applications/Internet
 URL: http://freenx.berlios.de/
@@ -16,12 +16,9 @@ BuildRequires: gcc-c++
 #Requires: nxssh, nxproxy
 BuildRequires: dbus-devel
 BuildRequires: doxygen
-BuildRequires: qt-devel
+BuildRequires: qt4-devel
 BuildRequires: desktop-file-utils
-# Maybe this could be split later
-Provides: nxcl = %{version}-%{release}
-#Provides: nxcl-devel = %{version}-%{release}
-Provides: qtnx = %{version}-%{release}
+Requires: nxcl, qtnx
 
 %description
 NX is an exciting new technology for remote display. It provides near
@@ -31,6 +28,39 @@ bandwidth links.
 FreeNX-client contains client libraries and executables for connecting
 to an NX server.
 
+%package -n nxcl
+Summary: A library for building NX clients
+Group: Applications/Internet
+
+%description -n nxcl
+Based on nxclientlib by George Wright, but with all dependencies on Qt
+removed and the Qt build system replaced with GNU autotools.
+
+A binary, called nxcl - the "nxcl dbus daemon" links to libnxcl and
+can negotiate an nx connection.
+
+%package -n nxcl-devel
+Summary: Development files for building against the nxcl package
+Group: Development/Libraries
+Requires: nxcl, pkgconfig
+
+%description -n nxcl-devel
+This package provides the files necessary for development against
+nxcl. Use this package if you need to build a package depending on
+nxcl at build time, or if you want to do your own development
+against nxcl.
+
+
+%package -n qtnx
+Summary: A Qt-based NX client linking to nxcl
+Group: System Environment/Libraries
+Requires: %{_bindir}/nxssh, %{_bindir}/nxproxy
+
+%description -n qtnx
+This is an update of the experimental QtNX client which was based on the
+now deprecated NXClientLib backend library. This is an experimental port
+to Seb James' nxcl library.
+
 %prep
 %setup -q
 %patch0 -p1 -b .fixes
@@ -38,8 +68,6 @@ cat >> qtnx/qtnx.pro << EOF
 QMAKE_CXXFLAGS += -I`pwd`/nxcl/lib
 LIBS += -L`pwd`/nxcl/lib -lnxcl
 EOF
-mv nxcl/README nxcl/README.nxcl
-mv qtnx/README qtnx/README.qtnx
 
 %build
 cd nxcl
@@ -47,15 +75,16 @@ autoreconf -is
 %configure --disable-static
 make
 cd ../qtnx
+export CFLAGS="%{optflags}"
+export CXXFLAGS="%{optflags}"
 PATH=`pkg-config --variable=bindir Qt`:$PATH
 qmake
 make
 
 %install
 rm -rf %{buildroot}
-make -C nxcl install DESTDIR=%{buildroot} docdir=%{_defaultdocdir}/%{name}-%{version}/nxcl
+make -C nxcl install DESTDIR=%{buildroot} docdir=%{_defaultdocdir}/nxcl-%{version}/nxcl
 install -p -m 0755 qtnx/qtnx %{buildroot}%{_bindir}/
-install -p -m 0644 */README* %{buildroot}%{_defaultdocdir}/%{name}-%{version}/
 desktop-file-install --vendor="freenx"                    \
   --dir=%{buildroot}%{_datadir}/applications              \
   %{SOURCE1}
@@ -65,31 +94,38 @@ rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
-%doc %{_defaultdocdir}/%{name}-%{version}
 
-# could become nxcl
+%files -n nxcl
+%defattr(-,root,root,-)
+%doc nxcl/README
 %{_bindir}/libtest
 %{_bindir}/notQttest
 %{_bindir}/nxcl
 %{_bindir}/nxcmd
 %{_libdir}/libnxcl.so.*
 
-# could become nxcl-devel
-%exclude %{_includedir}/nxcl
-%exclude %{_libdir}/libnxcl.so
+%files -n nxcl-devel
+%defattr(-,root,root,-)
+%doc %{_defaultdocdir}/nxcl-%{version}
+%{_includedir}/nxcl
+%{_libdir}/libnxcl.so
 %exclude %{_libdir}/libnxcl.la
-%exclude %{_libdir}/pkgconfig/nxcl.pc
+%{_libdir}/pkgconfig/nxcl.pc
 
-# could become qtnx
+%files -n qtnx
+%defattr(-,root,root,-)
+%doc qtnx/README
 %{_bindir}/qtnx
 %{_datadir}/applications/*qtnx.desktop
 
 %changelog
-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9-9
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+* Sat Jul 25 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 0.9-9
+- Split package into several subpackages.
+- Add some patches from CentOS (multiple-id-key & mode 0660 for key).
+- Use some patches from up to svn 545 (dated 2008-07-10).
 
-* Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9-8
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+* Mon Aug 25 2008 Axel Thimm <Axel.Thimm at ATrpms.net> - 0.9-8
+- qt4-devel is a more precise dependency than qt-devel.
 
 * Thu Apr 10 2008 Axel Thimm <Axel.Thimm at ATrpms.net> - 0.9-7
 - Fix description.




More information about the scm-commits mailing list