Группа :: Система/Библиотеки
Пакет: qt4
Главная Изменения Спек Патчи Загрузить Bugs and FR
# This spec for backport to M24 is autogenerated. Do not edit it.
%define qIF_ver_gt() %if "%(rpmvercmp '%1' '%2')" == "1"
%define qIF_ver_gteq() %if "%(rpmvercmp '%1' '%2')" != "-1"
%define qIF_ver_lt() %if "%(rpmvercmp '%2' '%1')" == "1"
%define qIF_ver_lteq() %if "%(rpmvercmp '%2' '%1')" != "-1"
%define debug 0
%define qt_copy 0
%define building 0
%define _keep_libtool_files 1
%define _optlevel s
%define static_thread 1
%define shared_thread 1
%define build_odbc 1
%define build_sqlite2 1
%define build_qsa 1
%define build_dbus 0
%define dbus_version %{get_version libdbus}
%qIF_ver_lt "%dbus_version" "0.62"
%define build_dbus 0
%endif
%define versioning_hack 1
%define no_some_docs 0
# Versions
%define rname qt
%define major 4
%define minor 2
%define bugfix 1
%define beta %nil
%define qsa_major 1
%define qsa_minor 2
%define qsa_bugfix 1
%define rlz alt1
Name: %rname%major
Version: %major.%minor.%bugfix
Release: alt0.M24.1
%define qsa_ver %qsa_major.%qsa_minor.%qsa_bugfix
%define qtdir %_libdir/%name
%define kdedir %prefix
%add_findprov_lib_path %qtdir/lib
Group: System/Libraries
Summary: Shared library for the Qt%major GUI toolkit
Url: http://www.trolltech.com/products/qt/
License: GPL & QPL
Requires: %name-doc %name-sql lib%name %name-assistant
%if %qt_copy
Source0: qt-copy-%version%beta.tar.bz2
%else
Source0: ftp://ftp.trolltech.com/qt/source/%rname-x11-opensource-src-%version%beta.tar.gz
%endif
%if %build_qsa
Source1: qsa-x11-opensource-%qsa_ver.tar.gz
%endif
#
Source8: qtX-README.ALT
#Source11: qt-ru-3.3.2-20040604.tar.bz2
Source12: wrap_kde_malloc.cpp
#
Source21: qt4-assistant.desktop
Source22: qt4-designer.desktop
Source23: qt4-linguist.desktop
Source24: qt4-qtconfig.desktop
Source101: %rname.16.png
Source102: %rname.32.png
Source103: %rname.48.png
# FC
Patch1: qt-4.0.1-sans-mono.patch
# Qt-copy
Patch40: 0118-qtcopy-define.diff
Patch41: 0141-cursorCharFormat.diff
Patch42: 0142-uic3-wordWrapAttribute.diff
Patch43: 0144-qpixmap-setmask.diff
Patch44: 0145-qabstractitemview-dropindicator.diff
Patch45: 0146-rasterpaint-qbrush-image.diff
Patch46: 0147-qbrush-detach-transform.diff
# ALT
# by raorn at altlinux
Patch101: qt-4.1.3-alt-honor-SUSv3-locales.patch
Patch102: qt-4.1.1-alt-sqlite.patch
Patch103: qt-4.0.1-alt-assistant-location.patch
Patch104: qt-4.2.0-rc1-alt-fix-gl-loading.patch
Patch105: qt-4.0.1-alt-iso_c_extension.patch
Patch106: qt-4.1.0-alt-dont-build-extra.patch
Patch107: qt-4.0.1-alt-visibility.patch
Patch108: qt-4.1.0-alt-buildkey-nomachine.patch
Patch109: qt-4.1.3-alt-compile-with-old-mysql.patch
#
# Sergey A. Sukiyazov <sukiyazov at mail.ru>
Patch9000: qt-4.0.1-qmenubar-key_f10.patch
# Automatically added by buildreq on Wed Sep 04 2002
#BuildRequires: XFree86-devel XFree86-libs freetype2-devel gcc-c++ libMySQL-devel libcups-devel libjpeg-devel liblcms libmng-devel libpng-devel libssl libstdc++-devel libunixODBC-devel postgresql-devel postgresql-libs zlib-devel
BuildRequires: XFree86-devel freetype2-devel pkgconfig rpm-utils
BuildRequires: libcups-devel libssl libcups-devel
BuildRequires: libbeecrypt liblcms gcc-c++ libstdc++-devel
BuildRequires: libjpeg-devel libmng-devel libpng-devel zlib-devel
BuildRequires: postgresql-devel libpq3-devel libMySQL-devel
BuildRequires: libsqlite3-devel libGLU-devel
%if %build_dbus
BuildPreReq: libdbus-devel
%endif
BuildRequires: bison libaudio-devel pkgconfig
BuildRequires: fontconfig-devel menu-devel
%if %build_sqlite2
BuildRequires: sqlite-devel
%endif
%if %build_odbc
BuildRequires: libunixODBC-devel
%endif
# BuildRequires: rpm-build-compat >= 0.4
%description
Qt is a GUI software toolkit. Qt simplifies the task of writing and maintaining
GUI (graphical user interface) applications for the X Windows system.
It has everything you need to create professional GUI applications.
And it enables you to create them quickly.
Qt is multi-platform toolkit written in C++ and is fully object-oriented.
This package contains the shared library needed to run Qt%major applications, as
well as the README files for Qt.
##############################################
%package common
Summary: Common package for Qt%major
Group: System/Libraries
Requires: common-licenses
%description common
Common package for Qt%major
##############################################
%package -n lib%name
Summary: Shared library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: lib%{name}-core lib%{name}-gui lib%{name}-network
Requires: lib%{name}-opengl
Requires: lib%{name}-sql lib%{name}-xml
Requires: lib%{name}-qt3support lib%{name}-svg
Requires: lib%{name}-designer lib%{name}-assistant
%if %build_dbus
Requires: lib%{name}-dbus
%endif
%if %build_qsa
Requires: lib%{name}-qsa
%endif
%description -n lib%name
Qt is a GUI software toolkit. Qt simplifies the task of writing and maintaining
GUI (graphical user interface) applications for X Windows System.
Qt is written in C++ and is fully object-oriented. It has everything you need
to create professional GUI applications. And it enables you to create them
quickly.
Qt is a multi-platform toolkit. When developing software with Qt, you can run
it on the X Window System (Unix/X11) or Microsoft Windows NT and Windows 95/98
or framebuffer devices.
Simply recompile your source code on the platform you want.
This package contains the shared library needed to run Qt%major applications, as
well as the README files for Qt.
##############################################
%package -n lib%{name}-qt3support
Summary: Qt3 support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-qt3support
Qt3 support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-core
Summary: Core library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
Requires: %name-settings = %major.%minor
%description -n lib%{name}-core
Core library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-gui
Summary: GUI support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-gui
GUI support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-dbus
Summary: DBus support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-dbus
DBus support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-network
Summary: Network support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-network
Network support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-svg
Summary: SVG support for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-svg
Support for rendering Scalable Vector Graphics (SVG)
drawings and animations for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-opengl
Summary: OpenGL support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-opengl
OpenGL support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-sql
Summary: SQL support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-sql
SQL support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-test
Summary: Unit Testing Library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-test
Unit Testing Library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-designer
Summary: Libraries for the Qt%major Designer
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-designer
Libraries for the Qt%major Designer
##############################################
%package -n lib%{name}-assistant
Summary: Qt%major Assistant support library
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-assistant
Qt%major Assistant support library
##############################################
%package -n lib%{name}-xml
Summary: XML support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-xml
XML support library for the Qt%major GUI toolkit
##############################################
%package devel
Group: System/Libraries
Summary: Amount package for development with Qt%major GUI toolkit
Requires: lib%name-devel %name-doc %name-designer %name-assistant
%description devel
Amount package for development with Qt%major GUI toolkit
##############################################
%package -n lib%name-devel
Summary: Header files and libraries for developing apps which will use Qt%major
Group: Development/KDE and QT
Requires: %name-common = %version-%release
Requires: lib%name
Requires: XFree86-devel freetype2-devel fontconfig-devel libpng-devel
Requires: libaudio-devel zlib-devel
Requires: lib%{name}-test
%if %build_dbus
Requires: libdbus-devel
%endif
Provides: lib%name-devel-cxx = %__gcc_version_base
%description -n lib%name-devel
Qt is a GUI software toolkit. Qt simplifies the task of writing and maintaining
GUI (graphical user interface) applications for X Windows.
Qt is written in C++ and is fully object-oriented. It has everything you need
to create professional GUI applications. And it enables you to create them
quickly.
Qt is a multi-platform toolkit. When developing software with Qt, you can run
it on the X Window System (Unix/X11) or Microsoft Windows NT and Windows 95/98.
Simply recompile your source code on the platform you want.
This package contains the files necessary to develop applications
##############################################
%package -n lib%name-devel-static
Summary: Version of the Qt GUI toolkit for static linking
Group: Development/KDE and QT
Requires: %name-common = %version-%release
Requires: lib%name-devel
Obsoletes: %name-devel-static
%description -n lib%name-devel-static
This package package contains the files necessary to link applications
to the Qt GUI toolkit statically (rather than dynamically).
Statically linked applications don't require the library to be installed
on the system running the application.
##############################################
%package designer
Summary: Designer for the Qt%major
Group: Development/KDE and QT
Requires: %name-common = %version-%release
Requires: lib%name-devel
%description designer
The package contains an User Interface designer
tool for the Qt%major toolkit.
##############################################
%package -n lib%name-styles
Summary: Extra styles for the Qt GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%name-styles
Extra styles (themes) for the Qt GUI toolkit.
##############################################
%package sql
Group: System/Libraries
Summary: Amount package for SQL support of Qt%major GUI toolkit
Requires: lib%name-sql lib%name-sql-mysql
Requires: lib%name-sql-postgresql lib%name-sql-sqlite
%if %build_sqlite2
Requires: lib%name-sql-sqlite2
%endif
%if %build_odbc
Requires: lib%name-sql-odbc
%endif
%description sql
Amount package for SQL support of Qt%major GUI toolkit
##############################################
%package -n lib%name-sql-odbc
Summary: ODBC drivers for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-odbc
ODBC driver for Qt's SQL classes (QODBC)
##############################################
%package -n lib%name-sql-mysql
Summary: MySQL driver for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-mysql
MySQL driver for Qt's SQL classes (QMYSQL)
##############################################
%package -n lib%name-sql-postgresql
Summary: PostgreSQL drivers for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-postgresql
PostgreSQL driver for Qt's SQL classes (QPSQL)
##############################################
%package -n lib%name-sql-sqlite
Summary: SQLite driver for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-sqlite
SQLite driver for Qt's SQL classes (QSQLITE)
##############################################
%package -n lib%name-sql-sqlite2
Summary: SQLite2 driver for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-sqlite2
SQLite2 driver for Qt's SQL classes (QSQLITE2)
##############################################
%package doc
Summary: Document for developing apps which will use Qt%{major}
Group: Development/KDE and QT
Requires: %name-common = %version
#Requires: lib%name-devel = %version
Requires: %name-assistant = %version
Requires: %name-doc-html = %version
#Requires: %name-doc-man = %version
Requires: %name-doc-examples = %version
%description doc
This package contains documentation and sources for example programs.
##############################################
%package doc-html
Summary: Document for developing apps which will use Qt%{major}
Group: Development/KDE and QT
Requires: %name-common = %version
%description doc-html
This package contains documentation in html format.
##############################################
%package doc-man
Summary: Document for developing apps which will use Qt%{major}
Group: Development/KDE and QT
Requires: %name-common = %version
%description doc-man
This package contains documentation in man format.
##############################################
%package doc-examples
Summary: Examples for developing apps which will use Qt%{major}
Group: Development/KDE and QT
Requires: %name-common = %version
%description doc-examples
This package contains sources for example programs.
##############################################
%package assistant
Summary: Assistant for the Qt%major
Group: Text tools
Requires: %name-common = %version-%release
%description assistant
This package contains an documentation browser
for the Qt%major toolkit and Qt-based programs.
##############################################
%package -n lib%name-qsa
Summary: Qt Script for Applications (QSA)
Group: System/Libraries
Requires: %name-common = %version-%release
Conflicts: libqt3-qsa < 3.3.6-alt9
Conflicts: ananas-engine-qt <= 0.9.3-alt0.cvs20060528
%description -n lib%name-qsa
Qt Script for Applications is a framework which enables the
user to make Qt%major/C++ applications scriptable. The end users of the
Qt%major/C++ applications can modify and extend the application dynamically.
##############################################
%prep
%if %qt_copy
%define buildsubdir qt-copy-%version%beta
%else
%define buildsubdir %rname-x11-opensource-src-%version%beta
%endif
%setup -q -n %buildsubdir
%patch1 -p1
%patch40 -p0
%patch41 -p0
%patch42 -p0
%patch43 -p0
%patch44 -p0
%patch45 -p0
%patch46 -p0
%patch101 -p1
###%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
###%patch106 -p1
#%patch107 -p1
%patch108 -p1
#%patch109 -p1
%patch9000 -p1
%if %build_qsa
rm -rf qsa-x11*
tar xfz %SOURCE1
mv qsa-x11* qsa-x11
%endif
#pushd translations
#rm -f ./*.qm
#tar xfj SOURCE11
#popd
#perl -pi -e "s,-O2,%optflags -DGLX_GLXEXT_LEGACY,g" mkspecs/*/qmake.conf
subst "s|-O2||" mkspecs/*/qmake.conf
subst "s|-O2||" mkspecs/common/g++.conf
##perl -pi -e "s,-fpic,-fPIC,g" mkspecs/*/qmake.conf
#perl -pi -e "s|-Wl,-rpath,| |" mkspecs/*/qmake.conf
##perl -pi -e "s|^CFG_NEWABI=.*|CFG_NEWABI=yes|" ./configure
%if %debug
sed -i "s|^CFG_DEBUG=.*|CFG_DEBUG=yes|" ./configure
%else
sed -i "s|^CFG_DEBUG=.*|CFG_DEBUG=no|" ./configure
%endif
rm -rf tools/designer/examples
find . -type d -name CVS| xargs rm -rf
find . -type f -name .cvsignore | xargs rm -f
[ -f Makefile.cvs ] && make -f Makefile.cvs
%build
rm -rf %buildroot
# install %%optflags
subst "s|^\s*QMAKE_CFLAGS\s*=.*$|QMAKE_CFLAGS = %optflags -DGLX_GLXEXT_LEGACY|" mkspecs/*/qmake.conf
subst "s|^\s*QMAKE_CFLAGS\s*=.*$|QMAKE_CFLAGS = %optflags -DGLX_GLXEXT_LEGACY|" mkspecs/common/g++.conf
# versioning hack
grep -q "^\s*QMAKE_LFLAGS_SONAME\s*\+" src/corelib/corelib.pro \
|| echo "QMAKE_LFLAGS_SONAME += " >> src/corelib/corelib.pro
%if %versioning_hack
cat > src/corelib/corelib_add.map <<__EOF__
%if "%__gcc_version_base" == "4.0" || "%__gcc_version_base" == "4.1"
CXX3 {
%else
CXX%__gcc_version_major {
%endif
global:
extern "C++" {
QObject::QObject*;
QString::QString*;
};
};
__EOF__
sed -i 's|^\s*QMAKE_LFLAGS_SONAME\s*\+.*$|QMAKE_LFLAGS_SONAME += -Wl,--version-script=\$\$QT_BUILD_TREE/src/corelib/corelib_add.map|' src/corelib/corelib.pro
%else
sed -i 's|^\s*QMAKE_LFLAGS_SONAME\s*\+.*$|QMAKE_LFLAGS_SONAME += |' src/corelib/corelib.pro
%endif
#export QTDIR=$(`which pwd`)
#export PATH=$QTDIR/bin:$QTDIR/qmake:$PATH
#export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QT_DIR="$PWD"
export PATH=$QT_DIR/bin:$PATH
export LD_LIBRARY_PATH=$QT_DIR/lib:$LD_LIBRARY_PATH
export KDEDIR=%kdedir
export CFLAGS="%optflags" CXXFLAGS="%optflags"
# -L%qtdir/lib \
# -I%qtdir/include \
# -L%_libdir \
CNFGR="\
-L/usr/X11R6/%_lib \
-I%_includedir/pgsql/ -I%_includedir/mysql/ \
-I/usr/X11R6/include/X11/Xft -I/usr/include/fontconfig \
-prefix %qtdir \
-bindir %qtdir/bin \
-docdir %_datadir/%name/doc \
-headerdir %_includedir/%name \
-libdir %_libdir \
-translationdir %_datadir/%name/translations \
-plugindir %qtdir/plugins \
-sysconfdir %_sysconfdir/xdg \
-datadir %_datadir/%name \
-examplesdir %qtdir/examples \
-demosdir %qtdir/demos \
\
%if %debug
-debug \
%else
-release \
%endif
-no-separate-debug-info \
\
%ifarch x86_64
-platform linux-g++-64 \
%else
-platform linux-g++ \
%endif
-verbose \
-largefile -stl -fast -no-rpath -no-pch \
-no-exceptions -no-g++-exceptions \
\
-system-zlib -cups -system-nas-sound \
-no-nis -iconv -no-glib \
-accessibility \
%if %build_dbus
-qdbus \
%endif
\
-DQT_USE_APPROXIMATE_CURSORS \
-sm -xshape -xcursor -xinerama -xrender -xrandr -xkb \
-tablet -fontconfig \
\
-qt-gif \
-system-libpng -system-libjpeg -system-libmng"
CNFGR_STATIC=" -static \
-qt-sql-mysql -qt-sql-psql -qt-sql-sqlite -system-sqlite \
%if %build_sqlite2
-qt-sql-sqlite2 \
%endif
%if %build_odbc
-qt-sql-odbc \
%endif
"
CNFGR_SHARED=" -shared \
-plugin-sql-mysql -plugin-sql-psql -plugin-sql-sqlite \
%if %build_sqlite2
-plugin-sql-sqlite2 \
%endif
%if %build_odbc
-plugin-sql-odbc \
%endif
"
is_building=""
clean_but_lib()
{
[ -n "$is_building" ] || return
[ -n "$1" ] && dirsuffix="$1"
[ -n "$dirsuffix" ] || dirsuffix="builded"
mkdir -p lib-"$dirsuffix"
cp -ar lib/* lib-"$dirsuffix"
make confclean
rm -rf lib/*
}
# Build STATIC THREADED libraries #
%if %static_thread
QMAKE_PROJECTS="src" echo "yes" |./configure $CNFGR_STATIC $CNFGR
%make_build -C src
is_building=1
clean_but_lib
%endif #static_thread
# Build SHARED THREADED libraries #
%if %shared_thread
echo "yes" |./configure $CNFGR_SHARED $CNFGR
%make_build
%if %build_sqlite2
%make_build -C src/plugins/sqldrivers/sqlite2
%endif
# qsa
%if %build_qsa
pushd qsa-x11
subst "s|^SUBDIRS.*=.*|SUBDIRS = src|" ./qsa.pro
QTDIR=$QT_DIR ./configure
%make_build
popd
%endif
%endif #shared_thread
# compile translations
#LD_LIBRARY_PATH=./lib ./bin/lrelease ./translations/*.ts
#rm -f ./translations/*_untranslated.qm
%install
%if %debug
%set_strip_method none
%endif
# uninstall %%optflags
subst "s|^\s*QMAKE_CFLAGS\s*=.*$|QMAKE_CFLAGS = -pipe|" mkspecs/*/qmake.conf
subst "s|^\s*QMAKE_CFLAGS\s*=.*$|QMAKE_CFLAGS = -pipe|" mkspecs/common/g++.conf
export QTDIR=%qtdir
export QT_DIR="$PWD"
export PATH=$QT_DIR/bin:%buildroot/%qtdir/bin:$PATH
export MANPATH=%qtdir/doc/man:$MANPATH
export LD_LIBRARY_PATH=%buildroot/%qtdir/lib:$QT_DIR/lib:$LD_LIBRARY_PATH
export KDEDIR=%kdedir
%__install -d -m 0755 %buildroot/%_bindir
%__install -d -m 0755 %buildroot/%qtdir/plugins/codecs/
%make INSTALL_ROOT=%buildroot install
%if %build_sqlite2
%make INSTALL_ROOT=%buildroot install -C src/plugins/sqldrivers/sqlite2
%endif
# move docs do _docdir
mkdir -p %buildroot/%_docdir/
mv %buildroot/%_datadir/%name/doc %buildroot/%_docdir/%rname-%version
ln -s ../../..%_docdir/%rname-%version %buildroot/%_datadir/%name/doc
# install QSA
%if %build_qsa
# libs
install -m0755 %_builddir/%buildsubdir/lib/libqsa.so.%qsa_ver %buildroot/%_libdir
ln -sf libqsa.so.%qsa_ver %buildroot/%_libdir/libqsa.so
#ln -sf libqsa.so.%qsa_ver %buildroot/%_libdir/libqsa.so.%qsa_major
mkdir -p %buildroot/%qtdir/plugins/qsa
# includes
install -m0644 include/qs*.h %buildroot/%_includedir/%name/$f
# docs
mkdir -p %buildroot/%_docdir/qsa-%version/
install -m0644 qsa-x11/changes-%qsa_ver %buildroot/%_docdir/%rname-%version/qsa-changes-%qsa_ver
install -m0644 qsa-x11/README %buildroot/%_docdir/%rname-%version/qsa-README
>qsa-docs.list
pushd qsa-x11/doc/html
for f in `find qsa-x11/doc/html -type f`
do
if ! [ -e %buildroot/%_docdir/%rname-%version/$f ]
then
install -m0644 $f %buildroot/%_docdir/%rname-%version/html/$f
echo "%_docdir/%rname-%version/html/$f" >>../../../qsa-docs.list
fi
done
popd
pushd qsa-x11
tar jcf %buildroot/%_docdir/%rname-%version/qsa-examples.tar.bz2 examples/
popd
%endif
# install rpm macros
%__install -d -m 0755 %buildroot/%_sysconfdir/rpm/macros.d/
cat >%buildroot/%_sysconfdir/rpm/macros.d/%name <<__EOF__
%%_%{name}dir %qtdir
__EOF__
# install settings
%__install -d -m 0755 %buildroot/%_sysconfdir/xdg/
ln -s ../../../%_sysconfdir/xdg %buildroot/%qtdir/settings
# install tools
%__install -m 775 bin/findtr %buildroot/%qtdir/bin
pushd %buildroot/%_bindir
ln -s ../%_lib/%name/bin/designer designer-%name
ln -s ../%_lib/%name/bin/assistant assistant-%name
ln -s ../%_lib/%name/bin/linguist linguist-%name
ln -s ../%_lib/%name/bin/qtconfig qtconfig-%name
popd
# install libraries
#
%__mkdir_p %buildroot/%qtdir/lib
pushd %buildroot/%_libdir
for f in lib*.so.*; do
ln -s ../../$f %buildroot/%qtdir/lib/
[ -f $f ] \
&& ln -sf $f %buildroot/%qtdir/lib/`echo $f| sed "s|\(.*\.so\).*|\1|"`
done
popd
%if %static_thread
for f in lib-builded/lib*.a lib-builded/lib*.la; do
[ "`basename $f`" == "libQtUiTools.a" ] && continue
%__install -m0644 $f %buildroot/%qtdir/lib/
done
%endif
#
ln -s %name %buildroot/%_libdir/%rname-%version
# install translations
#install -m 644 ./translations/*.qm %buildroot/%qtdir/translations
%__mkdir_p %buildroot/%_datadir/%name/translations
ln -s ../../../%_datadir/%name/translations %buildroot/%qtdir/translations
%__mkdir_p %buildroot/%_datadir/%name/phrasebooks
ln -s ../../../%_datadir/%name/phrasebooks %buildroot/%qtdir/phrasebooks
# findlang
echo "%%defattr(644,root,root,755)" > %name.lang
for f in %buildroot/%_datadir/%name/translations/*.qm
do
LNG=`echo "$f"| sed "s|^.*qt_\(.*\)\..*$|\1|"`
FILE=%%_datadir/%name/translations/`basename "$f"`
echo "%%lang($LNG) $FILE" >>%name.lang
done
# move pkgconfig to right place
%__mkdir_p %buildroot/%_libdir/pkgconfig
for f in %buildroot/%_libdir/*.pc; do
%__mv $f %buildroot/%_libdir/pkgconfig/
done
sed -i "s|\(-L\${libdir}\)|-L%qtdir/lib \1|" %buildroot/%_libdir/pkgconfig/*.pc
# install includes
%__mkdir_p %buildroot/%_includedir/
%__ln_s ../../../%_includedir/%name %buildroot/%qtdir/include
# install designer templates
#install -d -m 0755 %buildroot/%qtdir/tools/designer/templates
#cp -fR tools/designer/templates/*.ui %buildroot/%qtdir/tools/designer/templates
# Ship qmake stuff
ln -s ../../../%_datadir/%name/mkspecs %buildroot/%qtdir/mkspecs
# fix lib*.so placement
subst "s|^\s*QMAKE_LIBDIR_QT\s*=.*$|QMAKE_LIBDIR_QT = %qtdir/lib|" %buildroot/%qtdir/mkspecs/*/qmake.conf
subst "s|^\s*QMAKE_LIBDIR_QT\s*=.*$|QMAKE_LIBDIR_QT = %qtdir/lib|" %buildroot/%qtdir/mkspecs/common/g++.conf
%if %versioning_hack
## fix QMAKE_LFLAGS_SONAME
#for f in %buildroot/%_datadir/%name/mkspecs/*/qmake.conf
#do
# subst "s|^.*QMAKE_LFLAGS_SONAME.*$|QMAKE_LFLAGS_SONAME = -Wl,-soname,|g" $f
#done
%endif
# install documentation
#install -d -m 0755 %buildroot/%_docdir/%rname-%version/doc/html
#%%if %qt_copy
#rm -rf doc/html/designer
#%%endif
#install -m 0644 doc/html/*.html %buildroot/%_docdir/%rname-%version/doc/html
# David - 3.0.0-0.11mdk - Install missing documentation
install -d -m 0755 %buildroot/%_docdir/%rname-%version/
#install -m 0644 %_builddir/%buildsubdir/ANNOUNCE %buildroot/%_docdir/%rname-%version/
cat > %buildroot/%_docdir/%rname-%version/LICENSE <<__EOF__
see QPL-1.0 and GPL-2 in %_datadir/license
__EOF__
#install -m 0644 %_builddir/%buildsubdir/PLATFORMS %buildroot/%_docdir/%rname-%version/
#install -m 0644 %_builddir/%buildsubdir/FAQ %buildroot/%_docdir/%rname-%version/
install -m 0644 %_builddir/%buildsubdir/README %buildroot/%_docdir/%rname-%version/
%if !%no_some_docs
install -m 0644 %_builddir/%buildsubdir/*.TXT %buildroot/%_docdir/%rname-%version/
%endif
%if !%qt_copy
%if !%no_some_docs
install -m 0644 %_builddir/%buildsubdir/changes* %buildroot/%_docdir/%rname-%version/
%endif
%endif
# Install a README
install -m 0644 %SOURCE8 %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at QT at |%name|g' %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at QTDIR at |%qtdir|g' %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at QtVersion at |%version|g' %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at PackageVersion at |%version-%release|g' %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at QTHOME at |~/.config/|g' %buildroot/%_docdir/%rname-%version/README.ALT
# wrap qt malloc
install -m 0644 %SOURCE12 %buildroot/%_docdir/%rname-%version/
# Install man pages
#install -d -m 0755 %buildroot/%_mandir/man1/
#for i in %_builddir/%buildsubdir/doc/man/man1/* ; do
# install -m 0644 $i %buildroot/%_mandir/man1/
#done
#pushd %buildroot/%_mandir/man1
# for i in $(find . -name \*.1);do
# mv -f $i ${i}qt%major%minor%bugfix
# done
#popd
#install -d -m 0755 %buildroot/%_mandir/man3/
#for i in %_builddir/%buildsubdir/doc/man/man3/* ; do
# install -m 0644 $i %buildroot/%_mandir/man3/
#done
#
#pushd %buildroot/%_mandir/
# for i in $(find . -name Q\*);do
# perl -pi -e 's|3qt|3qt%major%minor%bugfix|g' $i
# done
# for i in $(find . -name \*.3qt);do
# mv -f $i ${i}%major%minor%bugfix
# done
#popd
# David - 3.0.1-2mdk - Install .pri files needed to build examples and demos
install -d -m 0755 %buildroot/%qtdir/src/
for i in %_builddir/%buildsubdir/src/*.pri; do
install -m 0644 $i %buildroot/%qtdir/src/
done
# David - 3.0.0-0.11mdk - Provide a qmake.cache for examples
cp -pf %_builddir/%buildsubdir/.qmake.cache %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QT_SOURCE_TREE.*|QT_SOURCE_TREE = %qtdir|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QT_BUILD_TREE.*|QT_BUILD_TREE = %qtdir|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_MOC.*|QMAKE_MOC = %qtdir/bin/moc|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_UIC.*|QMAKE_UIC = %qtdir/bin/uic -L $$QT_BUILD_TREE/plugins|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_QMAKE.*|QMAKE_QMAKE = %qtdir/bin/qmake|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_MOC_SRC.*|QMAKE_MOC_SRC = %qtdir/src/moc|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_INCDIR_QT.*|QMAKE_INCDIR_QT = %qtdir/include|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_LIBDIR_QT.*|QMAKE_LIBDIR_QT = %qtdir/lib|" %_builddir/%buildsubdir/.qmake.cache.tmp
#perl -pi -e "s|^QMAKE_LIBDIR_FLAGS.*|QMAKE_LIBDIR_FLAGS += -lXinerama|" %_builddir/%buildsubdir/.qmake.cache.tmp
# examples and demos
for m in examples demos
do
cp -ar %_builddir/%buildsubdir/$m %buildroot/%_docdir/qt-%version
pushd %buildroot/%_docdir/%rname-%version/$m
cp -p %_builddir/%buildsubdir/.qmake.cache.tmp .qmake.cache
find -type f -name Makefile | \
while read f
do
%__subst "s|^\s*QMAKE\s=.*|QMAKE = %qtdir/bin/qmake|" $f
%__subst "s|../../../mkspecs/|%qtdir/mkspecs/|" $f
%__subst "s|../../mkspecs/|%qtdir/mkspecs/|" $f
%__subst "s|../mkspecs/|%qtdir/mkspecs/|" $f
%__subst "s|../.qmake.cache|.qmake.cache|" $f
%__subst "s|../../../include|%qtdir/include|" $f
%__subst "s|../../include|%qtdir/include|" $f
%__subst "s|%_builddir/%buildsubdir|%qtdir|" $f
done
cat README > README.tmp
echo "Before try to build one of these $m, you need to:" > README
echo "" >> README
echo "export QTDIR=\"%{qtdir}/\"" >> README
echo "" >> README
echo "" >> README
cat README.tmp >> README
rm -f README.tmp
popd
pushd %buildroot/%_docdir/%rname-%version/
tar jcf $m.tar.bz2 $m
rm -rf $m
popd
done
ln -s ../../../%_docdir/qt-%version %buildroot/%qtdir/doc
pushd %buildroot/%_datadir/%name/mkspecs/
rm -rf default
%ifarch x86_64
ln -sf linux-g++-64 default
%else
ln -sf linux-g++ default
%endif
popd
# Install .desktop files
install -d -m 0755 %buildroot/%_datadir/applications/
install -m 0644 %SOURCE21 %buildroot/%_datadir/applications/%name-assistant.desktop
install -m 0644 %SOURCE22 %buildroot/%_datadir/applications/%name-designer.desktop
install -m 0644 %SOURCE23 %buildroot/%_datadir/applications/%name-linguist.desktop
install -m 0644 %SOURCE24 %buildroot/%_datadir/applications/%name-qtconfig.desktop
# Icons
mkdir -p %buildroot/%_iconsdir/hicolor/{16x16,32x32,48x48}/apps
install -m 644 %SOURCE101 %buildroot/%_iconsdir/hicolor/16x16/apps/%rname.png
install -m 644 %SOURCE102 %buildroot/%_iconsdir/hicolor/32x32/apps/%rname.png
install -m 644 %SOURCE103 %buildroot/%_iconsdir/hicolor/48x48/apps/%rname.png
# Menus
install -d -m 0755 %buildroot/%_menudir/
%Md2m \
qt4-assistant \
Documentation \
%buildroot/%_datadir/applications/qt4-assistant.desktop \
%buildroot/%_menudir/qt4-assistant
%Md2m \
qt4-designer \
"Applications/Development/Development environments" \
%buildroot/%_datadir/applications/qt4-designer.desktop \
%buildroot/%_menudir/qt4-designer-designer
%Md2m \
qt4-designer \
Applications/Development/Tools \
%buildroot/%_datadir/applications/qt4-linguist.desktop \
%buildroot/%_menudir/qt4-designer-linguist
cat <<EOF > %buildroot/%_menudir/lib%name-qt3support
?package(lib%name-qt3support): \
needs=X11 \
title="Qt4 Configuration" \
section="Configuration/Other" \
longtitle="A configuration tool for Qt4" \
command="%_bindir/qtconfig-qt4" \
icon="%rname.png"
EOF
%post -n lib%name-qt3support
%post_ldconfig
%update_menus
%postun -n lib%name-qt3support
%postun_ldconfig
%clean_menus
%post -n lib%name-core
%post_ldconfig
%postun -n lib%name-core
%postun_ldconfig
%post -n lib%name-gui
%post_ldconfig
%postun -n lib%name-gui
%postun_ldconfig
%post -n lib%name-network
%post_ldconfig
%postun -n lib%name-network
%postun_ldconfig
%post -n lib%name-opengl
%post_ldconfig
%postun -n lib%name-opengl
%postun_ldconfig
%post -n lib%name-sql
%post_ldconfig
%postun -n lib%name-sql
%postun_ldconfig
%post -n lib%name-xml
%post_ldconfig
%postun -n lib%name-xml
%postun_ldconfig
%post -n lib%name-svg
%post_ldconfig
%postun -n lib%name-svg
%postun_ldconfig
%post -n lib%name-designer
%post_ldconfig
%postun -n lib%name-designer
%postun_ldconfig
%post -n lib%name-test
%post_ldconfig
%postun -n lib%name-test
%postun_ldconfig
%post -n lib%name-dbus
%post_ldconfig
%postun -n lib%name-dbus
%postun_ldconfig
%post -n lib%name-assistant
%post_ldconfig
%postun -n lib%name-assistant
%postun_ldconfig
%post -n lib%name-devel
%update_menus
%postun -n lib%name-devel
%clean_menus
%post assistant
%update_menus
%postun assistant
%clean_menus
%post designer
%update_menus
%postun designer
%clean_menus
%files
%files -n lib%name
%files sql
%files devel
%files common -f %name.lang
%dir %qtdir/bin
%dir %qtdir/
%dir %qtdir/lib/
%dir %_datadir/%name/
%dir %_datadir/%name/doc
%dir %qtdir/phrasebooks/
%dir %_datadir/%name/phrasebooks/
%dir %qtdir/translations/
%dir %_datadir/%name/translations/
#%_datadir/%name/translations/qt_*.qm
#%_datadir/%name/translations/qtconfig_*.qm
%dir %qtdir/plugins/
%dir %qtdir/plugins/codecs/
%dir %qtdir/plugins/sqldrivers/
%dir %qtdir/plugins/imageformats/
%dir %qtdir/plugins/inputmethods/
#%qtdir/plugins/styles
%qtdir/settings
%_libdir/%rname-%version
%_iconsdir/hicolor/*/apps/%rname.png
%dir %_docdir/%rname-%version/
%qtdir/doc
#
%qtdir/mkspecs/
%dir %_datadir/%name/mkspecs/
#
%dir %qtdir/src/
%files -n lib%{name}-qt3support
%qtdir/bin/qtconfig
%_bindir/qtconfig-%name
%qtdir/lib/libQt3Support.so.*
%_libdir/libQt3Support.so.*
%qtdir/plugins/accessible/libqtaccessiblecompatwidgets.*
%_datadir/applications/qt4-qtconfig.desktop
%_menudir/lib%name-qt3support
%files -n lib%{name}-core
%qtdir/lib/libQtCore.so.*
%_libdir/libQtCore.so.*
%files -n lib%{name}-gui
%qtdir/lib/libQtGui.so.*
%_libdir/libQtGui.so.*
#%qtdir/plugins/codecs/lib*.so
%qtdir/plugins/imageformats/libqjpeg.*
%qtdir/plugins/imageformats/libqgif.*
%qtdir/plugins/imageformats/libqmng.*
%qtdir/plugins/accessible/libqtaccessiblewidgets.*
%qtdir/plugins/inputmethods/libqimsw-*.*
%files -n lib%{name}-network
%qtdir/lib/libQtNetwork.so.*
%_libdir/libQtNetwork.so.*
%files -n lib%{name}-opengl
%qtdir/lib/libQtOpenGL.so.*
%_libdir/libQtOpenGL.so.*
%files -n lib%{name}-sql
%qtdir/lib/libQtSql.so.*
%_libdir/libQtSql.so.*
%files -n lib%{name}-xml
%qtdir/lib/libQtXml.so.*
%_libdir/libQtXml.so.*
%files -n lib%{name}-svg
%qtdir/lib/libQtSvg.so.*
%_libdir/libQtSvg.so.*
%files -n lib%{name}-designer
%qtdir/lib/libQtDesigner.so.*
%_libdir/libQtDesigner.so.*
%qtdir/lib/libQtDesignerComponents.so.*
%_libdir/libQtDesignerComponents.so.*
%if %build_dbus
%files -n lib%{name}-dbus
%qtdir/lib/libQtDBus.so.*
%_libdir/libQtDBus.so.*
%endif
%files -n lib%{name}-assistant
%qtdir/lib/libQtAssistantClient.so.*
%_libdir/libQtAssistantClient.so.*
%files -n lib%{name}-test
%qtdir/lib/libQtTest.so.*
%_libdir/libQtTest.so.*
%if %build_qsa
%files -n lib%{name}-qsa
%doc %_docdir/%rname-%version/qsa-*
#%doc %_docdir/qsa-%version/RELEASENOTES
%qtdir/lib/libqsa.so.*
%_libdir/libqsa.so.*
%qtdir/plugins/qsa
%endif
%files -n lib%name-devel
#%doc %_docdir/%rname-%version/ANNOUNCE
#%doc %_docdir/%rname-%version/FAQ
%doc %_docdir/%rname-%version/LICENSE
#%doc %_docdir/%rname-%version/PLATFORMS
%doc %_docdir/%rname-%version/README*
%doc %_docdir/%rname-%version/wrap_kde_malloc.cpp
%if !%no_some_docs
%doc %_docdir/%rname-%version/OPENSOURCE-NOTICE.TXT
%endif
%if !%qt_copy
%if !%no_some_docs
%doc %_docdir/%rname-%version/changes*
%endif
%endif
#
%qtdir/bin/findtr
%qtdir/bin/moc
%qtdir/bin/rcc
%qtdir/bin/uic
%qtdir/bin/uic3
%qtdir/bin/lrelease
%qtdir/bin/lupdate
#%qtdir/bin/qm2ts
%qtdir/bin/qt3to4
%qtdir/bin/qmake
#
%_includedir/%name/
%qtdir/include/
%qtdir/lib/*.so
%_libdir/*.so
%_libdir/libQtUiTools.a
#
%_datadir/%name/mkspecs/common
%_datadir/%name/mkspecs/features
%_datadir/%name/mkspecs/default
%_datadir/%name/mkspecs/*linux*
#
%qtdir/src/*
%_datadir/%name/q3porting.xml
#
%_libdir/pkgconfig/*.pc
#
%_sysconfdir/rpm/macros.d/%name
%files designer
%_bindir/designer*
%_bindir/linguist*
#
%_datadir/%name/phrasebooks/*.qph
#%_datadir/%name/translations/designer_*.qm
#%_datadir/%name/translations/linguist_*.qm
#
%dir %qtdir/plugins/designer
%qtdir/plugins/designer/*
%qtdir/bin/designer*
%qtdir/bin/linguist*
#
%_datadir/applications/%name-linguist.desktop
%_datadir/applications/%name-designer.desktop
%_menudir/qt4-designer*
%if %build_odbc
%files -n lib%name-sql-odbc
%qtdir/plugins/sqldrivers/libqsqlodbc.*
%endif
%files -n lib%name-sql-postgresql
%qtdir/plugins/sqldrivers/libqsqlpsql.*
%files -n lib%name-sql-mysql
%qtdir/plugins/sqldrivers/libqsqlmysql.*
%files -n lib%name-sql-sqlite
%qtdir/plugins/sqldrivers/libqsqlite.*
%if %build_sqlite2
%files -n lib%name-sql-sqlite2
%qtdir/plugins/sqldrivers/libqsqlite2.*
%endif
%files assistant
%_bindir/assistant-%name
%qtdir/bin/assistant
#%_datadir/%name/translations/assistant_*.qm
%_datadir/applications/%name-assistant.desktop
%_menudir/qt4-assistant
%files doc
%files doc-html
%dir %_docdir/%rname-%version/html/
%doc %_docdir/%rname-%version/html/*
%files doc-examples
%doc %_docdir/%rname-%version/*.bz2
#%files doc-man
#%doc %_mandir/man1/*
#%doc %_mandir/man3/*
%files -n lib%name-devel-static
%qtdir/lib/lib*.a
%qtdir/lib/lib*.la
%changelog
…
Полный changelog можно просмотреть здесь
%define qIF_ver_gt() %if "%(rpmvercmp '%1' '%2')" == "1"
%define qIF_ver_gteq() %if "%(rpmvercmp '%1' '%2')" != "-1"
%define qIF_ver_lt() %if "%(rpmvercmp '%2' '%1')" == "1"
%define qIF_ver_lteq() %if "%(rpmvercmp '%2' '%1')" != "-1"
%define debug 0
%define qt_copy 0
%define building 0
%define _keep_libtool_files 1
%define _optlevel s
%define static_thread 1
%define shared_thread 1
%define build_odbc 1
%define build_sqlite2 1
%define build_qsa 1
%define build_dbus 0
%define dbus_version %{get_version libdbus}
%qIF_ver_lt "%dbus_version" "0.62"
%define build_dbus 0
%endif
%define versioning_hack 1
%define no_some_docs 0
# Versions
%define rname qt
%define major 4
%define minor 2
%define bugfix 1
%define beta %nil
%define qsa_major 1
%define qsa_minor 2
%define qsa_bugfix 1
%define rlz alt1
Name: %rname%major
Version: %major.%minor.%bugfix
Release: alt0.M24.1
%define qsa_ver %qsa_major.%qsa_minor.%qsa_bugfix
%define qtdir %_libdir/%name
%define kdedir %prefix
%add_findprov_lib_path %qtdir/lib
Group: System/Libraries
Summary: Shared library for the Qt%major GUI toolkit
Url: http://www.trolltech.com/products/qt/
License: GPL & QPL
Requires: %name-doc %name-sql lib%name %name-assistant
%if %qt_copy
Source0: qt-copy-%version%beta.tar.bz2
%else
Source0: ftp://ftp.trolltech.com/qt/source/%rname-x11-opensource-src-%version%beta.tar.gz
%endif
%if %build_qsa
Source1: qsa-x11-opensource-%qsa_ver.tar.gz
%endif
#
Source8: qtX-README.ALT
#Source11: qt-ru-3.3.2-20040604.tar.bz2
Source12: wrap_kde_malloc.cpp
#
Source21: qt4-assistant.desktop
Source22: qt4-designer.desktop
Source23: qt4-linguist.desktop
Source24: qt4-qtconfig.desktop
Source101: %rname.16.png
Source102: %rname.32.png
Source103: %rname.48.png
# FC
Patch1: qt-4.0.1-sans-mono.patch
# Qt-copy
Patch40: 0118-qtcopy-define.diff
Patch41: 0141-cursorCharFormat.diff
Patch42: 0142-uic3-wordWrapAttribute.diff
Patch43: 0144-qpixmap-setmask.diff
Patch44: 0145-qabstractitemview-dropindicator.diff
Patch45: 0146-rasterpaint-qbrush-image.diff
Patch46: 0147-qbrush-detach-transform.diff
# ALT
# by raorn at altlinux
Patch101: qt-4.1.3-alt-honor-SUSv3-locales.patch
Patch102: qt-4.1.1-alt-sqlite.patch
Patch103: qt-4.0.1-alt-assistant-location.patch
Patch104: qt-4.2.0-rc1-alt-fix-gl-loading.patch
Patch105: qt-4.0.1-alt-iso_c_extension.patch
Patch106: qt-4.1.0-alt-dont-build-extra.patch
Patch107: qt-4.0.1-alt-visibility.patch
Patch108: qt-4.1.0-alt-buildkey-nomachine.patch
Patch109: qt-4.1.3-alt-compile-with-old-mysql.patch
#
# Sergey A. Sukiyazov <sukiyazov at mail.ru>
Patch9000: qt-4.0.1-qmenubar-key_f10.patch
# Automatically added by buildreq on Wed Sep 04 2002
#BuildRequires: XFree86-devel XFree86-libs freetype2-devel gcc-c++ libMySQL-devel libcups-devel libjpeg-devel liblcms libmng-devel libpng-devel libssl libstdc++-devel libunixODBC-devel postgresql-devel postgresql-libs zlib-devel
BuildRequires: XFree86-devel freetype2-devel pkgconfig rpm-utils
BuildRequires: libcups-devel libssl libcups-devel
BuildRequires: libbeecrypt liblcms gcc-c++ libstdc++-devel
BuildRequires: libjpeg-devel libmng-devel libpng-devel zlib-devel
BuildRequires: postgresql-devel libpq3-devel libMySQL-devel
BuildRequires: libsqlite3-devel libGLU-devel
%if %build_dbus
BuildPreReq: libdbus-devel
%endif
BuildRequires: bison libaudio-devel pkgconfig
BuildRequires: fontconfig-devel menu-devel
%if %build_sqlite2
BuildRequires: sqlite-devel
%endif
%if %build_odbc
BuildRequires: libunixODBC-devel
%endif
# BuildRequires: rpm-build-compat >= 0.4
%description
Qt is a GUI software toolkit. Qt simplifies the task of writing and maintaining
GUI (graphical user interface) applications for the X Windows system.
It has everything you need to create professional GUI applications.
And it enables you to create them quickly.
Qt is multi-platform toolkit written in C++ and is fully object-oriented.
This package contains the shared library needed to run Qt%major applications, as
well as the README files for Qt.
##############################################
%package common
Summary: Common package for Qt%major
Group: System/Libraries
Requires: common-licenses
%description common
Common package for Qt%major
##############################################
%package -n lib%name
Summary: Shared library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: lib%{name}-core lib%{name}-gui lib%{name}-network
Requires: lib%{name}-opengl
Requires: lib%{name}-sql lib%{name}-xml
Requires: lib%{name}-qt3support lib%{name}-svg
Requires: lib%{name}-designer lib%{name}-assistant
%if %build_dbus
Requires: lib%{name}-dbus
%endif
%if %build_qsa
Requires: lib%{name}-qsa
%endif
%description -n lib%name
Qt is a GUI software toolkit. Qt simplifies the task of writing and maintaining
GUI (graphical user interface) applications for X Windows System.
Qt is written in C++ and is fully object-oriented. It has everything you need
to create professional GUI applications. And it enables you to create them
quickly.
Qt is a multi-platform toolkit. When developing software with Qt, you can run
it on the X Window System (Unix/X11) or Microsoft Windows NT and Windows 95/98
or framebuffer devices.
Simply recompile your source code on the platform you want.
This package contains the shared library needed to run Qt%major applications, as
well as the README files for Qt.
##############################################
%package -n lib%{name}-qt3support
Summary: Qt3 support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-qt3support
Qt3 support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-core
Summary: Core library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
Requires: %name-settings = %major.%minor
%description -n lib%{name}-core
Core library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-gui
Summary: GUI support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-gui
GUI support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-dbus
Summary: DBus support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-dbus
DBus support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-network
Summary: Network support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-network
Network support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-svg
Summary: SVG support for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-svg
Support for rendering Scalable Vector Graphics (SVG)
drawings and animations for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-opengl
Summary: OpenGL support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-opengl
OpenGL support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-sql
Summary: SQL support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-sql
SQL support library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-test
Summary: Unit Testing Library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-test
Unit Testing Library for the Qt%major GUI toolkit
##############################################
%package -n lib%{name}-designer
Summary: Libraries for the Qt%major Designer
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-designer
Libraries for the Qt%major Designer
##############################################
%package -n lib%{name}-assistant
Summary: Qt%major Assistant support library
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-assistant
Qt%major Assistant support library
##############################################
%package -n lib%{name}-xml
Summary: XML support library for the Qt%major GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%{name}-xml
XML support library for the Qt%major GUI toolkit
##############################################
%package devel
Group: System/Libraries
Summary: Amount package for development with Qt%major GUI toolkit
Requires: lib%name-devel %name-doc %name-designer %name-assistant
%description devel
Amount package for development with Qt%major GUI toolkit
##############################################
%package -n lib%name-devel
Summary: Header files and libraries for developing apps which will use Qt%major
Group: Development/KDE and QT
Requires: %name-common = %version-%release
Requires: lib%name
Requires: XFree86-devel freetype2-devel fontconfig-devel libpng-devel
Requires: libaudio-devel zlib-devel
Requires: lib%{name}-test
%if %build_dbus
Requires: libdbus-devel
%endif
Provides: lib%name-devel-cxx = %__gcc_version_base
%description -n lib%name-devel
Qt is a GUI software toolkit. Qt simplifies the task of writing and maintaining
GUI (graphical user interface) applications for X Windows.
Qt is written in C++ and is fully object-oriented. It has everything you need
to create professional GUI applications. And it enables you to create them
quickly.
Qt is a multi-platform toolkit. When developing software with Qt, you can run
it on the X Window System (Unix/X11) or Microsoft Windows NT and Windows 95/98.
Simply recompile your source code on the platform you want.
This package contains the files necessary to develop applications
##############################################
%package -n lib%name-devel-static
Summary: Version of the Qt GUI toolkit for static linking
Group: Development/KDE and QT
Requires: %name-common = %version-%release
Requires: lib%name-devel
Obsoletes: %name-devel-static
%description -n lib%name-devel-static
This package package contains the files necessary to link applications
to the Qt GUI toolkit statically (rather than dynamically).
Statically linked applications don't require the library to be installed
on the system running the application.
##############################################
%package designer
Summary: Designer for the Qt%major
Group: Development/KDE and QT
Requires: %name-common = %version-%release
Requires: lib%name-devel
%description designer
The package contains an User Interface designer
tool for the Qt%major toolkit.
##############################################
%package -n lib%name-styles
Summary: Extra styles for the Qt GUI toolkit
Group: System/Libraries
Requires: %name-common = %version-%release
%description -n lib%name-styles
Extra styles (themes) for the Qt GUI toolkit.
##############################################
%package sql
Group: System/Libraries
Summary: Amount package for SQL support of Qt%major GUI toolkit
Requires: lib%name-sql lib%name-sql-mysql
Requires: lib%name-sql-postgresql lib%name-sql-sqlite
%if %build_sqlite2
Requires: lib%name-sql-sqlite2
%endif
%if %build_odbc
Requires: lib%name-sql-odbc
%endif
%description sql
Amount package for SQL support of Qt%major GUI toolkit
##############################################
%package -n lib%name-sql-odbc
Summary: ODBC drivers for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-odbc
ODBC driver for Qt's SQL classes (QODBC)
##############################################
%package -n lib%name-sql-mysql
Summary: MySQL driver for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-mysql
MySQL driver for Qt's SQL classes (QMYSQL)
##############################################
%package -n lib%name-sql-postgresql
Summary: PostgreSQL drivers for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-postgresql
PostgreSQL driver for Qt's SQL classes (QPSQL)
##############################################
%package -n lib%name-sql-sqlite
Summary: SQLite driver for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-sqlite
SQLite driver for Qt's SQL classes (QSQLITE)
##############################################
%package -n lib%name-sql-sqlite2
Summary: SQLite2 driver for Qt%major SQL classes
Group: System/Libraries
Requires: %name-common = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-sqlite2
SQLite2 driver for Qt's SQL classes (QSQLITE2)
##############################################
%package doc
Summary: Document for developing apps which will use Qt%{major}
Group: Development/KDE and QT
Requires: %name-common = %version
#Requires: lib%name-devel = %version
Requires: %name-assistant = %version
Requires: %name-doc-html = %version
#Requires: %name-doc-man = %version
Requires: %name-doc-examples = %version
%description doc
This package contains documentation and sources for example programs.
##############################################
%package doc-html
Summary: Document for developing apps which will use Qt%{major}
Group: Development/KDE and QT
Requires: %name-common = %version
%description doc-html
This package contains documentation in html format.
##############################################
%package doc-man
Summary: Document for developing apps which will use Qt%{major}
Group: Development/KDE and QT
Requires: %name-common = %version
%description doc-man
This package contains documentation in man format.
##############################################
%package doc-examples
Summary: Examples for developing apps which will use Qt%{major}
Group: Development/KDE and QT
Requires: %name-common = %version
%description doc-examples
This package contains sources for example programs.
##############################################
%package assistant
Summary: Assistant for the Qt%major
Group: Text tools
Requires: %name-common = %version-%release
%description assistant
This package contains an documentation browser
for the Qt%major toolkit and Qt-based programs.
##############################################
%package -n lib%name-qsa
Summary: Qt Script for Applications (QSA)
Group: System/Libraries
Requires: %name-common = %version-%release
Conflicts: libqt3-qsa < 3.3.6-alt9
Conflicts: ananas-engine-qt <= 0.9.3-alt0.cvs20060528
%description -n lib%name-qsa
Qt Script for Applications is a framework which enables the
user to make Qt%major/C++ applications scriptable. The end users of the
Qt%major/C++ applications can modify and extend the application dynamically.
##############################################
%prep
%if %qt_copy
%define buildsubdir qt-copy-%version%beta
%else
%define buildsubdir %rname-x11-opensource-src-%version%beta
%endif
%setup -q -n %buildsubdir
%patch1 -p1
%patch40 -p0
%patch41 -p0
%patch42 -p0
%patch43 -p0
%patch44 -p0
%patch45 -p0
%patch46 -p0
%patch101 -p1
###%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
###%patch106 -p1
#%patch107 -p1
%patch108 -p1
#%patch109 -p1
%patch9000 -p1
%if %build_qsa
rm -rf qsa-x11*
tar xfz %SOURCE1
mv qsa-x11* qsa-x11
%endif
#pushd translations
#rm -f ./*.qm
#tar xfj SOURCE11
#popd
#perl -pi -e "s,-O2,%optflags -DGLX_GLXEXT_LEGACY,g" mkspecs/*/qmake.conf
subst "s|-O2||" mkspecs/*/qmake.conf
subst "s|-O2||" mkspecs/common/g++.conf
##perl -pi -e "s,-fpic,-fPIC,g" mkspecs/*/qmake.conf
#perl -pi -e "s|-Wl,-rpath,| |" mkspecs/*/qmake.conf
##perl -pi -e "s|^CFG_NEWABI=.*|CFG_NEWABI=yes|" ./configure
%if %debug
sed -i "s|^CFG_DEBUG=.*|CFG_DEBUG=yes|" ./configure
%else
sed -i "s|^CFG_DEBUG=.*|CFG_DEBUG=no|" ./configure
%endif
rm -rf tools/designer/examples
find . -type d -name CVS| xargs rm -rf
find . -type f -name .cvsignore | xargs rm -f
[ -f Makefile.cvs ] && make -f Makefile.cvs
%build
rm -rf %buildroot
# install %%optflags
subst "s|^\s*QMAKE_CFLAGS\s*=.*$|QMAKE_CFLAGS = %optflags -DGLX_GLXEXT_LEGACY|" mkspecs/*/qmake.conf
subst "s|^\s*QMAKE_CFLAGS\s*=.*$|QMAKE_CFLAGS = %optflags -DGLX_GLXEXT_LEGACY|" mkspecs/common/g++.conf
# versioning hack
grep -q "^\s*QMAKE_LFLAGS_SONAME\s*\+" src/corelib/corelib.pro \
|| echo "QMAKE_LFLAGS_SONAME += " >> src/corelib/corelib.pro
%if %versioning_hack
cat > src/corelib/corelib_add.map <<__EOF__
%if "%__gcc_version_base" == "4.0" || "%__gcc_version_base" == "4.1"
CXX3 {
%else
CXX%__gcc_version_major {
%endif
global:
extern "C++" {
QObject::QObject*;
QString::QString*;
};
};
__EOF__
sed -i 's|^\s*QMAKE_LFLAGS_SONAME\s*\+.*$|QMAKE_LFLAGS_SONAME += -Wl,--version-script=\$\$QT_BUILD_TREE/src/corelib/corelib_add.map|' src/corelib/corelib.pro
%else
sed -i 's|^\s*QMAKE_LFLAGS_SONAME\s*\+.*$|QMAKE_LFLAGS_SONAME += |' src/corelib/corelib.pro
%endif
#export QTDIR=$(`which pwd`)
#export PATH=$QTDIR/bin:$QTDIR/qmake:$PATH
#export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QT_DIR="$PWD"
export PATH=$QT_DIR/bin:$PATH
export LD_LIBRARY_PATH=$QT_DIR/lib:$LD_LIBRARY_PATH
export KDEDIR=%kdedir
export CFLAGS="%optflags" CXXFLAGS="%optflags"
# -L%qtdir/lib \
# -I%qtdir/include \
# -L%_libdir \
CNFGR="\
-L/usr/X11R6/%_lib \
-I%_includedir/pgsql/ -I%_includedir/mysql/ \
-I/usr/X11R6/include/X11/Xft -I/usr/include/fontconfig \
-prefix %qtdir \
-bindir %qtdir/bin \
-docdir %_datadir/%name/doc \
-headerdir %_includedir/%name \
-libdir %_libdir \
-translationdir %_datadir/%name/translations \
-plugindir %qtdir/plugins \
-sysconfdir %_sysconfdir/xdg \
-datadir %_datadir/%name \
-examplesdir %qtdir/examples \
-demosdir %qtdir/demos \
\
%if %debug
-debug \
%else
-release \
%endif
-no-separate-debug-info \
\
%ifarch x86_64
-platform linux-g++-64 \
%else
-platform linux-g++ \
%endif
-verbose \
-largefile -stl -fast -no-rpath -no-pch \
-no-exceptions -no-g++-exceptions \
\
-system-zlib -cups -system-nas-sound \
-no-nis -iconv -no-glib \
-accessibility \
%if %build_dbus
-qdbus \
%endif
\
-DQT_USE_APPROXIMATE_CURSORS \
-sm -xshape -xcursor -xinerama -xrender -xrandr -xkb \
-tablet -fontconfig \
\
-qt-gif \
-system-libpng -system-libjpeg -system-libmng"
CNFGR_STATIC=" -static \
-qt-sql-mysql -qt-sql-psql -qt-sql-sqlite -system-sqlite \
%if %build_sqlite2
-qt-sql-sqlite2 \
%endif
%if %build_odbc
-qt-sql-odbc \
%endif
"
CNFGR_SHARED=" -shared \
-plugin-sql-mysql -plugin-sql-psql -plugin-sql-sqlite \
%if %build_sqlite2
-plugin-sql-sqlite2 \
%endif
%if %build_odbc
-plugin-sql-odbc \
%endif
"
is_building=""
clean_but_lib()
{
[ -n "$is_building" ] || return
[ -n "$1" ] && dirsuffix="$1"
[ -n "$dirsuffix" ] || dirsuffix="builded"
mkdir -p lib-"$dirsuffix"
cp -ar lib/* lib-"$dirsuffix"
make confclean
rm -rf lib/*
}
# Build STATIC THREADED libraries #
%if %static_thread
QMAKE_PROJECTS="src" echo "yes" |./configure $CNFGR_STATIC $CNFGR
%make_build -C src
is_building=1
clean_but_lib
%endif #static_thread
# Build SHARED THREADED libraries #
%if %shared_thread
echo "yes" |./configure $CNFGR_SHARED $CNFGR
%make_build
%if %build_sqlite2
%make_build -C src/plugins/sqldrivers/sqlite2
%endif
# qsa
%if %build_qsa
pushd qsa-x11
subst "s|^SUBDIRS.*=.*|SUBDIRS = src|" ./qsa.pro
QTDIR=$QT_DIR ./configure
%make_build
popd
%endif
%endif #shared_thread
# compile translations
#LD_LIBRARY_PATH=./lib ./bin/lrelease ./translations/*.ts
#rm -f ./translations/*_untranslated.qm
%install
%if %debug
%set_strip_method none
%endif
# uninstall %%optflags
subst "s|^\s*QMAKE_CFLAGS\s*=.*$|QMAKE_CFLAGS = -pipe|" mkspecs/*/qmake.conf
subst "s|^\s*QMAKE_CFLAGS\s*=.*$|QMAKE_CFLAGS = -pipe|" mkspecs/common/g++.conf
export QTDIR=%qtdir
export QT_DIR="$PWD"
export PATH=$QT_DIR/bin:%buildroot/%qtdir/bin:$PATH
export MANPATH=%qtdir/doc/man:$MANPATH
export LD_LIBRARY_PATH=%buildroot/%qtdir/lib:$QT_DIR/lib:$LD_LIBRARY_PATH
export KDEDIR=%kdedir
%__install -d -m 0755 %buildroot/%_bindir
%__install -d -m 0755 %buildroot/%qtdir/plugins/codecs/
%make INSTALL_ROOT=%buildroot install
%if %build_sqlite2
%make INSTALL_ROOT=%buildroot install -C src/plugins/sqldrivers/sqlite2
%endif
# move docs do _docdir
mkdir -p %buildroot/%_docdir/
mv %buildroot/%_datadir/%name/doc %buildroot/%_docdir/%rname-%version
ln -s ../../..%_docdir/%rname-%version %buildroot/%_datadir/%name/doc
# install QSA
%if %build_qsa
# libs
install -m0755 %_builddir/%buildsubdir/lib/libqsa.so.%qsa_ver %buildroot/%_libdir
ln -sf libqsa.so.%qsa_ver %buildroot/%_libdir/libqsa.so
#ln -sf libqsa.so.%qsa_ver %buildroot/%_libdir/libqsa.so.%qsa_major
mkdir -p %buildroot/%qtdir/plugins/qsa
# includes
install -m0644 include/qs*.h %buildroot/%_includedir/%name/$f
# docs
mkdir -p %buildroot/%_docdir/qsa-%version/
install -m0644 qsa-x11/changes-%qsa_ver %buildroot/%_docdir/%rname-%version/qsa-changes-%qsa_ver
install -m0644 qsa-x11/README %buildroot/%_docdir/%rname-%version/qsa-README
>qsa-docs.list
pushd qsa-x11/doc/html
for f in `find qsa-x11/doc/html -type f`
do
if ! [ -e %buildroot/%_docdir/%rname-%version/$f ]
then
install -m0644 $f %buildroot/%_docdir/%rname-%version/html/$f
echo "%_docdir/%rname-%version/html/$f" >>../../../qsa-docs.list
fi
done
popd
pushd qsa-x11
tar jcf %buildroot/%_docdir/%rname-%version/qsa-examples.tar.bz2 examples/
popd
%endif
# install rpm macros
%__install -d -m 0755 %buildroot/%_sysconfdir/rpm/macros.d/
cat >%buildroot/%_sysconfdir/rpm/macros.d/%name <<__EOF__
%%_%{name}dir %qtdir
__EOF__
# install settings
%__install -d -m 0755 %buildroot/%_sysconfdir/xdg/
ln -s ../../../%_sysconfdir/xdg %buildroot/%qtdir/settings
# install tools
%__install -m 775 bin/findtr %buildroot/%qtdir/bin
pushd %buildroot/%_bindir
ln -s ../%_lib/%name/bin/designer designer-%name
ln -s ../%_lib/%name/bin/assistant assistant-%name
ln -s ../%_lib/%name/bin/linguist linguist-%name
ln -s ../%_lib/%name/bin/qtconfig qtconfig-%name
popd
# install libraries
#
%__mkdir_p %buildroot/%qtdir/lib
pushd %buildroot/%_libdir
for f in lib*.so.*; do
ln -s ../../$f %buildroot/%qtdir/lib/
[ -f $f ] \
&& ln -sf $f %buildroot/%qtdir/lib/`echo $f| sed "s|\(.*\.so\).*|\1|"`
done
popd
%if %static_thread
for f in lib-builded/lib*.a lib-builded/lib*.la; do
[ "`basename $f`" == "libQtUiTools.a" ] && continue
%__install -m0644 $f %buildroot/%qtdir/lib/
done
%endif
#
ln -s %name %buildroot/%_libdir/%rname-%version
# install translations
#install -m 644 ./translations/*.qm %buildroot/%qtdir/translations
%__mkdir_p %buildroot/%_datadir/%name/translations
ln -s ../../../%_datadir/%name/translations %buildroot/%qtdir/translations
%__mkdir_p %buildroot/%_datadir/%name/phrasebooks
ln -s ../../../%_datadir/%name/phrasebooks %buildroot/%qtdir/phrasebooks
# findlang
echo "%%defattr(644,root,root,755)" > %name.lang
for f in %buildroot/%_datadir/%name/translations/*.qm
do
LNG=`echo "$f"| sed "s|^.*qt_\(.*\)\..*$|\1|"`
FILE=%%_datadir/%name/translations/`basename "$f"`
echo "%%lang($LNG) $FILE" >>%name.lang
done
# move pkgconfig to right place
%__mkdir_p %buildroot/%_libdir/pkgconfig
for f in %buildroot/%_libdir/*.pc; do
%__mv $f %buildroot/%_libdir/pkgconfig/
done
sed -i "s|\(-L\${libdir}\)|-L%qtdir/lib \1|" %buildroot/%_libdir/pkgconfig/*.pc
# install includes
%__mkdir_p %buildroot/%_includedir/
%__ln_s ../../../%_includedir/%name %buildroot/%qtdir/include
# install designer templates
#install -d -m 0755 %buildroot/%qtdir/tools/designer/templates
#cp -fR tools/designer/templates/*.ui %buildroot/%qtdir/tools/designer/templates
# Ship qmake stuff
ln -s ../../../%_datadir/%name/mkspecs %buildroot/%qtdir/mkspecs
# fix lib*.so placement
subst "s|^\s*QMAKE_LIBDIR_QT\s*=.*$|QMAKE_LIBDIR_QT = %qtdir/lib|" %buildroot/%qtdir/mkspecs/*/qmake.conf
subst "s|^\s*QMAKE_LIBDIR_QT\s*=.*$|QMAKE_LIBDIR_QT = %qtdir/lib|" %buildroot/%qtdir/mkspecs/common/g++.conf
%if %versioning_hack
## fix QMAKE_LFLAGS_SONAME
#for f in %buildroot/%_datadir/%name/mkspecs/*/qmake.conf
#do
# subst "s|^.*QMAKE_LFLAGS_SONAME.*$|QMAKE_LFLAGS_SONAME = -Wl,-soname,|g" $f
#done
%endif
# install documentation
#install -d -m 0755 %buildroot/%_docdir/%rname-%version/doc/html
#%%if %qt_copy
#rm -rf doc/html/designer
#%%endif
#install -m 0644 doc/html/*.html %buildroot/%_docdir/%rname-%version/doc/html
# David - 3.0.0-0.11mdk - Install missing documentation
install -d -m 0755 %buildroot/%_docdir/%rname-%version/
#install -m 0644 %_builddir/%buildsubdir/ANNOUNCE %buildroot/%_docdir/%rname-%version/
cat > %buildroot/%_docdir/%rname-%version/LICENSE <<__EOF__
see QPL-1.0 and GPL-2 in %_datadir/license
__EOF__
#install -m 0644 %_builddir/%buildsubdir/PLATFORMS %buildroot/%_docdir/%rname-%version/
#install -m 0644 %_builddir/%buildsubdir/FAQ %buildroot/%_docdir/%rname-%version/
install -m 0644 %_builddir/%buildsubdir/README %buildroot/%_docdir/%rname-%version/
%if !%no_some_docs
install -m 0644 %_builddir/%buildsubdir/*.TXT %buildroot/%_docdir/%rname-%version/
%endif
%if !%qt_copy
%if !%no_some_docs
install -m 0644 %_builddir/%buildsubdir/changes* %buildroot/%_docdir/%rname-%version/
%endif
%endif
# Install a README
install -m 0644 %SOURCE8 %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at QT at |%name|g' %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at QTDIR at |%qtdir|g' %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at QtVersion at |%version|g' %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at PackageVersion at |%version-%release|g' %buildroot/%_docdir/%rname-%version/README.ALT
%__subst 's| at QTHOME at |~/.config/|g' %buildroot/%_docdir/%rname-%version/README.ALT
# wrap qt malloc
install -m 0644 %SOURCE12 %buildroot/%_docdir/%rname-%version/
# Install man pages
#install -d -m 0755 %buildroot/%_mandir/man1/
#for i in %_builddir/%buildsubdir/doc/man/man1/* ; do
# install -m 0644 $i %buildroot/%_mandir/man1/
#done
#pushd %buildroot/%_mandir/man1
# for i in $(find . -name \*.1);do
# mv -f $i ${i}qt%major%minor%bugfix
# done
#popd
#install -d -m 0755 %buildroot/%_mandir/man3/
#for i in %_builddir/%buildsubdir/doc/man/man3/* ; do
# install -m 0644 $i %buildroot/%_mandir/man3/
#done
#
#pushd %buildroot/%_mandir/
# for i in $(find . -name Q\*);do
# perl -pi -e 's|3qt|3qt%major%minor%bugfix|g' $i
# done
# for i in $(find . -name \*.3qt);do
# mv -f $i ${i}%major%minor%bugfix
# done
#popd
# David - 3.0.1-2mdk - Install .pri files needed to build examples and demos
install -d -m 0755 %buildroot/%qtdir/src/
for i in %_builddir/%buildsubdir/src/*.pri; do
install -m 0644 $i %buildroot/%qtdir/src/
done
# David - 3.0.0-0.11mdk - Provide a qmake.cache for examples
cp -pf %_builddir/%buildsubdir/.qmake.cache %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QT_SOURCE_TREE.*|QT_SOURCE_TREE = %qtdir|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QT_BUILD_TREE.*|QT_BUILD_TREE = %qtdir|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_MOC.*|QMAKE_MOC = %qtdir/bin/moc|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_UIC.*|QMAKE_UIC = %qtdir/bin/uic -L $$QT_BUILD_TREE/plugins|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_QMAKE.*|QMAKE_QMAKE = %qtdir/bin/qmake|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_MOC_SRC.*|QMAKE_MOC_SRC = %qtdir/src/moc|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_INCDIR_QT.*|QMAKE_INCDIR_QT = %qtdir/include|" %_builddir/%buildsubdir/.qmake.cache.tmp
perl -pi -e "s|^QMAKE_LIBDIR_QT.*|QMAKE_LIBDIR_QT = %qtdir/lib|" %_builddir/%buildsubdir/.qmake.cache.tmp
#perl -pi -e "s|^QMAKE_LIBDIR_FLAGS.*|QMAKE_LIBDIR_FLAGS += -lXinerama|" %_builddir/%buildsubdir/.qmake.cache.tmp
# examples and demos
for m in examples demos
do
cp -ar %_builddir/%buildsubdir/$m %buildroot/%_docdir/qt-%version
pushd %buildroot/%_docdir/%rname-%version/$m
cp -p %_builddir/%buildsubdir/.qmake.cache.tmp .qmake.cache
find -type f -name Makefile | \
while read f
do
%__subst "s|^\s*QMAKE\s=.*|QMAKE = %qtdir/bin/qmake|" $f
%__subst "s|../../../mkspecs/|%qtdir/mkspecs/|" $f
%__subst "s|../../mkspecs/|%qtdir/mkspecs/|" $f
%__subst "s|../mkspecs/|%qtdir/mkspecs/|" $f
%__subst "s|../.qmake.cache|.qmake.cache|" $f
%__subst "s|../../../include|%qtdir/include|" $f
%__subst "s|../../include|%qtdir/include|" $f
%__subst "s|%_builddir/%buildsubdir|%qtdir|" $f
done
cat README > README.tmp
echo "Before try to build one of these $m, you need to:" > README
echo "" >> README
echo "export QTDIR=\"%{qtdir}/\"" >> README
echo "" >> README
echo "" >> README
cat README.tmp >> README
rm -f README.tmp
popd
pushd %buildroot/%_docdir/%rname-%version/
tar jcf $m.tar.bz2 $m
rm -rf $m
popd
done
ln -s ../../../%_docdir/qt-%version %buildroot/%qtdir/doc
pushd %buildroot/%_datadir/%name/mkspecs/
rm -rf default
%ifarch x86_64
ln -sf linux-g++-64 default
%else
ln -sf linux-g++ default
%endif
popd
# Install .desktop files
install -d -m 0755 %buildroot/%_datadir/applications/
install -m 0644 %SOURCE21 %buildroot/%_datadir/applications/%name-assistant.desktop
install -m 0644 %SOURCE22 %buildroot/%_datadir/applications/%name-designer.desktop
install -m 0644 %SOURCE23 %buildroot/%_datadir/applications/%name-linguist.desktop
install -m 0644 %SOURCE24 %buildroot/%_datadir/applications/%name-qtconfig.desktop
# Icons
mkdir -p %buildroot/%_iconsdir/hicolor/{16x16,32x32,48x48}/apps
install -m 644 %SOURCE101 %buildroot/%_iconsdir/hicolor/16x16/apps/%rname.png
install -m 644 %SOURCE102 %buildroot/%_iconsdir/hicolor/32x32/apps/%rname.png
install -m 644 %SOURCE103 %buildroot/%_iconsdir/hicolor/48x48/apps/%rname.png
# Menus
install -d -m 0755 %buildroot/%_menudir/
%Md2m \
qt4-assistant \
Documentation \
%buildroot/%_datadir/applications/qt4-assistant.desktop \
%buildroot/%_menudir/qt4-assistant
%Md2m \
qt4-designer \
"Applications/Development/Development environments" \
%buildroot/%_datadir/applications/qt4-designer.desktop \
%buildroot/%_menudir/qt4-designer-designer
%Md2m \
qt4-designer \
Applications/Development/Tools \
%buildroot/%_datadir/applications/qt4-linguist.desktop \
%buildroot/%_menudir/qt4-designer-linguist
cat <<EOF > %buildroot/%_menudir/lib%name-qt3support
?package(lib%name-qt3support): \
needs=X11 \
title="Qt4 Configuration" \
section="Configuration/Other" \
longtitle="A configuration tool for Qt4" \
command="%_bindir/qtconfig-qt4" \
icon="%rname.png"
EOF
%post -n lib%name-qt3support
%post_ldconfig
%update_menus
%postun -n lib%name-qt3support
%postun_ldconfig
%clean_menus
%post -n lib%name-core
%post_ldconfig
%postun -n lib%name-core
%postun_ldconfig
%post -n lib%name-gui
%post_ldconfig
%postun -n lib%name-gui
%postun_ldconfig
%post -n lib%name-network
%post_ldconfig
%postun -n lib%name-network
%postun_ldconfig
%post -n lib%name-opengl
%post_ldconfig
%postun -n lib%name-opengl
%postun_ldconfig
%post -n lib%name-sql
%post_ldconfig
%postun -n lib%name-sql
%postun_ldconfig
%post -n lib%name-xml
%post_ldconfig
%postun -n lib%name-xml
%postun_ldconfig
%post -n lib%name-svg
%post_ldconfig
%postun -n lib%name-svg
%postun_ldconfig
%post -n lib%name-designer
%post_ldconfig
%postun -n lib%name-designer
%postun_ldconfig
%post -n lib%name-test
%post_ldconfig
%postun -n lib%name-test
%postun_ldconfig
%post -n lib%name-dbus
%post_ldconfig
%postun -n lib%name-dbus
%postun_ldconfig
%post -n lib%name-assistant
%post_ldconfig
%postun -n lib%name-assistant
%postun_ldconfig
%post -n lib%name-devel
%update_menus
%postun -n lib%name-devel
%clean_menus
%post assistant
%update_menus
%postun assistant
%clean_menus
%post designer
%update_menus
%postun designer
%clean_menus
%files
%files -n lib%name
%files sql
%files devel
%files common -f %name.lang
%dir %qtdir/bin
%dir %qtdir/
%dir %qtdir/lib/
%dir %_datadir/%name/
%dir %_datadir/%name/doc
%dir %qtdir/phrasebooks/
%dir %_datadir/%name/phrasebooks/
%dir %qtdir/translations/
%dir %_datadir/%name/translations/
#%_datadir/%name/translations/qt_*.qm
#%_datadir/%name/translations/qtconfig_*.qm
%dir %qtdir/plugins/
%dir %qtdir/plugins/codecs/
%dir %qtdir/plugins/sqldrivers/
%dir %qtdir/plugins/imageformats/
%dir %qtdir/plugins/inputmethods/
#%qtdir/plugins/styles
%qtdir/settings
%_libdir/%rname-%version
%_iconsdir/hicolor/*/apps/%rname.png
%dir %_docdir/%rname-%version/
%qtdir/doc
#
%qtdir/mkspecs/
%dir %_datadir/%name/mkspecs/
#
%dir %qtdir/src/
%files -n lib%{name}-qt3support
%qtdir/bin/qtconfig
%_bindir/qtconfig-%name
%qtdir/lib/libQt3Support.so.*
%_libdir/libQt3Support.so.*
%qtdir/plugins/accessible/libqtaccessiblecompatwidgets.*
%_datadir/applications/qt4-qtconfig.desktop
%_menudir/lib%name-qt3support
%files -n lib%{name}-core
%qtdir/lib/libQtCore.so.*
%_libdir/libQtCore.so.*
%files -n lib%{name}-gui
%qtdir/lib/libQtGui.so.*
%_libdir/libQtGui.so.*
#%qtdir/plugins/codecs/lib*.so
%qtdir/plugins/imageformats/libqjpeg.*
%qtdir/plugins/imageformats/libqgif.*
%qtdir/plugins/imageformats/libqmng.*
%qtdir/plugins/accessible/libqtaccessiblewidgets.*
%qtdir/plugins/inputmethods/libqimsw-*.*
%files -n lib%{name}-network
%qtdir/lib/libQtNetwork.so.*
%_libdir/libQtNetwork.so.*
%files -n lib%{name}-opengl
%qtdir/lib/libQtOpenGL.so.*
%_libdir/libQtOpenGL.so.*
%files -n lib%{name}-sql
%qtdir/lib/libQtSql.so.*
%_libdir/libQtSql.so.*
%files -n lib%{name}-xml
%qtdir/lib/libQtXml.so.*
%_libdir/libQtXml.so.*
%files -n lib%{name}-svg
%qtdir/lib/libQtSvg.so.*
%_libdir/libQtSvg.so.*
%files -n lib%{name}-designer
%qtdir/lib/libQtDesigner.so.*
%_libdir/libQtDesigner.so.*
%qtdir/lib/libQtDesignerComponents.so.*
%_libdir/libQtDesignerComponents.so.*
%if %build_dbus
%files -n lib%{name}-dbus
%qtdir/lib/libQtDBus.so.*
%_libdir/libQtDBus.so.*
%endif
%files -n lib%{name}-assistant
%qtdir/lib/libQtAssistantClient.so.*
%_libdir/libQtAssistantClient.so.*
%files -n lib%{name}-test
%qtdir/lib/libQtTest.so.*
%_libdir/libQtTest.so.*
%if %build_qsa
%files -n lib%{name}-qsa
%doc %_docdir/%rname-%version/qsa-*
#%doc %_docdir/qsa-%version/RELEASENOTES
%qtdir/lib/libqsa.so.*
%_libdir/libqsa.so.*
%qtdir/plugins/qsa
%endif
%files -n lib%name-devel
#%doc %_docdir/%rname-%version/ANNOUNCE
#%doc %_docdir/%rname-%version/FAQ
%doc %_docdir/%rname-%version/LICENSE
#%doc %_docdir/%rname-%version/PLATFORMS
%doc %_docdir/%rname-%version/README*
%doc %_docdir/%rname-%version/wrap_kde_malloc.cpp
%if !%no_some_docs
%doc %_docdir/%rname-%version/OPENSOURCE-NOTICE.TXT
%endif
%if !%qt_copy
%if !%no_some_docs
%doc %_docdir/%rname-%version/changes*
%endif
%endif
#
%qtdir/bin/findtr
%qtdir/bin/moc
%qtdir/bin/rcc
%qtdir/bin/uic
%qtdir/bin/uic3
%qtdir/bin/lrelease
%qtdir/bin/lupdate
#%qtdir/bin/qm2ts
%qtdir/bin/qt3to4
%qtdir/bin/qmake
#
%_includedir/%name/
%qtdir/include/
%qtdir/lib/*.so
%_libdir/*.so
%_libdir/libQtUiTools.a
#
%_datadir/%name/mkspecs/common
%_datadir/%name/mkspecs/features
%_datadir/%name/mkspecs/default
%_datadir/%name/mkspecs/*linux*
#
%qtdir/src/*
%_datadir/%name/q3porting.xml
#
%_libdir/pkgconfig/*.pc
#
%_sysconfdir/rpm/macros.d/%name
%files designer
%_bindir/designer*
%_bindir/linguist*
#
%_datadir/%name/phrasebooks/*.qph
#%_datadir/%name/translations/designer_*.qm
#%_datadir/%name/translations/linguist_*.qm
#
%dir %qtdir/plugins/designer
%qtdir/plugins/designer/*
%qtdir/bin/designer*
%qtdir/bin/linguist*
#
%_datadir/applications/%name-linguist.desktop
%_datadir/applications/%name-designer.desktop
%_menudir/qt4-designer*
%if %build_odbc
%files -n lib%name-sql-odbc
%qtdir/plugins/sqldrivers/libqsqlodbc.*
%endif
%files -n lib%name-sql-postgresql
%qtdir/plugins/sqldrivers/libqsqlpsql.*
%files -n lib%name-sql-mysql
%qtdir/plugins/sqldrivers/libqsqlmysql.*
%files -n lib%name-sql-sqlite
%qtdir/plugins/sqldrivers/libqsqlite.*
%if %build_sqlite2
%files -n lib%name-sql-sqlite2
%qtdir/plugins/sqldrivers/libqsqlite2.*
%endif
%files assistant
%_bindir/assistant-%name
%qtdir/bin/assistant
#%_datadir/%name/translations/assistant_*.qm
%_datadir/applications/%name-assistant.desktop
%_menudir/qt4-assistant
%files doc
%files doc-html
%dir %_docdir/%rname-%version/html/
%doc %_docdir/%rname-%version/html/*
%files doc-examples
%doc %_docdir/%rname-%version/*.bz2
#%files doc-man
#%doc %_mandir/man1/*
#%doc %_mandir/man3/*
%files -n lib%name-devel-static
%qtdir/lib/lib*.a
%qtdir/lib/lib*.la
%changelog
…
Полный changelog можно просмотреть здесь