%{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)}
%{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)}
+%define staticqt 1
+%{?nobuild_staticqt:%define staticqt 0}
+
# determine what platform we are building on
%define fedora 0
%define suse 0
cwd=${PWD}
-#export QTDIR=$(pkg-config --variable=prefix QtCore)
-#export QTINC=$(pkg-config --variable=includedir QtCore)
-#export QTLIB=$(pkg-config --variable=libdir QtCore)
-#export PATH=${QTDIR}/bin/:${PATH}
+%if ! %{staticqt}
+export QTDIR=$(pkg-config --variable=prefix QtCore)
+export QTINC=$(pkg-config --variable=includedir QtCore)
+export QTLIB=$(pkg-config --variable=libdir QtCore)
+export PATH=${QTDIR}/bin/:${PATH}
+%else
cd %{depkgs_qt}
make qt4 <<EOF
yes
export QTLIB=${qtdir}/qt4/lib/
export QMAKESPEC=${qtdir}/qt-x11-opensource-src-%{qt4ver}/mkspecs/linux-g++/
cd ${cwd}
+%endif
# Main Bacula configuration with bat
%configure \
%changelog
* Sun Mar 14 2010 D. Scott Barninger <barninger@fairfieldcomputers.com>
- Fix for QT mkspecs location on FC12
+- allow user to build without embedded static QT
* Sat Feb 27 2010 D. Scott Barninger <barninger@fairfieldcomputers.com>
- add dependency on bacula-libs
* Sat Feb 13 2010 D. Scott Barninger <barninger@fairfieldcomputers.com>