# Make symlinks for the examples/docs right away:
mkdir -p $PKG/usr/doc/qt-$VERSION
( cd $PKG/usr/doc/qt-$VERSION
ln -sf /usr/lib/qt-$VERSION/examples .
ln -sf /usr/lib/qt-$VERSION/tutorial .
ln -sf /usr/lib/qt-$VERSION/doc/flyers .
ln -sf /usr/lib/qt-$VERSION/doc/html .
ln -sf /usr/lib/qt-$VERSION/doc/man .
)
# These are the flags recommended by KDE:
#./configure -system-zlib -qt-gif -system-libpng -system-libjpeg -plugin-imgfmt-mng -thread -no-stl -no-xinerama -no-g++-exceptions
# And here's what we are currently using. The "yes" agrees to the GPL, so don't run this script if you
# don't agree. :-)
echo "yes" | ./configure -prefix /usr/lib/qt -release -system-zlib -qt-gif -system-libpng -system-libjpeg -plugin-imgfmt-mng -thread -no-stl -no-g++-exceptions -xft -plugin-sql-mysql
# We're using '-i' to work around a bug where the build tries to strip html files.
# Build the important stuff:
make -i symlinks sub-src sub-tools
# Half the time this doesn't work for squat, so don't write to tell me I should be
# using "make install". The methods used here are more likely to continue to work.
#make -i INSTALL_ROOT=$PKG moc-install src-install tools-install qmake-install plugins-install
# Add libqt symlinks:
( cd /usr/lib/qt/lib
for link in libqt.so libqt.so.3 libqt.so.`echo $VERSION | cut -f 1-2 -d .` libqt.so.${VERSION} ; do
ln -sf libqt-mt.so.${VERSION} $link
done
)
# Then, package things up in $PKG:
mkdir -p $PKG/usr/lib
cp -a /usr/lib/qt $PKG/usr/lib
( cd $PKG/usr/lib
mv qt qt-$VERSION
ln -sf qt-$VERSION qt )
## Maybe something for later? :-)
##
## HTML documentation and examples are HUGE so they go in their own packages.
#rm -rf $HTMLDOCS $EXAMPLES
#mkdir -p $HTMLDOCS/usr/doc/qt-$VERSION $EXAMPLES/usr/doc/qt-$VERSION
#mv $PKG/usr/doc/qt-$VERSION/html $HTMLDOCS/usr/doc/qt-$VERSION
#mv $PKG/usr/doc/qt-$VERSION/examples $EXAMPLES/usr/doc/qt-$VERSION
#cd $HTMLDOCS
#makepkg -l y -c n $TMP/qt-htmldocs-$VERSION-noarch-$BUILD.tgz
#cd $EXAMPLES
#makepkg -l y -c n $TMP/qt-examples-$VERSION-noarch-$BUILD.tgz
# Build package:
cd $PKG
makepkg -l y -c n $TMP/qt-$VERSION-$ARCH-$BUILD.tgz