talimat 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. # Description: Qt, GUI uygulamaları geliştirmek için yaygın olarak kullanılan çapraz platform bir çerçevedir
  2. # URL: http://www.qt.io/
  3. # Packager: milisarge
  4. # Depends on: glib atk pango cairo gdk-pixbuf xorg-fontconfig xorg-libsm xorg-libxrandr xorg-libxv xorg-libxi xorg-libxinerama xorg-libxcursor xorg-libxfixes xorg-mesa xorg-glu alsa-lib dbus icu libjpeg-turbo libmng libtiff openssl sqlite cups gtk2 gstreamer-plugins-base postgresql pulseaudio unixodbc
  5. name=qt4
  6. version=4.8.7
  7. release=6
  8. _name=qt-everywhere-opensource-src-${version}
  9. source=(http://download.qt-project.org/official_releases/qt/${version%.*}/$version/${_name}.tar.gz)
  10. build() {
  11. QT4PREFIX=/usr
  12. QT4DIR=$QT4PREFIX
  13. QT4BINDIR=$QT4PREFIX/lib/qt4/bin
  14. cd ${_name}
  15. ./configure -prefix $QT4PREFIX \
  16. -bindir $QT4BINDIR \
  17. -plugindir /usr/lib/qt4/plugins \
  18. -importdir /usr/lib/qt4/imports \
  19. -headerdir /usr/include/qt4 \
  20. -datadir /usr/share/qt4 \
  21. -sysconfdir /etc/xdg \
  22. -docdir /usr/share/doc/qt4 \
  23. -demosdir /usr/share/doc/qt4/demos \
  24. -examplesdir /usr/share/doc/qt4/examples \
  25. -translationdir /usr/share/qt4/translations \
  26. -confirm-license \
  27. -opensource \
  28. -release \
  29. -dbus-linked \
  30. -openssl-linked \
  31. -system-sqlite \
  32. -no-phonon \
  33. -no-phonon-backend \
  34. -no-webkit \
  35. -no-openvg \
  36. -nomake demos \
  37. -nomake examples \
  38. -nomake docs \
  39. -optimized-qmake
  40. make
  41. find . -name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \;
  42. make INSTALL_ROOT=$PKG install
  43. rm -rf $PKG/usr/tests
  44. for file in $PKG/usr/lib/libQt*.prl; do
  45. sed -r -e '/^QMAKE_PRL_BUILD_DIR/d' \
  46. -e 's/(QMAKE_PRL_LIBS =).*/\1/' \
  47. -i $file
  48. done
  49. unset file
  50. install -v -Dm644 src/gui/dialogs/images/qtlogo-64.png \
  51. $PKG/usr/share/pixmaps/qt4logo.png
  52. install -v -Dm644 tools/assistant/tools/assistant/images/assistant-128.png \
  53. $PKG//usr/share/pixmaps/assistant-qt4.png
  54. install -v -Dm644 tools/designer/src/designer/images/designer.png \
  55. /usr/share/pixmaps/designer-qt4.png
  56. install -v -Dm644 tools/linguist/linguist/images/icons/linguist-128-32.png \
  57. $PKG/usr/share/pixmaps/linguist-qt4.png
  58. install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \
  59. $PKG/usr/share/pixmaps/qdbusviewer-qt4.png
  60. install -dm755 $PKG/usr/share/applications
  61. install -d $PKG/usr/bin
  62. for i in $PKG/usr/lib/qt4/bin/*; do
  63. ln -s /usr/lib/qt4/bin/$(basename $i) $PKG/usr/bin/$(basename $i)-qt4
  64. done
  65. cat > $PKG/usr/share/applications/assistant-qt4.desktop << EOF
  66. [Desktop Entry]
  67. Name=Qt4 Assistant
  68. Comment=Shows Qt4 documentation and examples
  69. Exec=$QT4BINDIR/assistant
  70. Icon=assistant-qt4.png
  71. Terminal=false
  72. Encoding=UTF-8
  73. Type=Application
  74. Categories=Qt;Development;Documentation;
  75. EOF
  76. cat > $PKG/usr/share/applications/designer-qt4.desktop << EOF
  77. [Desktop Entry]
  78. Name=Qt4 Designer
  79. Comment=Design GUIs for Qt4 applications
  80. Exec=$QT4BINDIR/designer
  81. Icon=designer-qt4.png
  82. MimeType=application/x-designer;
  83. Terminal=false
  84. Encoding=UTF-8
  85. Type=Application
  86. Categories=Qt;Development;
  87. EOF
  88. cat > $PKG/usr/share/applications/linguist-qt4.desktop << EOF
  89. [Desktop Entry]
  90. Name=Qt4 Linguist
  91. Comment=Add translations to Qt4 applications
  92. Exec=$QT4BINDIR/linguist
  93. Icon=linguist-qt4.png
  94. MimeType=text/vnd.trolltech.linguist;application/x-linguist;
  95. Terminal=false
  96. Encoding=UTF-8
  97. Type=Application
  98. Categories=Qt;Development;
  99. EOF
  100. cat > $PKG/usr/share/applications/qdbusviewer-qt4.desktop << EOF
  101. [Desktop Entry]
  102. Name=Qt4 QDbusViewer
  103. GenericName=D-Bus Debugger
  104. Comment=Debug D-Bus applications
  105. Exec=$QT4BINDIR/qdbusviewer
  106. Icon=qdbusviewer-qt4.png
  107. Terminal=false
  108. Encoding=UTF-8
  109. Type=Application
  110. Categories=Qt;Development;Debugger;
  111. EOF
  112. cat > $PKG/usr/share/applications/qtconfig-qt4.desktop << EOF
  113. [Desktop Entry]
  114. Name=Qt4 Config
  115. Comment=Configure Qt4 behavior, styles, fonts
  116. Exec=$QT4BINDIR/qtconfig
  117. Icon=qt4logo.png
  118. Terminal=false
  119. Encoding=UTF-8
  120. Type=Application
  121. Categories=Qt;Settings;
  122. EOF
  123. mkdir -p $PKG/etc/profile.d
  124. cat > $PKG/etc/profile.d/qt4.sh << EOF
  125. # Begin /etc/profile.d/qt4.sh
  126. QT4PREFIX=$QT4PREFIX
  127. QT4DIR=$QT4PREFIX
  128. QT4BINDIR=$QT4BINDIR
  129. QTDIR=$QT4DIR
  130. export QT4PREFIX QT4DIR QTDIR QT4BINDIR
  131. # End /etc/profile.d/qt4.sh
  132. EOF
  133. cat > $PKG/usr/bin/setqt4 << EOF
  134. if [ "x\$QT5BINDIR" != "x/usr/bin" ] && [ "x\$QT5BINDIR" != "x" ]; then pathremove $QT5BINDIR; fi
  135. if [ "x\$QT4BINDIR" != "x/usr/bin" ]; then pathprepend $QT4BINDIR; fi
  136. echo \$PATH
  137. EOF
  138. }