qt5: move bins to /usr/lib/qt5/bin and create symlinks.
Depend on qtchooser and assing qt5 the default choice via post-install.
This commit is contained in:
parent
027287f3cd
commit
9f927f7561
|
@ -0,0 +1,6 @@
|
|||
case "$ACTION" in
|
||||
post)
|
||||
# qt5 by default via qtchooser.
|
||||
ln -sf /etc/xdg/qtchooser/5.conf etc/xdg/qtchooser/default.conf
|
||||
;;
|
||||
esac
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'qt5'
|
||||
pkgname=qt5
|
||||
version=5.3.2
|
||||
revision=3
|
||||
revision=5
|
||||
wrksrc="qt-everywhere-opensource-src-${version}"
|
||||
homepage="http://qt-project.com/"
|
||||
short_desc="A cross-platform application and UI framework (QT5)"
|
||||
|
@ -21,6 +21,7 @@ makedepends="
|
|||
libXcomposite-devel libwebp-devel libxkbcommon-devel harfbuzz-devel gtk+-devel
|
||||
mtdev-devel libmysqlclient-devel postgresql-libs-devel pulseaudio-devel
|
||||
gst-plugins-base1-devel libxslt-devel"
|
||||
depends="qtchooser"
|
||||
|
||||
pre_configure() {
|
||||
sed -i "s|-O2|${CXXFLAGS}|" qtbase/mkspecs/common/{g++,gcc}-base.conf
|
||||
|
@ -31,7 +32,7 @@ do_configure() {
|
|||
export LD_LIBRARY_PATH="${wrksrc}/qtbase/lib:${wrksrc}/qttools/lib:${LD_LIBRARY_PATH}"
|
||||
export LD="$CXX"
|
||||
|
||||
./configure -confirm-license -opensource \
|
||||
./configure -confirm-license -opensource -bindir /usr/lib/qt5/bin \
|
||||
-prefix /usr -sysconfdir /etc/xdg -plugindir /usr/lib/qt5/plugins \
|
||||
-docdir /usr/share/doc/qt5 -importdir /usr/lib/qt5/imports \
|
||||
-translationdir /usr/share/qt5/translations \
|
||||
|
@ -52,11 +53,6 @@ do_install() {
|
|||
make INSTALL_ROOT=${DESTDIR} install
|
||||
vlicense LGPL_EXCEPTION.txt
|
||||
rm -r ${DESTDIR}/usr/share/doc
|
||||
# rename bins
|
||||
cd ${DESTDIR}/usr/bin
|
||||
for f in *; do
|
||||
mv ${f} qt5-${f}
|
||||
done
|
||||
}
|
||||
|
||||
qt5-connectivity-devel_package() {
|
||||
|
@ -106,8 +102,6 @@ qt5-declarative_package() {
|
|||
rm ${PKGDESTDIR}/usr/lib/*.a
|
||||
rm ${PKGDESTDIR}/usr/lib/*.so
|
||||
rm ${PKGDESTDIR}/usr/lib/*.prl
|
||||
# Rename conflicting file
|
||||
mv ${PKGDESTDIR}/usr/bin/{qmlplugindump,qt5-qmlplugindump}
|
||||
}
|
||||
}
|
||||
qt5-enginio-devel_package() {
|
||||
|
@ -220,8 +214,6 @@ qt5-quick1_package() {
|
|||
rm -r ${PKGDESTDIR}/usr/lib/qt5/mkspecs
|
||||
rm ${PKGDESTDIR}/usr/lib/*.so
|
||||
rm ${PKGDESTDIR}/usr/lib/*.prl
|
||||
# Rename conflicting file
|
||||
mv ${PKGDESTDIR}/usr/bin/{qmlviewer,qt5-qmlviewer}
|
||||
}
|
||||
}
|
||||
qt5-quickcontrols_package() {
|
||||
|
@ -412,11 +404,6 @@ qt5-xmlpatterns_package() {
|
|||
rm -r ${PKGDESTDIR}/usr/lib/qt5/mkspecs
|
||||
rm ${PKGDESTDIR}/usr/lib/*.so
|
||||
rm ${PKGDESTDIR}/usr/lib/*.prl
|
||||
# rename bins
|
||||
cd ${PKGDESTDIR}/usr/bin
|
||||
for f in *; do
|
||||
mv ${f} qt5-${f}
|
||||
done
|
||||
}
|
||||
}
|
||||
qt5-translations_package() {
|
||||
|
@ -436,13 +423,6 @@ qt5-tools-devel_package() {
|
|||
rm -r ${PKGDESTDIR}/usr/share
|
||||
rm -r ${PKGDESTDIR}/usr/lib/qt5/plugins
|
||||
rm ${PKGDESTDIR}/usr/lib/*.so.*
|
||||
# Fix cmake files to use our qt5- bins.
|
||||
sed -e 's,/bin/lrelease,/bin/qt5-lrelease,' \
|
||||
-e 's,/bin/lupdate,/bin/qt5-lupdate,' \
|
||||
-e 's,/bin/lconvert,/bin/qt5-lconvert,' \
|
||||
-i ${PKGDESTDIR}/usr/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake
|
||||
sed -e 's,/bin/qcollectiongenerator,/bin/qt5-qcollectiongenerator,' \
|
||||
-i ${PKGDESTDIR}/usr/lib/cmake/Qt5Help/Qt5HelpConfigExtras.cmake
|
||||
}
|
||||
}
|
||||
qt5-tools_package() {
|
||||
|
@ -476,11 +456,6 @@ qt5-tools_package() {
|
|||
# install desktop files
|
||||
vmkdir usr/share/applications
|
||||
install -m644 ${FILESDIR}/*.desktop ${PKGDESTDIR}/usr/share/applications
|
||||
# rename bins
|
||||
cd ${PKGDESTDIR}/usr/bin
|
||||
for f in *; do
|
||||
mv ${f} qt5-${f}
|
||||
done
|
||||
}
|
||||
}
|
||||
qt5-devel_package() {
|
||||
|
@ -496,16 +471,6 @@ qt5-devel_package() {
|
|||
vmove "usr/lib/*.prl"
|
||||
vmove usr/lib/pkgconfig
|
||||
vmove usr/lib/cmake
|
||||
# Fix cmake files to use our qt5- bins.
|
||||
sed -e 's,/bin/qmake,/bin/qt5-qmake,' \
|
||||
-e 's,/bin/moc,/bin/qt5-moc,' \
|
||||
-e 's,/bin/rcc,/bin/qt5-rcc,' \
|
||||
-i ${PKGDESTDIR}/usr/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake
|
||||
sed -e 's,/bin/uic,/bin/qt5-uic,' \
|
||||
-i ${PKGDESTDIR}/usr/lib/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake
|
||||
sed -e 's,/bin/qdbuscpp2xml,/bin/qt5-qdbuscpp2xml,' \
|
||||
-e 's,/bin/qdbusxml2cpp,/bin/qt5-qdbusxml2cpp,' \
|
||||
-i ${PKGDESTDIR}/usr/lib/cmake/Qt5DBus/Qt5DBusConfigExtras.cmake
|
||||
}
|
||||
}
|
||||
qt5-plugin-gtk_package() {
|
||||
|
@ -541,7 +506,8 @@ qt5-plugin-sqlite_package() {
|
|||
qt5-qmake_package() {
|
||||
short_desc+=" - qmake Makefile generator tool"
|
||||
pkg_install() {
|
||||
vmove usr/bin/qt5-qmake
|
||||
vmove usr/bin/qmake-qt5
|
||||
vmove usr/lib/qt5/bin/qmake
|
||||
vmove usr/lib/qt5/mkspecs
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue