RPM Packaging: cleanup tqtinterface

pull/3/head
François Andriot 10 years ago
parent fa814aeacb
commit b4aa46185c

@ -1,5 +1,5 @@
# #
# spec file for package tqtinterface # spec file for package tqtinterface (version R14.0.0)
# #
# Copyright (c) 2014 Trinity Desktop Environment # Copyright (c) 2014 Trinity Desktop Environment
# #
@ -21,7 +21,7 @@
# TDE variables # TDE variables
%define tde_version 14.0.0 %define tde_version 14.0.0
%define tde_pkg tdeaddons %define tde_pkg tqtinterface
%define tde_prefix /opt/trinity %define tde_prefix /opt/trinity
%define tde_bindir %{tde_prefix}/bin %define tde_bindir %{tde_prefix}/bin
%define tde_datadir %{tde_prefix}/share %define tde_datadir %{tde_prefix}/share
@ -32,6 +32,7 @@
%define tde_tdedocdir %{tde_docdir}/tde %define tde_tdedocdir %{tde_docdir}/tde
%define tde_tdeincludedir %{tde_includedir}/tde %define tde_tdeincludedir %{tde_includedir}/tde
%define tde_tdelibdir %{tde_libdir}/trinity %define tde_tdelibdir %{tde_libdir}/trinity
%define cmake_modules_dir %{_datadir}/cmake/Modules
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt". # If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?tde_prefix}" != "/usr" %if "%{?tde_prefix}" != "/usr"
@ -44,8 +45,8 @@
%define libtqt4 libtqt4 %define libtqt4 libtqt4
%endif %endif
Name: trinity-tqtinterface Name: trinity-%{tde_pkg}
Epoch: 2 Epoch: %{tde_epoch}
Version: 4.2.0 Version: 4.2.0
Release: %{?!preversion:1}%{?preversion:0_%{preversion}}%{?dist}%{?_variant} Release: %{?!preversion:1}%{?preversion:0_%{preversion}}%{?dist}%{?_variant}
Summary: The Trinity Qt Interface Libraries Summary: The Trinity Qt Interface Libraries
@ -95,6 +96,19 @@ BuildRequires: Mesa-libGL-devel
BuildRequires: Mesa-libGLU-devel BuildRequires: Mesa-libGLU-devel
%endif %endif
# X11 libraries
%if 0%{?rhel} == 4
BuildRequires: xorg-x11-devel
%endif
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: %{_lib}xi-devel
%endif
%if 0%{?suse_version} >= 1220 || 0%{?rhel} >= 5 || 0%{?fedora}
BuildRequires: libXi-devel
%endif
%if 0%{?suse_version} == 1140
BuildRequires: libXi6-devel
%endif
%description %description
The Trinity Qt Interface is a library that abstracts Qt from Trinity. The Trinity Qt Interface is a library that abstracts Qt from Trinity.

@ -1,19 +0,0 @@
*** tqtinterface/qtinterface/Makefile.am.ORI 2011-09-16 20:05:43.000000000 +0200
--- tqtinterface/qtinterface/Makefile.am 2011-09-16 20:05:54.000000000 +0200
***************
*** 150,156 ****
endif
install-exec-local:
! test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
cp -Rp "$(srcdir)/tqt-replace" "$(DESTDIR)$(bindir)/"
cp -Rp "$(srcdir)/tqt-replace-stream" "$(DESTDIR)$(bindir)/"
cp -Rp "$(srcdir)/moc-tqt" "$(DESTDIR)$(bindir)/"
--- 150,156 ----
endif
install-exec-local:
! test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
cp -Rp "$(srcdir)/tqt-replace" "$(DESTDIR)$(bindir)/"
cp -Rp "$(srcdir)/tqt-replace-stream" "$(DESTDIR)$(bindir)/"
cp -Rp "$(srcdir)/moc-tqt" "$(DESTDIR)$(bindir)/"

