| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- ##
- ## qt.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
- ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package options
- %ifndef with_xft
- %define with_xft no
- %endif
- # package information
- Name: qt
- Summary: The Qt Toolkit
- URL: http://www.trolltech.com/products/qt/x11.html
- Vendor: TrollTech AS
- Packager: The OpenPKG Project
- Distribution: OpenPKG [EVAL]
- Group: XWindow
- License: GPL
- Version: 3.1.0
- Release: 20021125
- # list of sources
- Source0: ftp://ftp.silug.org/pub/qt/source/qt-x11-free-%{version}.tar.gz
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20020206, X11, gcc
- PreReq: OpenPKG, openpkg >= 20020206, X11
- AutoReq: no
- AutoReqProv: no
- %description
- Qt is a GUI (graphical user interface) software toolkit which simplifies
- the task of writing and maintaining GUIs, and allows the developer to
- create prototypes and feature-rich applications quickly. Offering C++
- library bindings, Qt enables development in an object-oriented
- environment and appeals to developers with portability in mind. Qt's
- portable C++ library bindings allow for error-free recompiling on at
- least the three major platforms Unix (and Linux), Apple Macintosh, and
- Microsoft Windows. Its API architecture is designed to reduce complexity
- and increase reliability through a signal and slot mechanism, which is
- similar to templates in C++, but with influences from component
- technology.
- Options:
- --define 'with_xft %{with_xft}'
- %prep
- %setup -q -n qt-x11-free-%{version}
- %build
- export QTDIR=`pwd`
- case "%{l_target}" in
- *-freebsd* ) oscomp="freebsd-g++" ;;
- *-linux* ) oscomp="linux-g++" ;;
- *-solaris* ) oscomp="solaris-g++" ;;
- * ) echo "platform %{l_target} not supported" 2>&1; exit 1 ;;
- esac
- # ensure that libXft exists
- %if "%{with_xft}" == "yes"
- found_xft=""
- for ext in a so sl; do
- if [ -f "`%{l_prefix}/etc/rc --query x11_libdir`/libXft.$ext" ]; then
- found_xft="da"
- break;
- fi
- done
- if [ ".$found_xft" = . ]; then
- echo "ERROR! Library libXft could not be found," 2>&1;
- echo "please consider building without with_xft" 2>&1;
- exit 1;
- fi
- %endif
- # special trolltech configuration
- echo "yes" | ./configure \
- -prefix %{l_prefix} \
- -docdir %{l_prefix}/share/qt/doc \
- -datadir %{l_prefix}/share/qt/data \
- -static -qt-gif -qt-zlib -platform $oscomp \
- -thread -stl -qt-libpng -qt-libjpeg -qt-libmng \
- %if "%{with_xft}" == "yes"
- -xft
- %else
- -no-xft
- %endif
- # set $HOME to a writable directory for qsettings
- HOME=$PWD
- %{l_make} %{l_mflags -O} \
- MAKE="%{l_make} %{l_mflags -O}" \
- symlinks src-qmake src-moc sub-src sub-tools
- # FIXME: "-Wl,-rpath,/tmp/qt-x11-free-3.0.4/lib"
- %install
- rm -rf $RPM_BUILD_ROOT
- # make directory structure
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/lib \
- $RPM_BUILD_ROOT%{l_prefix}/include/qt/private \
- $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
- $RPM_BUILD_ROOT%{l_prefix}/man/man3 \
- $RPM_BUILD_ROOT%{l_prefix}/share/qt/doc/html \
- $RPM_BUILD_ROOT%{l_prefix}/share/qt/templates \
- $RPM_BUILD_ROOT%{l_prefix}/share/qt/phrasebooks \
- $RPM_BUILD_ROOT%{l_prefix}/share/qt/images
- # copy binaries, headers, and then libraries to their target.
- %{l_shtool} install -c -s -m 755 \
- bin/qmake bin/moc bin/uic \
- bin/linguist bin/lrelease bin/lupdate \
- bin/assistant bin/qtconfig bin/designer \
- $RPM_BUILD_ROOT%{l_prefix}/bin/
- # copy mkspecs directory for later portable use of qmake
- cp -rp mkspecs $RPM_BUILD_ROOT%{l_prefix}/share/qt/
- %{l_shtool} install -c -m 644 \
- include/*.h $RPM_BUILD_ROOT%{l_prefix}/include/qt/
- %{l_shtool} install -c -m 644 \
- include/private/*.h $RPM_BUILD_ROOT%{l_prefix}/include/qt/private/
- %{l_shtool} install -c -m 644 \
- doc/html/* $RPM_BUILD_ROOT%{l_prefix}/share/qt/doc/html/
- %{l_shtool} install -c -m 644 \
- tools/designer/templates/*.ui $RPM_BUILD_ROOT%{l_prefix}/share/qt/templates/
- %{l_shtool} install -c -m 644 \
- tools/linguist/phrasebooks/*.qph $RPM_BUILD_ROOT%{l_prefix}/share/qt/phrasebooks/
- %{l_shtool} install -c -m 644 \
- tools/designer/designer/images/* $RPM_BUILD_ROOT%{l_prefix}/share/qt/images/
-
- ( cd lib && tar cf - * ) |\
- ( cd $RPM_BUILD_ROOT%{l_prefix}/lib && tar xf - )
- ( cd doc/man/man3
- for man in *.3qt; do
- %{l_shtool} subst -e 's;\.3qt;.3;' $man
- mv $man `echo $man | sed -e 's;\.3qt$;.3;'`
- done
- %{l_shtool} install -c -m 644 \
- *.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/
- cd ../man1
- %{l_shtool} install -c -m 644 \
- *.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
- )
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|