talimat 4.7 KB

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