| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- ##
- ## qt4.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://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 information
- Name: qt4
- Summary: The Qt Toolkit
- URL: http://www.trolltech.com/products/qt/x11.html
- Vendor: TrollTech AS
- Packager: OpenPKG
- Distribution: OpenPKG
- Class: EVAL
- Group: XWindow
- License: GPL/QPL
- Version: 4.0.1
- Release: 20051009
- # list of sources
- Source0: ftp://ftp.trolltech.com/pub/qt/source/qt-x11-opensource-src-%{version}.tar.gz
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
- PreReq: OpenPKG, openpkg >= 20040130
- BuildPreReq: X11
- PreReq: X11
- AutoReq: no
- AutoReqProv: no
- %description
- Qt is a comprehensive C++ application development framework. It
- includes class libraries and tools for cross-platform development
- and the creation of graphical user interfaces (GUI). 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.
- %track
- prog qt4 = {
- version = %{version}
- url = ftp://ftp.trolltech.com/pub/qt/source/
- regex = qt-x11-opensource-src-(\d+\.\d+\.\d+)\.tar\.(gz|bz2)
- }
- %prep
- %setup -q -n qt-x11-opensource-src-%{version}
- # avoid dependencies external to OpenPKG instance
- %{l_shtool} subst \
- -e 's;[ \t]*/usr/local/include;;g' \
- -e 's;[ \t]*/usr/local/lib;;g' \
- mkspecs/*/qmake.conf
- %build
- # configure components
- options=""
- case "%{l_platform -t}" in
- *-freebsd* ) options="-platform freebsd-g++" ;;
- *-linux* ) options="-platform linux-g++" ;;
- *-sunos* ) options="-platform solaris-g++" ;;
- esac
- export CC="%{l_cc}"
- export CXX="%{l_cxx}"
- export CFLAGS="%{l_cflags -O}"
- export CXXFLAGS="%{l_cxxflags -O}"
- echo "yes" | ./configure $options \
- -prefix %{l_prefix} \
- -datadir %{l_prefix}/share/qt \
- -headerdir %{l_prefix}/include/qt \
- -docdir %{l_prefix}/share/qt/doc \
- -translationdir %{l_prefix}/share/qt/translations \
- -plugindir %{l_prefix}/libexec/qt \
- -sysconfdir %{l_prefix}/etc/qt \
- -release -static \
- -stl -qt-zlib -qt-libpng -qt-libjpeg -qt-gif \
- -I$QTDIR/include %{l_cppflags} -I`%{l_rc} --query x11_incdir` \
- -L$QTDIR/lib %{l_ldflags} -L`%{l_rc} --query x11_libdir`
- # make components
- %{l_make} %{l_mflags -O} #\ MAKE="%{l_make} %{l_mflags -O}"
- %install
- rm -rf $RPM_BUILD_ROOT
- # install components
- %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT
- # post-adjust installation
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
- mv $RPM_BUILD_ROOT%{l_prefix}/lib/*.pc \
- $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
- # strip down installation
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/demos
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/examples
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/qt
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%not %dir %{l_prefix}/lib/pkgconfig' \
- '%doc %{l_prefix}/share/qt/doc/html/*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|