@ -1,139 +0,0 @@
# Default version for this component
%if "%{?version}" == ""
%define version 3.5.12
%endif
%define release 9
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
%define _variant .opt
%endif
# Older RHEL/Fedora versions use packages named "qt", "qt-devel", ..
# whereas newer versions use "qt3", "qt3-devel" ...
%if 0%{?rhel} >= 6 || 0%{?fedora} >= 8
%define _qt_suffix 3
%endif
# TQT include files may conflict with QT4 includes, so we move them to a subdirectory.
# Later compiled Trinity products should be aware of that !
%define _includedir %{_prefix}/include/tqt
# TDE 3.5.12 specific building variables
BuildRequires: autoconf automake libtool m4
BuildRequires: qt%{?_qt_suffix}-devel >= 3.3.8b
Requires: qt%{?_qt_suffix} >= 3.3.8b
Name: tqtinterface
Version: %{version}
Release: %{release}%{?dist}%{?_variant}
License: GPL
Summary: Trinity QT Interface
Group: System Environment/Libraries
Vendor: Trinity Project
URL: http://www.trinitydesktop.org/
Packager: Francois Andriot <francois.andriot@free.fr>
Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{version}.tar.gz
Patch0: tqtinterface-3.5.12-qtinterface-makefile.patch
BuildRequires: gcc-c++
BuildRequires: libXi-devel
BuildRequires: pth-devel
%description
Trinity QT Interface
%package devel
Group: Development/Libraries
Summary: %{name} - Development files
Requires: %{name} = %{version}-%{release}
%description devel
Development files for %{name}
%prep
%setup -q -n dependencies/%{name}
%patch0 -p1
%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp -f "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh"
%__make -f "admin/Makefile.common"
%build
unset QTDIR || : ; . /etc/profile.d/qt.sh
CFLAGS=$( pkg-config --libs qt-mt )
%configure \
--enable-new-ldflags \
--disable-dependency-tracking \
--disable-debug --disable-warnings --enable-final
%__make %{?_smp_mflags}
%install
%__rm -rf %{?buildroot}
%__mkdir_p %{?buildroot}%{_includedir}
%__make install DESTDIR=%{?buildroot}
# RHEL 5: add newline at end of include files
%if 0%{?rhel} && 0%{?rhel} <= 5
for i in %{?buildroot}%{_includedir}/*.h; do
echo "" >>${i}
done
%endif
%clean
%__rm -rf %{?buildroot}
%files
%{_bindir}/*
%{_libdir}/*.so.*
%files devel
%{_includedir}
%{_libdir}/*.so
%{_libdir}/*.la
%changelog
* Fri Sep 16 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-9
- Add support for RHEL 5.
* Mon Sep 12 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-8
- Add "Group"
* Sun Sep 04 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-7
- Import to GIT
- Removes cmake stuff, build with autotools only
* Thu Aug 25 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-6
- Use '/etc/profile.d/qt.sh' to source QT environment
* Tue Aug 23 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-5
- Add missing BuildRequires
* Mon Aug 22 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-4
- Correct macro to install under "/opt", if desired
* Wed Dec 22 2010 Francois Andriot <francois.andriot@free.fr> - 3.5.12-3
- Re-add '.la' files, needed for kdelibs compilation
* Sat Dec 18 2010 Francois Andriot <francois.andriot@free.fr> - 3.5.12-2
- Add cmake support
- Removes '.la' files
* Fri Dec 17 2010 Francois Andriot <francois.andriot@free.fr> - 3.5.12-1
- Add macro _trinity_prefix to define custom installation prefix (ex: /opt/trinity)
- Move TQT includes into 'tqt' subdirectory to avoid conflict with 'qt-devel' package (from KDE4)
* Tue Dec 07 2010 Francois Andriot <francois.andriot@free.fr> - 3.5.12-0
- Initial version

@ -1,14 +0,0 @@
--- tqtinterface/qtinterface/tqt.h.cmake.orig 2011-10-09 02:40:38.000000000 -0400
+++ tqtinterface/qtinterface/tqt.h.cmake 2012-05-01 15:10:09.220681454 -0400
@@ -74,6 +74,11 @@
#define TQS_OK QS_OK
#define TQTSFUNC QTSFUNC
#define TQ_TYPENAME Q_TYPENAME
+
+#define TQ_BYTE_ORDER Q_BYTE_ORDER
+#define TQ_LITTLE_ENDIAN Q_LITTLE_ENDIAN
+#define TQ_BIG_ENDIAN Q_BIG_ENDIAN
+
#define TQT_CHECK_INVALID_MAP_ELEMENT QT_CHECK_INVALID_MAP_ELEMENT
#define TQT_VERSION QT_VERSION

@ -1,150 +0,0 @@
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?tde_prefix}" != "/usr"
%define _variant .opt
%define cmake_modules_dir %{tde_prefix}/share/cmake
%else
%define cmake_modules_dir %{_datadir}/cmake/Modules
%endif
# TQT include files may conflict with QT4 includes, so we move them to a subdirectory.
# Later compiled Trinity products should be aware of that !
%define tde_bindir %{tde_prefix}/bin
%define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib}
Name: trinity-tqtinterface
Version: 3.5.13.1
Release: 1%{?dist}%{?_variant}
License: GPL
Summary: Trinity QT Interface
Group: System Environment/Libraries
Vendor: Trinity Project
URL: http://www.trinitydesktop.org/
Packager: Francois Andriot <francois.andriot@free.fr>
Prefix: %{tde_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: tqtinterface-3.5.13.1.tar.gz
# [tqtinterface] Add missing endian-ness defines [Bug #727] [Commit #458e74a6]
Patch1: tqtinterface-3.5.13-add_missing_endianness_defines.patch
# TDE 3.5.13 specific building variables
BuildRequires: cmake >= 2.8
BuildRequires: qt3-devel
Requires: qt3
BuildRequires: gcc-c++
%if 0%{?rhel} == 4
BuildRequires: xorg-x11-devel
%else
BuildRequires: pth-devel
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: %{_lib}xi-devel
%else
BuildRequires: libXi-devel
%endif
%endif
Obsoletes: tqtinterface < %{version}-%{release}
Provides: tqtinterface = %{version}-%{release}
%description
Trinity QT Interface
%package devel
Group: Development/Libraries
Summary: %{name} - Development files
Requires: %{name} = %{version}-%{release}
Requires: qt3-devel
Obsoletes: tqtinterface-devel < %{version}-%{release}
Provides: tqtinterface-devel = %{version}-%{release}
%description devel
Development files for %{name}
%if 0%{?suse_version} || 0%{?pclinuxos}
%debug_package
%endif
%prep
%setup -q -n tqtinterface-3.5.13.1
%patch1 -p1
%build
unset QTDIR; . /etc/profile.d/qt3.sh
%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version}
%__mkdir_p build
cd build
%endif
# Note: specifying 'QT_LIBRARY_DIR' allow using QT3 libraries under
# another directory than QT3_PREFIX. (E.g. Mageia 2, Mandriva ...)
# Otherwise, it defaults to ${QTDIR}/lib !
%cmake \
-DQT_PREFIX_DIR=${QTDIR} \
-DQT_VERSION=3 \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DINCLUDE_INSTALL_DIR=%{tde_includedir}/tqt \
-DLIB_INSTALL_DIR=%{tde_libdir} \
-DPKGCONFIG_INSTALL_DIR=%{tde_libdir}/pkgconfig \
-DBIN_INSTALL_DIR=%{tde_bindir} \
-DQT_LIBRARY_DIR=${QTLIB:-${QTDIR}/%{_lib}} \
..
%__make %{?_smp_mflags}
%install
%__rm -rf %{?buildroot}
%__mkdir_p %{?buildroot}%{_includedir}
%__make install DESTDIR=%{?buildroot} -C build
# RHEL 5: add newline at end of include files to avoid warnings
%if 0%{?rhel} && 0%{?rhel} <= 5
for i in %{?buildroot}%{tde_includedir}/tqt/*.h; do
echo "" >>${i}
done
%endif
# Install 'cmake' modules for development use
%__mkdir_p %{?buildroot}%{cmake_modules_dir}
for i in cmake/modules/*.cmake; do
%__install -m 644 $i %{?buildroot}%{cmake_modules_dir}
done
%clean
%__rm -rf %{?buildroot}
%post
/sbin/ldconfig || :
%postun
/sbin/ldconfig || :
%post devel
/sbin/ldconfig || :
%postun devel
/sbin/ldconfig || :
%files
%{tde_bindir}/*
%{tde_libdir}/*.so.*
%files devel
%{tde_includedir}/tqt
%{tde_libdir}/*.so
%{tde_libdir}/*.la
%{tde_libdir}/pkgconfig/*.pc
%{cmake_modules_dir}/*.cmake
%changelog
* Tue Sep 11 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13.1-1
- Switch to v3.5.13-sru branch

@ -1,37 +1,101 @@
# TDE specific building variables #
%define tde_version 3.5.13.2 # spec file for package tqtinterface (version 3.5.13-SRU)
%define tde_prefix /usr #
# Copyright (c) 2014 Trinity Desktop Environment
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http:/www.trinitydesktop.org/
#
# BUILD WARNING:
# Remove qt-devel and qt3-devel and any kde*-devel on your system !
# Having KDE libraries may cause FTBFS here !
# TDE variables
%define tde_version 14.0.0
%define tde_pkg tqtinterface
%define tde_prefix /opt/trinity
%define tde_bindir %{tde_prefix}/bin %define tde_bindir %{tde_prefix}/bin
%define tde_datadir %{tde_prefix}/share
%define tde_docdir %{tde_datadir}/doc
%define tde_includedir %{tde_prefix}/include %define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib} %define tde_libdir %{tde_prefix}/%{_lib}
%define tde_tdeappdir %{tde_datadir}/applications/kde
%define tde_tdedocdir %{tde_docdir}/tde
%define tde_tdeincludedir %{tde_includedir}/tde
%define tde_tdelibdir %{tde_libdir}/trinity
%define cmake_modules_dir %{_datadir}/cmake/Modules %define cmake_modules_dir %{_datadir}/cmake/Modules
Name: trinity-tqtinterface # If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
Version: %{tde_version} %if "%{?tde_prefix}" != "/usr"
Release: %{?!preversion:2}%{?preversion:1_%{preversion}}%{?dist}%{?_variant} %define _variant .opt
License: GPL %endif
Summary: Trinity QT Interface
Group: System Environment/Libraries %if 0%{?mdkversion} || 0%{?mgaversion} || 0%{?pclinuxos}
%define libtqt4 %{_lib}tqt4
%else
%define libtqt4 libtqt4
%endif
Vendor: Trinity Project Name: trinity-%{tde_pkg}
Epoch: %{tde_epoch}
Version: 4.2.0
Release: %{?!preversion:1}%{?preversion:0_%{preversion}}%{?dist}%{?_variant}
Summary: The Trinity Qt Interface Libraries
Group: System/GUI/Other
URL: http://www.trinitydesktop.org/ URL: http://www.trinitydesktop.org/
Packager: Francois Andriot <francois.andriot@free.fr>
Prefix: %{tde_prefix} %if 0%{?suse_version}
License: GPL-2.0+
%else
License: GPLv2+
%endif
#Vendor: Trinity Project
#Packager: Francois Andriot <francois.andriot@free.fr>
Prefix: /usr
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{version}%{?preversion:~%{preversion}}.tar.gz
BuildRequires: cmake >= 2.8 Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
BuildRequires: qt3 >= 3.3.8d
BuildRequires: qt3-devel >= 3.3.8d BuildRequires: qt3-devel >= 3.3.8d
Requires: qt3 >= 3.3.8d
%if 0%{?suse_version} && 0%{?suse_version} < 1300
BuildRequires: trinity-cmake-macros
%endif
BuildRequires: cmake >= 2.8
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig
# PTHREAD support # PTHREAD support
%if 0%{?rhel} >= 5 || 0%{?fedora} || 0%{?mdkversion} || 0%{?mgaversion} || 0%{?suse_version} %if 0%{?rhel} >= 5 || 0%{?fedora} || 0%{?mdkversion} || 0%{?mgaversion} || 0%{?suse_version}
BuildRequires: pth-devel BuildRequires: pth-devel
%endif %endif
# MESA support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: mesaglu-devel
%endif
%if 0%{?suse_version}
BuildRequires: Mesa-libGL-devel
BuildRequires: Mesa-libGLU-devel
%endif
# X11 libraries # X11 libraries
%if 0%{?rhel} == 4 %if 0%{?rhel} == 4
BuildRequires: xorg-x11-devel BuildRequires: xorg-x11-devel
@ -46,78 +110,107 @@ BuildRequires: libXi-devel
BuildRequires: libXi6-devel BuildRequires: libXi6-devel
%endif %endif
Obsoletes: tqtinterface < %{version}-%{release} %description
Provides: tqtinterface = %{version}-%{release} The Trinity Qt Interface is a library that abstracts Qt from Trinity.
This allows the Trinity code to rapidly port from one version of Qt to another.
This is primarily accomplished by defining old functions in terms of new functions,
although some code has been added for useful functions that are no longer part of Qt.
%description ##########
Trinity QT Interface
%package -n %{libtqt4}
Group: System/GUI/Other
Summary: The Trinity Qt Interface Libraries
Provides: libtqt4 = %{?epoch:%{epoch}:}%{version}-%{release}
%post Requires: qt3 >= 3.3.8d
/sbin/ldconfig || :
%postun %if 0%{?suse_version} && 0%{?suse_version} < 1300
/sbin/ldconfig || : Requires: trinity-cmake-macros
%endif
%files Obsoletes: trinity-tqtinterface < %{?epoch:%{epoch}:}%{version}-%{release}
Provides: trinity-tqtinterface = %{?epoch:%{epoch}:}%{version}-%{release}
%description -n %{libtqt4}
The Trinity Qt Interface is a library that abstracts Qt from Trinity.
This allows the Trinity code to rapidly port from one version of Qt to another.
This is primarily accomplished by defining old functions in terms of new functions,
although some code has been added for useful functions that are no longer part of Qt.
%files -n %{libtqt4}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{tde_bindir}/convert_qt_tqt1 %{_libdir}/libtqt.so.4
%{tde_bindir}/convert_qt_tqt2 %{_libdir}/libtqt.so.4.2.0
%{tde_bindir}/convert_qt_tqt3
%{tde_bindir}/dcopidl-tqt %post -n %{libtqt4}
%{tde_bindir}/dcopidl2cpp-tqt /sbin/ldconfig || :
%{tde_bindir}/dcopidlng-tqt
%{tde_bindir}/mcopidl-tqt %postun -n %{libtqt4}
%{tde_bindir}/moc-tqt /sbin/ldconfig || :
%{tde_bindir}/tmoc
%{tde_bindir}/tqt-replace
%{tde_bindir}/tqt-replace-stream
%{tde_bindir}/uic-tqt
%{tde_libdir}/libtqassistantclient.so.4
%{tde_libdir}/libtqassistantclient.so.4.2.0
%{tde_libdir}/libtqt.so.4
%{tde_libdir}/libtqt.so.4.2.0
########## ##########
%package devel %package -n %{libtqt4}-devel
Group: Development/Libraries Group: Development/Libraries/X11
Summary: %{name} - Development files Summary: The Trinity Qt Interface Libraries (Development Files)
Requires: %{name} = %{version}-%{release} Provides: libtqt4-devel = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{libtqt4} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: qt3-devel >= 3.3.8d Requires: qt3-devel >= 3.3.8d
Obsoletes: tqtinterface-devel < %{version}-%{release} %if 0%{?suse_version} && 0%{?suse_version} < 1300
Provides: tqtinterface-devel = %{version}-%{release} Requires: trinity-cmake-macros
%endif
Obsoletes: trinity-tqtinterface-devel < %{?epoch:%{epoch}:}%{version}-%{release}
Provides: trinity-tqtinterface-devel = %{?epoch:%{epoch}:}%{version}-%{release}
%description devel %description -n %{libtqt4}-devel
Development files for %{name} The Trinity Qt Interface is a library that abstracts Qt from Trinity.
This allows the Trinity code to rapidly port from one version of Qt to another.
This is primarily accomplished by defining old functions in terms of new functions,
although some code has been added for useful functions that are no longer part of Qt.
%post devel %post -n %{libtqt4}-devel
/sbin/ldconfig || : /sbin/ldconfig || :
%postun devel %postun -n %{libtqt4}-devel
/sbin/ldconfig || : /sbin/ldconfig || :
%files devel %files -n %{libtqt4}-devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{tde_includedir}/tqt/ %{_bindir}/convert_qt_tqt1
%{tde_libdir}/libtqassistantclient.la %{_bindir}/convert_qt_tqt2
%{tde_libdir}/libtqassistantclient.so %{_bindir}/convert_qt_tqt3
%{tde_libdir}/libtqt.la %{_bindir}/dcopidl-tqt
%{tde_libdir}/libtqt.so %{_bindir}/dcopidl2cpp-tqt
%{tde_libdir}/pkgconfig/tqt.pc %{_bindir}/dcopidlng-tqt
%{_bindir}/mcopidl-tqt
%{_bindir}/moc-tqt
%{_bindir}/tmoc
%{_bindir}/tqt-replace
%{_bindir}/tqt-replace-stream
%{_bindir}/uic-tqt
%{_includedir}/tqt/
%{_libdir}/libtqt.la
%{_libdir}/libtqt.so
%{_libdir}/pkgconfig/tqt.pc
%{_libdir}/pkgconfig/tqtqui.pc
%{cmake_modules_dir}/*.cmake %{cmake_modules_dir}/*.cmake
########## ##########
%if 0%{?suse_version} || 0%{?pclinuxos} %if 0%{?pclinuxos}
%debug_package %debug_package
%endif %endif
##########
%prep %prep
%setup -q -n %{name}-%{version}%{?preversion:~%{preversion}} %setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
%build %build
unset QTDIR QTINC QTLIB unset QTDIR QTINC QTLIB
@ -128,8 +221,6 @@ if ! rpm -E %%cmake|grep -q "cd build"; then
cd build cd build
fi fi
pwd
# Note: specifying 'QT_LIBRARY_DIR' allow using QT3 libraries under # Note: specifying 'QT_LIBRARY_DIR' allow using QT3 libraries under
# another directory than QT3_PREFIX. (E.g. Mageia 2, Mandriva ...) # another directory than QT3_PREFIX. (E.g. Mageia 2, Mandriva ...)
# Otherwise, it defaults to ${QTDIR}/lib ! # Otherwise, it defaults to ${QTDIR}/lib !
@ -144,23 +235,26 @@ pwd
-DQT_VERSION=3 \ -DQT_VERSION=3 \
-DQT_LIBRARY_DIR="${QTLIB:-${QTDIR}/%{_lib}}" \ -DQT_LIBRARY_DIR="${QTLIB:-${QTDIR}/%{_lib}}" \
\ \
-DCMAKE_INSTALL_PREFIX="%{tde_prefix}" \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DPKGCONFIG_INSTALL_DIR="%{tde_libdir}/pkgconfig" \ -DPKGCONFIG_INSTALL_DIR="%{_libdir}/pkgconfig" \
-DINCLUDE_INSTALL_DIR=%{tde_includedir}/tqt \ -DINCLUDE_INSTALL_DIR=%{_includedir}/tqt \
-DLIB_INSTALL_DIR=%{tde_libdir} \ -DLIB_INSTALL_DIR=%{_libdir} \
-DBIN_INSTALL_DIR=%{tde_bindir} \ -DBIN_INSTALL_DIR=%{_bindir} \
\
-DCMAKE_LIBRARY_PATH="%{_libdir}" \
-DCMAKE_INCLUDE_PATH="%{_includedir}" \
\ \
-DWITH_QT3="ON" \ -DWITH_QT3="ON" \
-DBUILD_ALL="ON" \ -DBUILD_ALL="ON" \
-DUSE_QT3="ON" \ -DUSE_QT3="ON" \
.. ..
%__make %{?_smp_mflags} %__make %{?_smp_mflags} || %__make
%install %install
%__rm -rf %{?buildroot} %__rm -rf "%{?buildroot}"
%__make install DESTDIR=%{?buildroot} -C build %__make install DESTDIR="%{?buildroot}" -C build
# RHEL 5: add newline at end of include files to avoid warnings # RHEL 5: add newline at end of include files to avoid warnings
%if 0%{?rhel} && 0%{?rhel} <= 5 %if 0%{?rhel} && 0%{?rhel} <= 5
@ -170,14 +264,14 @@ done
%endif %endif
# Install 'cmake' modules for development use # Install 'cmake' modules for development use
%__mkdir_p %{?buildroot}%{cmake_modules_dir} %__mkdir_p "%{?buildroot}%{cmake_modules_dir}"
for i in cmake/modules/*.cmake; do for i in cmake/modules/*.cmake; do
%__install -m 644 $i %{?buildroot}%{cmake_modules_dir} %__install -m 644 "$i" "%{?buildroot}%{cmake_modules_dir}"
done done
%clean %clean
%__rm -rf %{?buildroot} %__rm -rf "%{?buildroot}"
%changelog %changelog

@ -1,161 +0,0 @@
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?tde_prefix}" != "/usr"
%define _variant .opt
%define cmake_modules_dir %{tde_prefix}/share/cmake
%else
%define cmake_modules_dir %{_datadir}/cmake/Modules
%endif
# TQT include files may conflict with QT4 includes, so we move them to a subdirectory.
# Later compiled Trinity products should be aware of that !
%define tde_bindir %{tde_prefix}/bin
%define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib}
Name: trinity-tqtinterface
Version: 3.5.13
Release: 3%{?dist}%{?_variant}
License: GPL
Summary: Trinity QT Interface
Group: System Environment/Libraries
Vendor: Trinity Project
URL: http://www.trinitydesktop.org/
Packager: Francois Andriot <francois.andriot@free.fr>
Prefix: %{tde_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: tqtinterface-3.5.13.tar.gz
# [tqtinterface] Add missing endian-ness defines [Bug #727] [Commit #458e74a6]
Patch1: tqtinterface-3.5.13-add_missing_endianness_defines.patch
# TDE 3.5.13 specific building variables
BuildRequires: cmake >= 2.8
BuildRequires: qt3-devel
Requires: qt3
BuildRequires: gcc-c++
%if 0%{?rhel} == 4
BuildRequires: xorg-x11-devel
%else
BuildRequires: pth-devel
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: %{_lib}xi-devel
%else
BuildRequires: libXi-devel
%endif
%endif
Obsoletes: tqtinterface < %{version}-%{release}
Provides: tqtinterface = %{version}-%{release}
%description
Trinity QT Interface
%package devel
Group: Development/Libraries
Summary: %{name} - Development files
Requires: %{name} = %{version}-%{release}
Requires: qt3-devel
Obsoletes: tqtinterface-devel < %{version}-%{release}
Provides: tqtinterface-devel = %{version}-%{release}
%description devel
Development files for %{name}
%if 0%{?suse_version}
%debug_package
%endif
%prep
%setup -q -n dependencies/tqtinterface
%patch1 -p1
%build
unset QTDIR; . /etc/profile.d/qt?.sh
%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version}
%__mkdir_p build
cd build
%endif
# Note: specifying 'QT_LIBRARY_DIR' allow using QT3 libraries under
# another directory than QT3_PREFIX. (E.g. Mageia 2, Mandriva ...)
# Otherwise, it defaults to ${QTDIR}/lib !
%cmake \
-DQT_PREFIX_DIR=${QTDIR} \
-DQT_VERSION=3 \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DINCLUDE_INSTALL_DIR=%{tde_includedir}/tqt \
-DLIB_INSTALL_DIR=%{tde_libdir} \
-DPKGCONFIG_INSTALL_DIR=%{tde_libdir}/pkgconfig \
-DBIN_INSTALL_DIR=%{tde_bindir} \
-DQT_LIBRARY_DIR=${QTLIB:-${QTDIR}/%{_lib}} \
..
%__make %{?_smp_mflags}
%install
%__rm -rf %{?buildroot}
%__mkdir_p %{?buildroot}%{_includedir}
%__make install DESTDIR=%{?buildroot} -C build
# RHEL 5: add newline at end of include files to avoid warnings
%if 0%{?rhel} && 0%{?rhel} <= 5
for i in %{?buildroot}%{tde_includedir}/tqt/*.h; do
echo "" >>${i}
done
%endif
# Install 'cmake' modules for development use
%__mkdir_p %{?buildroot}%{cmake_modules_dir}
for i in cmake/modules/*.cmake; do
%__install -m 644 $i %{?buildroot}%{cmake_modules_dir}
done
%clean
%__rm -rf %{?buildroot}
%post
/sbin/ldconfig || :
%postun
/sbin/ldconfig || :
%post devel
/sbin/ldconfig || :
%postun devel
/sbin/ldconfig || :
%files
%{tde_bindir}/*
%{tde_libdir}/*.so.*
%files devel
%{tde_includedir}/tqt
%{tde_libdir}/*.so
%{tde_libdir}/*.la
%{tde_libdir}/pkgconfig/*.pc
%{cmake_modules_dir}/*.cmake
%changelog
* Tue May 01 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13-3
- Rebuilt for Fedora 17
- Add missing endian-ness defines [Bug #727] [Commit #458e74a6]
* Sun Nov 06 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.13-2
- Add missing Requires
* Sun Oct 30 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.13-1
- Initial release for RHEL 6, RHEL 5 and Fedora 15
* Sun Aug 28 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.13-0
- Import to GIT
- Built with future TDE version (3.5.13 + cmake + QT3.3.8d)
Loading…
Cancel
Save