diff -Nru /tmp/SXmDOJxjBx/psi-0.10/debian/changelog /tmp/C7hD4LLl2u/psi-0.10/debian/changelog --- /tmp/SXmDOJxjBx/psi-0.10/debian/changelog 2007-08-09 17:12:31.000000000 -0300 +++ /tmp/C7hD4LLl2u/psi-0.10/debian/changelog 2007-08-09 17:12:31.000000000 -0300 @@ -1,3 +1,11 @@ +psi (0.10-2ubuntu3) gutsy; urgency=low + + * Add dpatch support in debian/control and debian/rules. + * Add patches/01_lsb_version.dpatch (Closes LP: #66940). + * Change Maintainer/XSBC-Original-Maintainer field. + + -- William Lima Thu, 9 Aug 2007 16:01:48 -0300 + psi (0.10-2ubuntu2) dapper; urgency=low * debian/control: added libxss-dev build dependency (Malone: #) diff -Nru /tmp/SXmDOJxjBx/psi-0.10/debian/control /tmp/C7hD4LLl2u/psi-0.10/debian/control --- /tmp/SXmDOJxjBx/psi-0.10/debian/control 2007-08-09 17:12:31.000000000 -0300 +++ /tmp/C7hD4LLl2u/psi-0.10/debian/control 2007-08-09 17:12:31.000000000 -0300 @@ -1,8 +1,9 @@ Source: psi Section: net Priority: optional -Maintainer: Jan Niehusmann -Build-Depends: debhelper (>> 4.0.0), libqt3-mt-dev (>= 3.0.5), libqt3-headers, qt3-dev-tools (>= 3.1.1-2), qca-dev, libxss-dev +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Jan Niehusmann +Build-Depends: debhelper (>> 4.0.0), dpatch, libqt3-mt-dev (>= 3.0.5), libqt3-headers, qt3-dev-tools (>= 3.1.1-2), qca-dev, libxss-dev Standards-Version: 3.6.1.0 Package: psi diff -Nru /tmp/SXmDOJxjBx/psi-0.10/debian/patches/00list /tmp/C7hD4LLl2u/psi-0.10/debian/patches/00list --- /tmp/SXmDOJxjBx/psi-0.10/debian/patches/00list 1969-12-31 21:00:00.000000000 -0300 +++ /tmp/C7hD4LLl2u/psi-0.10/debian/patches/00list 2007-08-09 17:12:31.000000000 -0300 @@ -0,0 +1 @@ +01_lsb_version.dpatch diff -Nru /tmp/SXmDOJxjBx/psi-0.10/debian/patches/01_lsb_version.dpatch /tmp/C7hD4LLl2u/psi-0.10/debian/patches/01_lsb_version.dpatch --- /tmp/SXmDOJxjBx/psi-0.10/debian/patches/01_lsb_version.dpatch 1969-12-31 21:00:00.000000000 -0300 +++ /tmp/C7hD4LLl2u/psi-0.10/debian/patches/01_lsb_version.dpatch 2007-08-09 17:12:31.000000000 -0300 @@ -0,0 +1,128 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_lsb_version.dpatch by William Lima +## +## DP: add LSB version support + +@DPATCH@ + +--- psi-0.10.orig/src/common.cpp 2007-08-09 10:01:26.000000000 -0300 ++++ psi-0.10/src/common.cpp 2007-08-09 15:01:30.000000000 -0300 +@@ -68,6 +68,8 @@ QString PROG_VERSION = "0.10"; + + QString activeProfile; + ++char buff[4096]; ++ + //QStringList dtcp_hostList; + //int dtcp_port; + //QString dtcp_proxy; +@@ -87,7 +89,6 @@ PsiGlobal g; + PsiIconset *is; + bool useSound; + +- + QString qstrlower(QString str) + { + for(unsigned int n = 0; n < str.length(); ++n) { +@@ -1095,6 +1096,7 @@ static QString os_str = "Unknown"; + #if defined(Q_WS_X11) || defined(Q_WS_MAC) + #include + #include ++#include + #include + #include + #endif +@@ -1106,6 +1108,7 @@ static void getSysInfo() + time(&x); + char str[256]; + char fmt[32]; ++ struct stat st; + strcpy(fmt, "%z"); + strftime(str, 256, fmt, localtime(&x)); + if(strcmp(fmt, str)) { +@@ -1121,6 +1124,12 @@ static void getSysInfo() + timezone_str = str; + #endif + #if defined(Q_WS_X11) ++ ++ if(stat(LSB_RELEASE, &st) != -1) { ++ os_str = lsb_release("--id --short"); ++ os_str += " "; ++ os_str += lsb_release("--release --short"); ++ } else { + struct utsname u; + uname(&u); + os_str.sprintf("%s", u.sysname); +@@ -1205,6 +1214,8 @@ static void getSysInfo() + break; + } + } ++ ++ } + #elif defined(Q_WS_MAC) + os_str = "Mac OS X"; + #endif +@@ -1453,6 +1464,43 @@ bool fileCopy(const QString &src, const + return TRUE; + } + ++char *lsb_release(const char arg[]) ++{ ++ FILE *moo; ++ char cmd[1024]; ++ char *tmp; ++ int opt; ++ ++ sprintf(cmd, "%s %s", LSB_RELEASE, arg); ++ ++ moo = popen(cmd, "r"); ++ ++ if(moo == NULL) { ++ //perror("[-] popen"); ++ return NULL; ++ } ++ ++ memset(buff, 0, sizeof(buff)); ++ ++ fgets(buff, sizeof(buff), moo); ++ ++ if(pclose(moo) < 0) { ++ //perror("[-] pclose"); ++ return NULL; ++ } ++ ++ tmp = buff; ++ opt = strlen(tmp) - 1; ++ ++ while(isspace(tmp[opt])) ++ opt--; ++ tmp[++opt] = 0; ++ ++ while(isspace(*tmp)) ++ tmp++; ++ ++ return &tmp[0]; ++} + + void soundPlay(const QString &str) + { +--- psi-0.10.orig/src/common.h 2007-08-09 10:01:26.000000000 -0300 ++++ psi-0.10/src/common.h 2007-08-09 15:01:29.000000000 -0300 +@@ -53,6 +53,8 @@ + #define STATUS_NOAUTH 101 + #define STATUS_ERROR 102 + ++#define LSB_RELEASE "/usr/bin/lsb_release" ++ + // global + struct PsiGlobal + { +@@ -284,6 +286,8 @@ void x11wmClass(Display *dsp, WId wid, Q + #define X11WM_CLASS(x) /* dummy */ + #endif + ++char *lsb_release(const char arg[]); ++ + void soundPlay(const QString &); + + XMPP::Status makeStatus(int, const QString &); diff -Nru /tmp/SXmDOJxjBx/psi-0.10/debian/rules /tmp/C7hD4LLl2u/psi-0.10/debian/rules --- /tmp/SXmDOJxjBx/psi-0.10/debian/rules 2007-08-09 17:12:31.000000000 -0300 +++ /tmp/C7hD4LLl2u/psi-0.10/debian/rules 2007-08-09 17:12:31.000000000 -0300 @@ -8,7 +8,9 @@ # This is the debhelper compatability version to use. export DH_COMPAT=4 -configure: configure-stamp +include /usr/share/dpatch/dpatch.make + +configure: patch configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. @@ -16,7 +18,7 @@ touch configure-stamp -build: configure-stamp build-stamp +build: configure build-stamp build-stamp: dh_testdir @@ -27,7 +29,7 @@ touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp @@ -102,4 +104,4 @@ dh_builddeb binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure +.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch