"Fossies" - the Fresh Open Source Software Archive

Member "labplot-2.8.2/admin/create-dmg-craft.sh" (24 Feb 2021, 3198 Bytes) of package /linux/privat/labplot-2.8.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "create-dmg-craft.sh": 2.8.1_vs_2.8.2.

    1 # Build it on Mac howto in script form
    2 # but be aware, some frameworks need patching to have this working
    3 
    4 # reference: https://cgit.kde.org/kate.git/tree/mac/emerge-deploy.sh
    5 # run in kde/..
    6 
    7 # errors are fatal
    8 set -e
    9 
   10 NAME=labplot2
   11 VERSION=2.8.2
   12 PREFIX=kde/Applications
   13 INPREFIX=$PREFIX/$NAME.app/Contents
   14 TMPDIR=LabPlot2
   15 SIGNATURE="Stefan Gerlach"
   16 
   17 GCP=/opt/local/libexec/gnubin/cp
   18 
   19 # run after "craft labplot"
   20 #########################################
   21 
   22 mkdir -pv $INPREFIX/share/{appdata,applications}
   23 
   24 echo "Running macdeployqt ..."
   25 # -verbose=3
   26 macdeployqt $PREFIX/$NAME.app -verbose=2
   27 
   28 #########################################
   29 
   30 echo "Install files"
   31 # splash
   32 cp -v kde/share/$NAME/splash.png $INPREFIX/Resources/
   33 # rc-file
   34 # Standardlocation (QSP): ~/Library/Application\ Support/kxmlgui5/labplot2/labplot2ui.rc
   35 # using hardcoded path:
   36 cp -v kde/share/kxmlgui5/$NAME/${NAME}ui.rc $INPREFIX/Resources/
   37 # themes
   38 cp -vr kde/share/$NAME/themes $INPREFIX/Resources/
   39 # gsl_distros, fit_models, colorchooser
   40 cp -vr kde/share/$NAME/pics $INPREFIX/Resources/
   41 # color schemes (needs patched kcolorschememanager.cpp)
   42 cp -vr kde/share/$NAME/color-schemes $INPREFIX/Resources/color-schemes
   43 #datasets
   44 cp -vr kde/share/$NAME/datasets $INPREFIX/Resources/datasets
   45 # appdata
   46 cp -v kde/share/metainfo/org.kde.labplot2.appdata.xml $INPREFIX/share/appdata/
   47 cp -v kde/share/applications/org.kde.$NAME.desktop $INPREFIX/share/applications/
   48 
   49 # cantor
   50 cp -v kde/Applications/cantor.app/Contents/MacOS/cantor $INPREFIX/MacOS
   51 cp -v kde/Applications/cantor_scripteditor.app/Contents/MacOS/cantor_scripteditor $INPREFIX/MacOS
   52 cp -vr kde/plugins/cantor $INPREFIX/PlugIns
   53 cp -v kde/lib/libcantor_config.dylib $INPREFIX/Frameworks/
   54 # not available in cantor master
   55 #cp -v kde/lib/libcantor_pythonbackend.dylib $INPREFIX/Frameworks/
   56 
   57 # icons
   58 cp -vf kde/share/icontheme.rcc $INPREFIX/Resources/icontheme.rcc
   59 
   60 # kcharselect data
   61 mkdir -p $INPREFIX/Resources/kf5/kcharselect
   62 cp -v kde/share/kf5/kcharselect/kcharselect-data $INPREFIX/Resources/kf5/kcharselect/
   63 
   64 # misc
   65 cp -v labplot/admin/Info.plist $INPREFIX
   66 
   67 # translation (locale)
   68 cd kde/share
   69 $GCP -vf --parents locale/*/LC_MESSAGES/labplot2.mo ../../$INPREFIX/Resources
   70 $GCP -vf --parents locale/*/LC_MESSAGES/kconfigwidgets5.mo ../../$INPREFIX/Resources
   71 $GCP -vf --parents locale/*/LC_MESSAGES/kxmlgui5.mo ../../$INPREFIX/Resources
   72 cd ../..
   73 
   74 ### TODO
   75 # package icon
   76 # share/doc
   77 
   78 ##########################################
   79 
   80 # fix for hdf5 lib
   81 # install_name_tool -change /usr/local/Cellar/hdf5/1.8.17/lib/libhdf5.10.dylib /usr/local/opt/hdf5/1.8.17/lib/libhdf5.10.dylib /usr/local/opt/hdf5/1.8.17/lib/libhdf5_hl.10.dylib
   82 
   83 ###############################################
   84 if [ -d ./$TMPDIR ]; then
   85     rm -rf ./$TMPDIR/*
   86 else
   87     mkdir ./$TMPDIR
   88 fi
   89 mv $PREFIX/$NAME.app ./$TMPDIR 
   90 
   91 # Add link for easy install
   92 ln -s /Applications ./$TMPDIR/Applications
   93 
   94 ## remove stuff we don't need or like
   95 #rm -rf $TMPDIR/$NAME.app/Contents/Plugins/bearer
   96 
   97 ###############################################
   98 
   99 # create the final disk image
  100 echo "Building package"
  101 rm -f ./labplot-$VERSION.dmg
  102 hdiutil create -srcfolder ./$TMPDIR -format UDBZ -fs HFS+ -imagekey zlib-level=9 ./labplot-$VERSION.dmg