Changeset 1f87b1b


Ignore:
Timestamp:
12/21/2020 09:42:16 PM (9 months ago)
Author:
Pierre Labastie <pieere@…>
Branches:
qt5new
Children:
b312c50
Parents:
dc062c9
Message:

qttools needs a special function to add icons and .desktop files

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/qt5new@24009 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • x/lib/qt5.xml

    rdc062c9 r1f87b1b  
    202202<screen><userinput>as_root() {
    203203  if   [ "$EUID" = 0 ];      then $*
    204   elif [ -x /usr/bin/sudo ]; then sudo $*
     204  elif [ -x /usr/bin/sudo ]; then sudo -E $*
    205205  else                            su -c \\"$*\\"
    206206  fi
     
    229229    make
    230230    as_root make install
     231    if type -p post_install; then as_root post_install; fi
    231232  popd
    232233
     
    255256unset OPTIONS
    256257sed -n "/Begin basic/,/End basic/p" | while read MD5_ENTRY; do
    257   if [ -z "${MD5_ENTRY%\#*}" ]; then continue; fi
     258  if [ -z "${MD5_ENTRY%\#*}" ]; then continue; fi
     259  case "$MD5_ENTRY" in
     260    *qttools*)
     261      post_install(){
     262        QT5BINDIR=$QTDIR/bin
     263
     264        install -v -dm755 /usr/share/pixmaps/
     265
     266        install -v -Dm644 src/assistant/assistant/images/assistant-128.png \
     267                  /usr/share/pixmaps/assistant-qt5.png
     268
     269        install -v -Dm644 src/designer/src/designer/images/designer.png \
     270                  /usr/share/pixmaps/designer-qt5.png
     271
     272        install -v -Dm644 src/linguist/linguist/images/icons/linguist-128-32.png \
     273                  /usr/share/pixmaps/linguist-qt5.png
     274
     275        install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
     276                  /usr/share/pixmaps/qdbusviewer-qt5.png
     277
     278        install -dm755 /usr/share/applications
     279
     280        cat &gt; /usr/share/applications/assistant-qt5.desktop &lt;&lt; EOF
     281[Desktop Entry]
     282Name=Qt5 Assistant
     283Comment=Shows Qt5 documentation and examples
     284Exec=$QT5BINDIR/assistant
     285Icon=assistant-qt5.png
     286Terminal=false
     287Encoding=UTF-8
     288Type=Application
     289Categories=Qt;Development;Documentation;
     290EOF
     291
     292        cat &gt; /usr/share/applications/designer-qt5.desktop &lt;&lt; EOF
     293[Desktop Entry]
     294Name=Qt5 Designer
     295GenericName=Interface Designer
     296Comment=Design GUIs for Qt5 applications
     297Exec=$QT5BINDIR/designer
     298Icon=designer-qt5.png
     299MimeType=application/x-designer;
     300Terminal=false
     301Encoding=UTF-8
     302Type=Application
     303Categories=Qt;Development;
     304        EOF
     305
     306        cat &gt; /usr/share/applications/linguist-qt5.desktop &lt;&lt; EOF
     307[Desktop Entry]
     308Name=Qt5 Linguist
     309Comment=Add translations to Qt5 applications
     310Exec=$QT5BINDIR/linguist
     311Icon=linguist-qt5.png
     312MimeType=text/vnd.trolltech.linguist;application/x-linguist;
     313Terminal=false
     314Encoding=UTF-8
     315Type=Application
     316Categories=Qt;Development;
     317EOF
     318
     319        cat &gt; /usr/share/applications/qdbusviewer-qt5.desktop &lt;&lt; EOF
     320[Desktop Entry]
     321Name=Qt5 QDbusViewer
     322GenericName=D-Bus Debugger
     323Comment=Debug D-Bus applications
     324Exec=$QT5BINDIR/qdbusviewer
     325Icon=qdbusviewer-qt5.png
     326Terminal=false
     327Encoding=UTF-8
     328Type=Application
     329Categories=Qt;Development;Debugger;
     330EOF
     331      }
     332      export -f post_install ;;
     333
     334    *) unset -f post_install ;;
     335  esac
     336
    258337  module_build
     338
    259339done
    260340)</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.