[qterm] - Fix build with F17 - rename the executable to QTerm to prevent conflict with torque-client - Specf
cheeselee
cheeselee at fedoraproject.org
Mon Jan 16 10:50:00 UTC 2012
commit 224a3dba9b244114e0a252268d23a46a57c98fd3
Author: Robin Lee <cheeselee at fedoraproject.org>
Date: Mon Jan 16 18:49:25 2012 +0800
- Fix build with F17
- rename the executable to QTerm to prevent conflict with torque-client
- Specfile untabified
qterm-0.5.12-cmake.patch | 17 ++++++++++++
qterm-0.5.12-gcc-4.7.patch | 12 ++++++++
qterm.spec | 63 ++++++++++++++++++++++++++-----------------
3 files changed, 67 insertions(+), 25 deletions(-)
---
diff --git a/qterm-0.5.12-cmake.patch b/qterm-0.5.12-cmake.patch
new file mode 100644
index 0000000..ff30201
--- /dev/null
+++ b/qterm-0.5.12-cmake.patch
@@ -0,0 +1,17 @@
+--- trunk/qterm-qt4/CMakeLists.txt 2011/10/15 21:11:02 1295
++++ trunk/qterm-qt4/CMakeLists.txt 2011/12/17 07:10:08 1311
+@@ -1,13 +1,12 @@
+ project(qterm)
+ include(CTest)
+ cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
+-set(QT_MIN_VERSION "4.5.0")
+ set(QTERM_VERSION_MAJOR 0)
+ set(QTERM_VERSION_MINOR 5)
+ set(QTERM_VERSION_RELEASE 12)
+ set(QTERM_VERSION "${QTERM_VERSION_MAJOR}.${QTERM_VERSION_MINOR}.${QTERM_VERSION_RELEASE}" )
+ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
+-find_package(Qt4 REQUIRED)
++find_package(Qt4 4.5.0 REQUIRED)
+ find_package(KDE4)
+
+ IF(WIN32 AND MSVC)
diff --git a/qterm-0.5.12-gcc-4.7.patch b/qterm-0.5.12-gcc-4.7.patch
new file mode 100644
index 0000000..c916f8c
--- /dev/null
+++ b/qterm-0.5.12-gcc-4.7.patch
@@ -0,0 +1,12 @@
+Index: src/main.cpp
+===================================================================
+--- src/main.cpp (revision 1312)
++++ src/main.cpp (working copy)
+@@ -28,6 +28,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <unistd.h>
+
+ //==============================================================================
+ // Crash Handler: Save the backtrace info to /var/tmp as qterm.pid.timestamp
diff --git a/qterm.spec b/qterm.spec
index 3f15b84..be8793a 100644
--- a/qterm.spec
+++ b/qterm.spec
@@ -1,23 +1,27 @@
-Name: qterm
-Version: 0.5.12
-Release: 2%{?dist}
-Summary: BBS client for X Window System written in Qt
-Group: Applications/Internet
-License: GPLv2+
-URL: http://www.qterm.org
-Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
+Name: qterm
+Version: 0.5.12
+Release: 3%{?dist}
+Summary: BBS client for X Window System written in Qt
+Group: Applications/Internet
+License: GPLv2+
+URL: http://www.qterm.org
+Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
# README from debian
-Source1: README.Debian
-BuildRequires: phonon-devel
-BuildRequires: openssl-devel
-BuildRequires: qtscriptbindings
-BuildRequires: cmake
-BuildRequires: desktop-file-utils
-Requires: hicolor-icon-theme
+Source1: README.Debian
+# Use the new find_package syntax introduced in CMake 2.6 to workaround a problem with Find_Qt4 shipped with KDE.
+# applied in upstream svn1311
+Patch0: qterm-0.5.12-cmake.patch
+# Fix build with gcc 4.7, include the missed unistd.h include
+# https://sourceforge.net/tracker/?func=detail&aid=3474368&group_id=79581&atid=557094
+Patch1: qterm-0.5.12-gcc-4.7.patch
+BuildRequires: phonon-devel
+BuildRequires: openssl-devel
+BuildRequires: qtscriptbindings
+BuildRequires: cmake
+BuildRequires: desktop-file-utils
+Requires: hicolor-icon-theme
%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
-# torque-client also provides %%{_bindir}/qterm
-Conflicts: torque-client
%description
QTerm is a BBS client for X Window System. It supports Telnet, SSH1 and SSH2
@@ -28,6 +32,8 @@ extra work, see %{_docdir}/%{name}-%{version}/README.package.
%prep
%setup -q
+%patch0 -p2
+%patch1 -p0
%build
export PATH=%{_qt4_bindir}:$PATH
@@ -38,14 +44,17 @@ make %{?_smp_mflags}
make install/fast DESTDIR=%{buildroot}
desktop-file-install \
- --dir %{buildroot}%{_datadir}/applications \
- --remove-category Application \
- --add-category RemoteAccess \
- %buildroot%{_datadir}/applications/*.desktop
+ --dir %{buildroot}%{_datadir}/applications \
+ --remove-category Application \
+ --add-category RemoteAccess \
+ %buildroot%{_datadir}/applications/*.desktop
+
+# rename the executable to QTerm to prevent conflict with torque-client
+mv %buildroot%{_bindir}/{qterm,QTerm}
+sed -i 's/Exec=qterm/Exec=QTerm/' %buildroot%{_datadir}/applications/%{name}.desktop
+
cp -p %{SOURCE1} README.package
-%clean
-rm -rf %{buildroot}
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
@@ -60,14 +69,18 @@ fi
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
-%defattr(-,root,root,-)
%doc README* TODO doc/*
-%{_bindir}/%{name}*
+%{_bindir}/QTerm
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/applications/%{name}.desktop
%changelog
+* Mon Jan 16 2012 Robin Lee <cheeselee at fedoraproject.org> - 0.5.12-3
+- Fix build with F17
+- rename the executable to QTerm to prevent conflict with torque-client
+- Specfile untabified
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list