Debian Codegraph @

build/Linux+BSD/portable/RecipeDebian

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 # This file is designed to run in debian jessie docker images.
4
5 COMMAND=$1
6 ARCH=$2
7
8 mainscip-shell shell shell-project 0.0.0 main().() {
9
10 set -e # Halt on error
11 set -x # Be verbose
12
13 shift 2 #need to adjust parameter list so $makefile_overrides start at $1
14
15 case $COMMAND in
16 "--fetch-build-dependencies-only")
17 fetch-build-dependenciesscip-shell shell shell-project 0.0.0 fetch-build-dependencies().
18 ;;
19 "--fetch-package-dependencies-only")
20 fetch-package-dependenciesscip-shell shell shell-project 0.0.0 fetch-package-dependencies().
21 ;;
22 "--build-only")
23 buildscip-shell shell shell-project 0.0.0 build(). "$@"
24 ;;
25 "--package-only")
26 packagescip-shell shell shell-project 0.0.0 package().
27 ;;
28 *)
29 fetch-build-dependenciesscip-shell shell shell-project 0.0.0 fetch-build-dependencies().
30 fetch-package-dependenciesscip-shell shell shell-project 0.0.0 fetch-package-dependencies().
31 buildscip-shell shell shell-project 0.0.0 build(). "$@"
32 packagescip-shell shell shell-project 0.0.0 package().
33 esac
34
35 echoscip-shell system . . echo. 'RecipeDebianCross completed'
36 }
37
38 #################################################################################
39 # Fetch compile-time dependencies only
40 ##################################################################################
41 fetch-build-dependenciesscip-shell shell shell-project 0.0.0 fetch-build-dependencies().() {
42 echoscip-shell system . . echo. "fetching dependencies for arm arch: $ARCH"
43
44 # get cross compiler toolchain
45 apt-key adv --fetch-keys http://emdebian.org/tools/debian/emdebian-toolchain-archive.key
46 echoscip-shell system . . echo. "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/crosstools.listscip-shell filesystem . . `/etc/apt/sources.list.d/crosstools.list`.
47
48 # allow to download $ARCH-specific packages
49 dpkgscip-shell system . . dpkg. --add-architecture $ARCH
50
51 apt-getscip-shell system . . apt-get. clean && apt-getscip-shell system . . apt-get. update && apt-getscip-shell system . . apt-get. install -y \
52 libsndfile1-dev:$ARCH \
53 libasound2-dev:$ARCH \
54 portaudio19-dev:$ARCH \
55 libportmidi-dev:$ARCH \
56 zlib1g-dev:$ARCH \
57 libfreetype6-dev:$ARCH \
58 libmp3lame-dev:$ARCH \
59 libssl-dev:$ARCH \
60 libdrm-dev:$ARCH \
61 libgl1-mesa-dev:$ARCH \
62 libpulse-dev:$ARCH \
63 qtbase5-dev:$ARCH \
64 qttools5-dev:$ARCH \
65 qtscript5-dev:$ARCH \
66 libqt5xmlpatterns5-dev:$ARCH \
67 libqt5svg5-dev:$ARCH \
68 libqt5webkit5-dev:$ARCH \
69 qttools5-dev-tools:$ARCH \
70 cross-gcc-dev \
71 binutils-arm-linux-gnueabihf \
72 crossbuild-essential-armhf \
73 qemu-user-static \
74 cmake \
75 git
76
77 # forcibly install because will break aptitude dependency rules
78 force-installscip-shell shell shell-project 0.0.0 force-install(). qtbase5-dev-tools $ARCH
79 }
80
81 ###################################################################################
82 # Fetch run-time dependencies only...to be run after fetching compile dependencies
83 ###################################################################################
84 fetch-package-dependenciesscip-shell shell shell-project 0.0.0 fetch-package-dependencies().() {
85 echoscip-shell system . . echo. "fetching AppImage packaging + runtime dependencies for arch: $ARCH"
86
87 force-installscip-shell shell shell-project 0.0.0 force-install(). \
88 alsa-base any \
89 alsa-tools $ARCH \
90 alsa-utils $ARCH \
91 libasound2-plugins $ARCH \
92 pulseaudio $ARCH \
93 pkg-config $ARCH \
94 liblcms2-2 $ARCH \
95 libmng1 $ARCH \
96 libicu52 $ARCH \
97 qtquick1-5-dev $ARCH \
98 libqt5quickwidgets5 $ARCH \
99 libqt5gui5 $ARCH \
100 libqt5multimedia5 $ARCH \
101 libqt5multimediawidgets5 $ARCH \
102 libqt5positioning5 $ARCH \
103 libqt5sensors5 $ARCH \
104 libqt5webkit5 $ARCH \
105 libpulse0 $ARCH \
106 libjson-c-dev $ARCH \
107 libexpat1-dev $ARCH \
108 libdbus-1-3 $ARCH \
109 libglib2.0-0 $ARCH \
110 libkeyutils-dev $ARCH \
111 libwrap0 $ARCH \
112 libacl1 $ARCH \
113 libreadline6 $ARCH \
114 libbz2-1.0 $ARCH \
115 libpcre3 $ARCH \
116 qml-module-qtquick-controls $ARCH \
117 qml-module-qtquick-dialogs $ARCH \
118 qml-module-qtquick-layouts $ARCH \
119 qml-module-qtquick2 $ARCH \
120 qml-module-qtqml-models2 $ARCH \
121 qt5-image-formats-plugins $ARCH \
122 libwrap0 $ARCH
123 }
124
125 ########################################################
126 # BUILD MuseScore PORTABLE (Compile, not package)
127 ########################################################
128 buildscip-shell shell shell-project 0.0.0 build().() {
129 echoscip-shell system . . echo. "building MuseScore Portable for arch: $ARCH"
130
131 cd MuseScore
132
133 makescip-shell system . . make. revision
134
135 if [scip-shell system . . `[`. "$ARCH" == "armhf" ]; then
136 LIBARM="/lib/arm-linux-gnueabihfscip-shell filesystem . . `/lib/arm-linux-gnueabihf`." # might generalize in future to support other archs
137 CMAKE_TOOLCHAIN_FILE="/MuseScorescip-shell filesystem . . `/MuseScore/build/Linux+BSD/portable/ARM/jessie-crosscompile-armhf.cmake`./build/Linux+BSD/portscip-shell filesystem . . `/MuseScore/build/Linux+BSD/portable/ARM/jessie-crosscompile-armhf.cmake`.able/ARM/jessie-croscip-shell filesystem . . `/MuseScore/build/Linux+BSD/portable/ARM/jessie-crosscompile-armhf.cmake`.sscompile-armhf.cmakescip-shell filesystem . . `/MuseScore/build/Linux+BSD/portable/ARM/jessie-crosscompile-armhf.cmake`." \
138 LD_LIBRARY_PATH="/usr$LIBARM:/usr$LIBARM/alsa-lib:/usr$LIBARM/pulseaudio:$LIBARM" \
139 make "$@" portable
140 else
141 echoscip-shell system . . echo. "This bash script only supports armhf cross at the moment"
142 fi
143 }
144
145
146 ##########################################################################
147 # PACKAGE INTO APPIMAGE WITH APPIMAGEKIT
148 ##########################################################################
149 packagescip-shell shell shell-project 0.0.0 package().() {
150 echoscip-shell system . . echo. 'packaging'
151
152 appdir="$(catscip-shell system . . cat. MuseScore/build.release/PREFIX.txt)"
153 appimage="$(echoscip-shell system . . echo. "$appdir" | sedscip-shell system . . sed. 's|\.AppDir$|.AppImage|')"
154
155 cd AppImageKit-5/AppImageAssistant.AppDir
156
157 ./package "$appdir" "$appimage"
158
159 # allow access to AppImage from outside the chroot
160 chmodscip-shell system . . chmod. a+rwx "$appimage"
161 parent_dir="$(dirnamescip-shell system . . dirname. "$appimage")"
162 while [scip-shell system . . `[`. "$(dirnamescip-shell system . . dirname. "$parent_dir")" != "$parent_dir" ]; do
163 [scip-shell system . . `[`. "$parent_dir" == "/scip-shell filesystem . . `/`." ] && break
164 chmodscip-shell system . . chmod. a+rwx "$parent_dir"
165 parent_dir="$(dirnamescip-shell system . . dirname. "$parent_dir")"
166 done
167
168 lsscip-shell system . . ls. -lh "$appimage"
169
170 }
171
172 ########################################################################
173 # helper function needed for forcibly installing packages
174 # which would break aptitude's dependency requirements
175 ########################################################################
176 force-installscip-shell shell shell-project 0.0.0 force-install().() {
177 while (($#)); do
178 apt-getscip-shell system . . apt-get. download $1:$2 && dpkgscip-shell system . . dpkg. --force-all -i $1*
179 shift 2
180 done
181 }
182
183 mainscip-shell shell shell-project 0.0.0 main(). "$@"