Commit aed116c4fcc2d50172225981ea0d2833ff4fad01
1 parent
95cbe5ea
skrypty kompilacyjne wstawione do repozytorium
także: poprawka generowania deba dla buildera
Showing
6 changed files
with
747 additions
and
201 deletions
buildDarwin.sh
1 | 1 | #!/bin/bash |
2 | +# Kompiluje bibliotekę i buduje paczki dystrybucyjne zawierające | |
3 | +# Morfeusza i słowniki SGJP i Polimorf | |
4 | +# | |
5 | +# Założenia: | |
6 | +# • kod źródłowy Morfeusza jest w MORFEUSZ_SRC | |
7 | +# • słowniki są już skompilowane w katalogu DICT_DIR | |
8 | +# • kompilacja odbędzie się w katalogu BUILD_DIR (który zostanie skasowany i utworzony) | |
9 | +# • wyniki zostaną umieszczone w TARGET_DIR | |
2 | 10 | |
3 | -set -e -o pipefail | |
11 | +#set -ex -o pipefail | |
12 | +set -x | |
4 | 13 | |
5 | -if [ "$#" -ne 4 ]; then | |
6 | - echo "Must provide exactly 4 arguments: <CROSSMORFEUSZ_ROOT> <INPUT_DICTIONARIES> <DEFAULT_DICT_NAME> <DICT_VERSION>" | |
14 | +if [ "$#" -ne 3 ]; then | |
15 | + echo "Expected arguments: ‹DICT_NAME› ‹DICT_VERSION› ‹64/32›" | |
7 | 16 | exit 1 |
8 | 17 | fi |
9 | 18 | |
10 | -export CROSSMORFEUSZ_ROOT="$1" | |
11 | -export INPUT_DICTIONARIES="$2" | |
12 | -export DEFAULT_DICT_NAME="$3" | |
13 | -export DICT_VERSION="$4" | |
14 | -export ANALYZER_DICTIONARY_CPP=`mktemp`.cpp | |
15 | -export GENERATOR_DICTIONARY_CPP=`mktemp`.cpp | |
16 | -export DICT_DIR=`mktemp -d` | |
19 | +export DICT_NAME="$1" | |
20 | +export DICT_VERSION="$2" | |
21 | +export BITS=$3 | |
22 | + | |
23 | + | |
24 | +export MORFEUSZ_SRC=`pwd`/Morfeusz | |
25 | +export DICT_DIR=`pwd`/dicts | |
26 | +export CROSSMORFEUSZ_ROOT=$HOME/crossmorfeusz | |
27 | +export ANALYZER_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-a.cpp | |
28 | +export GENERATOR_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-s.cpp | |
29 | + | |
30 | + | |
31 | +export BUILD_ROOT=`pwd`/build/$1 | |
32 | +export TARGET_ROOT=`pwd`/target | |
33 | + | |
17 | 34 | |
18 | -function buildDictionaries { | |
19 | - | |
20 | - INPUT_TAGSET=input/morfeusz-sgjp.tagset | |
21 | - SEGMENT_RULES_FILE=input/segmenty.dat | |
22 | - | |
23 | - python fsabuilder/morfeusz_builder \ | |
24 | - --input-files="$INPUT_DICTIONARIES" \ | |
25 | - --tagset-file="$INPUT_TAGSET" \ | |
26 | - --segments-file="$SEGMENT_RULES_FILE" \ | |
27 | - --analyzer-cpp="$ANALYZER_DICTIONARY_CPP" \ | |
28 | - --generator-cpp="$GENERATOR_DICTIONARY_CPP" \ | |
29 | - --dict="$DEFAULT_DICT_NAME" \ | |
30 | - --dict-dir="$DICT_DIR" | |
31 | - | |
32 | - echo "DONE building dictionaries" >&2 | |
33 | -} | |
34 | 35 | |
35 | 36 | function build { |
36 | 37 | set -e -o pipefail |
37 | 38 | os=$1 |
38 | - arch=$2 | |
39 | + bity=$2 | |
39 | 40 | embedded=$3 |
40 | - shift | |
41 | - shift | |
42 | - shift | |
41 | + python_ver=$4 | |
42 | + shift 4 | |
43 | 43 | targets=$@ |
44 | + | |
45 | + if [ "$bity" = "64" ]; then | |
46 | + arch=amd64 | |
47 | + else | |
48 | + arch=i386 | |
49 | + fi | |
50 | + | |
51 | + toolchain=$MORFEUSZ_SRC/toolchains/Toolchain-$os-$arch.cmake | |
52 | + | |
53 | + buildDir=$BUILD_ROOT/$os-$bity-$embedded | |
54 | + targetDir=$TARGET_ROOT/$os/$bity | |
55 | + | |
56 | +# rm -rf $buildDir || true | |
57 | + mkdir -p $buildDir | |
58 | + | |
44 | 59 | |
45 | - srcDir=`pwd` | |
46 | - buildDir=buildall/$os-$arch-$embedded | |
47 | - targetDir=$srcDir/target | |
48 | - toolchain=$srcDir/toolchains/Toolchain-$os-$arch.cmake | |
49 | - | |
50 | - echo "Will use $toolchain toolchain" | |
60 | +# echo "Will use $toolchain toolchain" | |
51 | 61 | |
52 | - rm -rf $buildDir | |
62 | + # rm -rf $buildDir | |
53 | 63 | #~ rm -rf $targetDir |
54 | 64 | mkdir -p $buildDir |
65 | + rm -f $buildDir/CMakeCache.txt | |
55 | 66 | mkdir -p $targetDir |
56 | 67 | cd $buildDir |
57 | 68 | |
... | ... | @@ -66,62 +77,209 @@ function build { |
66 | 77 | -D TARGET_DIR=$targetDir \ |
67 | 78 | -D ANALYZER_DICTIONARY_CPP=$ANALYZER_DICTIONARY_CPP \ |
68 | 79 | -D GENERATOR_DICTIONARY_CPP=$GENERATOR_DICTIONARY_CPP \ |
69 | - -D DEFAULT_DICT_NAME=$DEFAULT_DICT_NAME \ | |
80 | + -D DEFAULT_DICT_NAME=$DICT_NAME \ | |
70 | 81 | -D SKIP_DICTIONARY_BUILDING=1 \ |
71 | 82 | -D EMBEDDED_DEFAULT_DICT=1 \ |
72 | - -D DICT_VERSION=$DICT_VERSION" | |
83 | + -D DICT_VERSION=$DICT_VERSION " | |
73 | 84 | if [ "$CPACK_GENERATOR" != "" ] |
74 | 85 | then |
75 | 86 | CMAKE_ARGS="$CMAKE_ARGS -D CPACK_GENERATOR=$CPACK_GENERATOR" |
76 | 87 | fi |
77 | 88 | else |
78 | - echo "setting default ACL to prevent control-file-has-bad-permissions lintian error" | |
79 | - setfacl -R -d -m o::rx -m g::rx -m u::rwx . | |
89 | + # "setting default ACL to prevent control-file-has-bad-permissions lintian error" | |
90 | + #setfacl -R -d -m o::rx -m g::rx -m u::rwx . | |
80 | 91 | |
81 | 92 | CMAKE_ARGS="-D CROSSMORFEUSZ_ROOT=$CROSSMORFEUSZ_ROOT \ |
82 | 93 | -D CMAKE_TOOLCHAIN_FILE=$toolchain \ |
83 | 94 | -D TARGET_DIR=$targetDir \ |
84 | 95 | -D DEFAULT_DICT_DIR=$DICT_DIR \ |
85 | - -D DEFAULT_DICT_NAME=$DEFAULT_DICT_NAME \ | |
96 | + -D DEFAULT_DICT_NAME=$DICT_NAME \ | |
86 | 97 | -D SKIP_DICTIONARY_BUILDING=1 \ |
87 | 98 | -D CPACK_GENERATOR=DEB \ |
88 | - -D DICT_VERSION=$DICT_VERSION" | |
99 | + -D DICT_VERSION=$DICT_VERSION " | |
89 | 100 | fi |
90 | - cmake $CMAKE_ARGS $srcDir 2>&1 | |
91 | - echo "building $toolchain" >&2 | |
92 | - make | |
101 | + CMAKE_ARGS="$CMAKE_ARGS -D PY=$python_ver" | |
102 | + cmake $CMAKE_ARGS $MORFEUSZ_SRC 2>&1 | |
103 | + echo "building for $os-$arch" >&2 | |
104 | +# make | |
93 | 105 | make $targets |
94 | 106 | |
95 | - for f in `find "$targetDir" -name "*-Linux-*.deb"` | |
96 | - do | |
97 | - mv "$f" "`echo $f | sed -r 's/Linux-amd64.deb$/amd64.deb/' | sed -r 's/Linux-i386.deb/i386.deb/'`" | |
98 | - done | |
107 | + # for f in `find "$targetDir" -name "*-Linux-*.deb"` | |
108 | + # do | |
109 | + # mv "$f" "`echo $f | sed -r 's/Linux-amd64.deb$/amd64.deb/' | sed -r 's/Linux-i386.deb/i386.deb/'`" | |
110 | + # done | |
111 | + | |
112 | + # for f in `find "$targetDir" -name "*-Linux-*.egg"` | |
113 | + # do | |
114 | + # mv "$f" "`echo $f | sed -r 's/Linux-amd64.egg$/linux-x86_64.egg/' | sed -r 's/Linux-i386.egg$/linux-i686.egg/'`" | |
115 | + # done | |
99 | 116 | |
100 | - cd "$srcDir" | |
101 | 117 | } |
118 | +export -f build | |
119 | + | |
120 | +function buildegg { | |
121 | + os=$1 | |
122 | + bity=$2 | |
123 | + embedded=$3 | |
124 | + python_ver=$4 | |
125 | + | |
126 | + if [ "$bity" = "64" ]; then | |
127 | + arch=amd64 | |
128 | + else | |
129 | + arch=i386 | |
130 | + fi | |
131 | + | |
132 | + buildDir=$BUILD_ROOT/$os-$bity-$embedded/morfeusz/wrappers/python${python_ver:0:1} | |
133 | + if [[ "$python_ver" =~ 2.* ]] | |
134 | + then | |
135 | + eggName=morfeusz2-0.4.0-py2.7 | |
136 | + eggDir=$buildDir/$eggName | |
137 | + pythonIncl=python27 | |
138 | + if [ "$os-$arch" == "Windows-amd64" ] | |
139 | + then | |
140 | + pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python27 | |
141 | + elif [ "$os-$arch" == "Windows-i386" ] | |
142 | + then | |
143 | + pythonDir=$CROSSMORFEUSZ_ROOT/windows32/Python27 | |
144 | + elif [ "$os-$arch" == "Linux-i386" ] | |
145 | + then | |
146 | + pythonDir=$CROSSMORFEUSZ_ROOT/linux32/python/include/python2.7 | |
147 | + elif [ "$os-$arch" == "Darwin-amd64" ] | |
148 | + then | |
149 | + pythonIncl=python2.7 | |
150 | + pythonDir=$CROSSMORFEUSZ_ROOT/darwin64/Python.framework/Headers | |
151 | + pythonLib=$CROSSMORFEUSZ_ROOT/darwin64/Python.framework/Versions/2.7/lib | |
152 | + fi | |
153 | + else | |
154 | + if [ "$os-$arch" == "Windows-amd64" ] | |
155 | + then | |
156 | + if [ "$python_ver" == "3.6" ] | |
157 | + then | |
158 | + pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python36 | |
159 | + eggName=morfeusz2-0.4.0-py3.6 | |
160 | + eggDir=$buildDir/$eggName | |
161 | + pythonIncl=python36 | |
162 | + elif [ "$python_ver" == "3.7" ] | |
163 | + then | |
164 | + pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python37 | |
165 | + eggName=morfeusz2-0.4.0-py3.7 | |
166 | + eggDir=$buildDir/$eggName | |
167 | + pythonIncl=python37 | |
168 | + fi | |
169 | + else | |
170 | + eggName=morfeusz2-0.4.0-py3.6 | |
171 | + eggDir=$buildDir/$eggName | |
172 | + pythonIncl=python36 | |
173 | + if [ "$os-$arch" == "Windows-i386" ] | |
174 | + then | |
175 | + pythonDir=$CROSSMORFEUSZ_ROOT/windows32/Python36-32 | |
176 | + elif [ "$os-$arch" == "Linux-i386" ] | |
177 | + then | |
178 | + pythonDir=$CROSSMORFEUSZ_ROOT/linux32/python3/include/python3.4m | |
179 | + elif [ "$os-$arch" == "Darwin-amd64" ] | |
180 | + then | |
181 | + pythonIncl=python3.6m | |
182 | + pythonDir=$CROSSMORFEUSZ_ROOT/darwin64/anaconda3.6-macos/include/python3.6m | |
183 | + pythonLib=$CROSSMORFEUSZ_ROOT/darwin64/anaconda3.6-macos/lib | |
184 | + # pythonDir=$CROSSMORFEUSZ_ROOT/darwin64/Python3.framework/Versions/3.6/Headers | |
185 | + # pythonLib=$CROSSMORFEUSZ_ROOT/darwin64/Python3.framework/Versions/3.6/lib | |
186 | + fi | |
187 | + fi | |
188 | + fi | |
189 | + | |
190 | + targetDir=$TARGET_ROOT/$os/$bity | |
191 | + echo "src_dir: $MORFEUSZ_SRC" | |
192 | + echo "python_build_dir: $buildDir" | |
193 | + echo "egg_dir: $eggDir" | |
194 | + echo "python_lib_dir: $pythonDir" | |
195 | + if [ "$os-$arch" == "Windows-amd64" ] | |
196 | + then | |
197 | + gcc_command="x86_64-w64-mingw32-gcc -pthread -static-libgcc -static-libstdc++ -std=c++98 -DNDEBUG -DMS_WIN64 -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -fPIC -I$MORFEUSZ_SRC/morfeusz -I$buildDir/../../.. -I$pythonDir/include -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
198 | + echo "$gcc_command" | |
199 | + eval $gcc_command | |
200 | + gpp_command="x86_64-w64-mingw32-g++ -pthread -static-libgcc -static-libstdc++ -DMS_WIN64 -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security $buildDir/swigPYTHON.o -L$buildDir/../.. -L$pythonDir/libs -lmorfeusz2 -l$pythonIncl -o $eggDir/_morfeusz2.pyd" | |
201 | + echo "$gpp_command" | |
202 | + eval $gpp_command | |
203 | + elif [ "$os-$arch" == "Windows-i386" ] | |
204 | + then | |
205 | + gcc_command="i686-w64-mingw32-gcc -pthread -static-libgcc -static-libstdc++ -std=c++98 -DNDEBUG -DMS_WIN64 -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -fPIC -I$MORFEUSZ_SRC/morfeusz -I$buildDir/../../.. -I$pythonDir/include -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
206 | + echo "$gcc_command" | |
207 | + eval $gcc_command | |
208 | + gpp_command="i686-w64-mingw32-g++ -pthread -static-libgcc -static-libstdc++ -DMS_WIN64 -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security $buildDir/swigPYTHON.o -L$buildDir/../.. -L$pythonDir/libs -lmorfeusz2 -l$pythonIncl -o $eggDir/_morfeusz2.pyd" | |
209 | + echo "$gpp_command" | |
210 | + eval $gpp_command | |
211 | + elif [ "$os-$arch" == "Linux-i386" ] | |
212 | + then | |
213 | + gcc_command="x86_64-linux-gnu-gcc -m32 -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I$MORFEUSZ_SRC/morfeusz -I$buildDir/../../.. -I$pythonDir -I$pythonDir/.. -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
214 | + echo "$gcc_command" | |
215 | + eval $gcc_command | |
216 | + gpp_command="x86_64-linux-gnu-g++ -m32 -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 $buildDir/swigPYTHON.o -L$buildDir/../.. -lmorfeusz2 -o $eggDir/_morfeusz2.so" | |
217 | + echo "$gpp_command" | |
218 | + eval $gpp_command | |
219 | + elif [ "$os-$arch" == "Darwin-amd64" ] | |
220 | + then | |
221 | + gcc_command="/usr/x86_64-apple-darwin9/bin/x86_64-apple-darwin9-gcc -std=c++98 -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -Wformat -D_FORTIFY_SOURCE=2 -fPIC -I$MORFEUSZ_SRC/morfeusz -I$buildDir/../../.. -I$pythonDir -I$pythonDir/.. -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
222 | + eval $gcc_command | |
223 | + gpp_command="/usr/x86_64-apple-darwin9/bin/x86_64-apple-darwin9-g++ -std=c++98 -Wall -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -install_name _morfeusz2.so $buildDir/swigPYTHON.o -L$buildDir/../.. -L$pythonLib -lmorfeusz2 -l$pythonIncl -o $eggDir/_morfeusz2.so" | |
224 | + eval $gpp_command | |
225 | + INSTALL_NAME_TOOL=/usr/x86_64-apple-darwin9/bin/x86_64-apple-darwin9-install_name_tool | |
226 | + ${INSTALL_NAME_TOOL} -change /usr/x86_64-apple-darwin9/x86_64-apple-darwin9/lib/libstdc++.6.dylib /usr/lib/libstdc++.6.dylib $eggDir/_morfeusz2.so | |
227 | + ${INSTALL_NAME_TOOL} -change libmorfeusz2.dylib @loader_path/libmorfeusz2.dylib $eggDir/_morfeusz2.so | |
228 | + # ${INSTALL_NAME_TOOL} -change libmorfeusz2.dylib @executable_path/../bin/libmorfeusz2.dylib $eggDir/_morfeusz2.so | |
229 | + fi | |
230 | + | |
231 | + | |
232 | + if [ "$os" == "Windows" ] | |
233 | + then | |
234 | + cp $buildDir/../../morfeusz2.dll $eggDir/ | |
235 | + elif [ "$os" == "Linux" ] | |
236 | + then | |
237 | + cp $buildDir/../../libmorfeusz2.so $eggDir/ | |
238 | + elif [ "$os" == "Darwin" ] | |
239 | + then | |
240 | + cp $buildDir/../../libmorfeusz2.dylib $eggDir/ | |
241 | + fi | |
242 | + | |
243 | + cp $buildDir/morfeusz2.py $eggDir/ | |
244 | + if [ -d "$buildDir/$eggName" ]; then | |
245 | + cd $buildDir/$eggName | |
246 | + if [ "$os-$arch" == "Windows-amd64" ] | |
247 | + then | |
248 | + zip -r $eggName-win-amd64.zip ./* | |
249 | + cp $eggName-win-amd64.zip $targetDir/$eggName-win-amd64.egg | |
250 | + elif [ "$os-$arch" == "Windows-i386" ] | |
251 | + then | |
252 | + zip -r $eggName-win32.zip ./* | |
253 | + cp $eggName-win32.zip $targetDir/$eggName-win32.egg | |
254 | + elif [ "$os-$arch" == "Linux-i386" ] | |
255 | + then | |
256 | + zip -r $eggName-linux-i686.zip ./* | |
257 | + cp $eggName-linux-i686.zip $targetDir/$eggName-linux-i686.egg | |
258 | + elif [ "$os-$arch" == "Darwin-amd64" ] | |
259 | + then | |
260 | + zip -r $eggName-macosx-10.9-x86_64.zip ./* | |
261 | + cp $eggName-macosx-10.9-x86_64.zip $targetDir/$eggName-macosx-10.9-x86_64.egg | |
262 | + fi | |
263 | + fi | |
264 | + | |
265 | +} | |
266 | +export -f buildegg | |
102 | 267 | |
103 | 268 | function log { |
104 | 269 | os=$1 |
105 | 270 | arch=$2 |
106 | - stdbuf -oL sed -e $"s/^/$os-$arch:\t/" | tee "log/$os-$arch.out" | |
271 | + stdbuf -oL sed -e $"s/^/$os-$arch:\t/" | tee -a "log/$os-$arch.out" | |
107 | 272 | } |
108 | - | |
109 | -export -f build | |
110 | 273 | export -f log |
111 | 274 | |
112 | -rm -rf log target | |
113 | -mkdir -p log | |
114 | - | |
115 | -buildDictionaries 2>&1 | log All all | |
116 | - | |
117 | -{ | |
118 | - #echo "build Linux amd64 true package package-java package-python package-builder 2>&1 | log Linux-tgz amd64" | |
119 | - #echo "build Linux amd64 false package 2>&1 | log Linux-deb amd64" | |
120 | - #echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true package package-java 2>&1 | log Linux-tgz i386" | |
121 | - #echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 false package 2>&1 | log Linux-deb i386" | |
122 | - #echo "build Windows amd64 true package package-java 2>&1 | log Windows amd64" | |
123 | - #echo "build Windows i386 true package package-java 2>&1 | log Windows i386" | |
124 | - echo "build Darwin amd64 true package package-java 2>&1 | log Darwin amd64" | |
125 | -} | xargs -n1 -P2 -d$'\n' bash -c | |
275 | +##??? rm -rf log $BUILD_ROOT | |
276 | +mkdir -p log | |
126 | 277 | |
278 | +build Darwin $BITS true 2 package package-java gui-dmg 2>&1 | log Darwin $BITS; | |
279 | +build Darwin $BITS true 2 py2morfeusz 2>&1 | log Darwin $BITS; | |
280 | +buildegg Darwin $BITS true 2 2>&1 | log Darwin $BITS; | |
281 | +build Darwin $BITS true 3 py3morfeusz 2>&1 | log Darwin $BITS; | |
282 | +buildegg Darwin $BITS true 3 2>&1 | log Darwin $BITS | |
283 | +#build Darwin $BITS true 2 package package-java py2morfeusz 2>&1 | log Darwin $BITS | |
284 | +#buildegg Darwin $BITS true 2 2>&1 | log Darwin $BITS | |
127 | 285 | |
... | ... |
buildDict.sh
0 → 100755
1 | +#! /bin/bash | |
2 | +# Buduje postać binarną i pliki .cpp zawierające słowniki SGJP i Polimorf | |
3 | +# | |
4 | +# Założenia: | |
5 | +# • kod źródłowy Morfeusza jest w MORFEUSZ_SRC | |
6 | +# • słowniki źródłowe są w katalogu SRC_DICT_DIR i nazywają się ‹słownik›-‹data›.tab | |
7 | +# • wynik kompilacji zostanie umieszczony w katalogu DICT_DIR (który zostanie skasowany i utworzony) | |
8 | +# • kompilacja odbędzie się w katalogu BUILD_DIR (który zostanie skasowany i utworzony) | |
9 | + | |
10 | + | |
11 | +set -ex -o pipefail | |
12 | + | |
13 | +if [ "$#" -ne 1 ]; then | |
14 | + echo "Exactly 1 argument needed: ‹DICT_VERSION›" | |
15 | + exit 1 | |
16 | +fi | |
17 | + | |
18 | +export MORFEUSZ_SRC=`pwd`/Morfeusz | |
19 | +export DICT_DIR=`pwd`/dicts | |
20 | +export SRC_DICT_DIR=$DICT_DIR | |
21 | +export BUILD_DIR=`pwd`/build/dicts | |
22 | + | |
23 | +rm -rf $BUILD_DIR || true | |
24 | + | |
25 | +mkdir -p $BUILD_DIR $DICT_DIR | |
26 | + | |
27 | +cd $BUILD_DIR | |
28 | +cmake $MORFEUSZ_SRC | |
29 | + | |
30 | + | |
31 | +export DICT_VERSION="$1" | |
32 | + | |
33 | +# argument: nazwa słownika | |
34 | +function buildDictionary { | |
35 | + set -x | |
36 | + DICT_NAME=$1 | |
37 | + | |
38 | + MAIN_DICT=$SRC_DICT_DIR/$DICT_NAME-$DICT_VERSION.tab | |
39 | + INPUT_DICTIONARIES="$MAIN_DICT,$MORFEUSZ_SRC/input/dodatki.tab" | |
40 | + INPUT_TAGSET=$MORFEUSZ_SRC/input/morfeusz-sgjp.tagset | |
41 | + SEGMENT_RULES_FILE=$MORFEUSZ_SRC/input/segmenty.dat | |
42 | + ANALYZER_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-a.cpp | |
43 | + GENERATOR_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-s.cpp | |
44 | + | |
45 | + fsabuilder/morfeusz_builder \ | |
46 | + --input-files="$INPUT_DICTIONARIES" \ | |
47 | + --tagset-file="$INPUT_TAGSET" \ | |
48 | + --segments-file="$SEGMENT_RULES_FILE" \ | |
49 | + --analyzer-cpp="$ANALYZER_DICTIONARY_CPP" \ | |
50 | + --generator-cpp="$GENERATOR_DICTIONARY_CPP" \ | |
51 | + --dict="$DICT_NAME" \ | |
52 | + --dict-dir="$DICT_DIR" | |
53 | + | |
54 | + echo "DONE building dictionaries" >&2 | |
55 | + | |
56 | + DICT_PACKAGE=morfeusz2-dictionary-${DICT_NAME}-${DICT_VERSION}.tgz | |
57 | + (cd $DICT_DIR; tar czvf $DICT_PACKAGE $DICT_NAME-a.dict $DICT_NAME-s.dict ) | |
58 | + gzip "$MAIN_DICT" | |
59 | +} | |
60 | + | |
61 | +export -f buildDictionary | |
62 | + | |
63 | + | |
64 | +{ | |
65 | + echo "buildDictionary sgjp" | |
66 | + echo "buildDictionary polimorf" | |
67 | +} | xargs -n1 -P6 -d$'\n' bash -c | |
... | ... |
buildLinux.sh
0 → 100755
1 | +#!/bin/bash | |
2 | +# Kompiluje bibliotekę i buduje paczki dystrybucyjne zawierające | |
3 | +# Morfeusza i słowniki SGJP i Polimorf | |
4 | +# | |
5 | +# Założenia: | |
6 | +# • kod źródłowy Morfeusza jest w MORFEUSZ_SRC | |
7 | +# • słowniki są już skompilowane w katalogu DICT_DIR | |
8 | +# • kompilacja odbędzie się w katalogu BUILD_DIR (który zostanie skasowany i utworzony) | |
9 | +# • wyniki zostaną umieszczone w TARGET_DIR | |
10 | + | |
11 | +#set -ex -o pipefail | |
12 | +set -x | |
13 | + | |
14 | +if [ "$#" -ne 4 ]; then | |
15 | + echo "Expected arguments: ‹DICT_NAME› ‹DICT_VERSION› ‹BUILD_ENV› ‹64/32›" | |
16 | + exit 1 | |
17 | +fi | |
18 | + | |
19 | +export DICT_NAME="$1" | |
20 | +export DICT_VERSION="$2" | |
21 | + | |
22 | +export MORFEUSZ_SRC=`pwd`/Morfeusz | |
23 | +export DICT_DIR=`pwd`/dicts | |
24 | +export ANALYZER_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-a.cpp | |
25 | +export GENERATOR_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-s.cpp | |
26 | + | |
27 | +# Wersja środowiska kompilacyjnego (znaczy pod którym Ubuntu budujemy: 14.04, 16.04, 18.04, 19.04 …): | |
28 | +# Staje się debianowym numerem subwersji: morfeusz…_1.9.27-18.04_amd64.deb | |
29 | +export BUILD_ENV=$3 | |
30 | + | |
31 | +export BITS=$4 | |
32 | + | |
33 | +export BUILD_ROOT=`pwd`/build/$1 | |
34 | +export TARGET_ROOT=`pwd`/target | |
35 | + | |
36 | + | |
37 | + | |
38 | +function build { | |
39 | + set -e -o pipefail | |
40 | + os=$1 | |
41 | + arch=$2 | |
42 | + embedded=$3 | |
43 | + python_ver=$4 | |
44 | + shift 4 | |
45 | + targets=$@ | |
46 | + | |
47 | +# toolchain=$MORFEUSZ_SRC/toolchains/Toolchain-$os-$arch.cmake | |
48 | + toolchain=$MORFEUSZ_SRC/toolchains/Toolchain-Linux-native.cmake | |
49 | + if [ "$os" = "Linux" ]; then | |
50 | + buildDir=$BUILD_ROOT/$os-$BUILD_ENV-$arch-$embedded | |
51 | + targetDir=$TARGET_ROOT/$os/$BUILD_ENV/$arch | |
52 | + else | |
53 | + buildDir=$BUILD_ROOT/$os-$arch-$embedded | |
54 | + targetDir=$TARGET_ROOT/$os/$arch | |
55 | + fi | |
56 | +# rm -rf $buildDir || true | |
57 | + mkdir -p $buildDir | |
58 | + | |
59 | + | |
60 | +# echo "Will use $toolchain toolchain" | |
61 | + | |
62 | + # rm -rf $buildDir | |
63 | + #~ rm -rf $targetDir | |
64 | + mkdir -p $buildDir | |
65 | + rm -f $buildDir/CMakeCache.txt | |
66 | + mkdir -p $targetDir | |
67 | + cd $buildDir | |
68 | + | |
69 | + if [ "$embedded" = true ] | |
70 | + then | |
71 | + if [ "$os" == "Linux" ] | |
72 | + then | |
73 | + CPACK_GENERATOR=TGZ | |
74 | + fi | |
75 | + CMAKE_ARGS="-D CMAKE_TOOLCHAIN_FILE=$toolchain \ | |
76 | + -D TARGET_DIR=$targetDir \ | |
77 | + -D ANALYZER_DICTIONARY_CPP=$ANALYZER_DICTIONARY_CPP \ | |
78 | + -D GENERATOR_DICTIONARY_CPP=$GENERATOR_DICTIONARY_CPP \ | |
79 | + -D DEFAULT_DICT_NAME=$DICT_NAME \ | |
80 | + -D SKIP_DICTIONARY_BUILDING=1 \ | |
81 | + -D EMBEDDED_DEFAULT_DICT=1 \ | |
82 | + -D DICT_VERSION=$DICT_VERSION \ | |
83 | + -D BUILT_ON=$BUILD_ENV " | |
84 | + if [ "$CPACK_GENERATOR" != "" ] | |
85 | + then | |
86 | + CMAKE_ARGS="$CMAKE_ARGS -D CPACK_GENERATOR=$CPACK_GENERATOR" | |
87 | + fi | |
88 | + else | |
89 | + # "setting default ACL to prevent control-file-has-bad-permissions lintian error" | |
90 | + setfacl -R -d -m o::rx -m g::rx -m u::rwx . | |
91 | + | |
92 | + CMAKE_ARGS="-D CMAKE_TOOLCHAIN_FILE=$toolchain \ | |
93 | + -D TARGET_DIR=$targetDir \ | |
94 | + -D DEFAULT_DICT_DIR=$DICT_DIR \ | |
95 | + -D DEFAULT_DICT_NAME=$DICT_NAME \ | |
96 | + -D SKIP_DICTIONARY_BUILDING=1 \ | |
97 | + -D CPACK_GENERATOR=DEB \ | |
98 | + -D DICT_VERSION=$DICT_VERSION \ | |
99 | + -D BUILT_ON=$BUILD_ENV " | |
100 | + fi | |
101 | + CMAKE_ARGS="$CMAKE_ARGS -D PY=$python_ver" | |
102 | + cmake $CMAKE_ARGS $MORFEUSZ_SRC 2>&1 | |
103 | + echo "building for $os-$arch ($BUILD_ENV)" >&2 | |
104 | +# make | |
105 | + make $targets | |
106 | + | |
107 | + # for f in `find "$targetDir" -name "*-Linux-*.deb"` | |
108 | + # do | |
109 | + # mv "$f" "`echo $f | sed -r 's/Linux-amd64.deb$/amd64.deb/' | sed -r 's/Linux-i386.deb/i386.deb/'`" | |
110 | + # done | |
111 | + | |
112 | + # for f in `find "$targetDir" -name "*-Linux-*.egg"` | |
113 | + # do | |
114 | + # mv "$f" "`echo $f | sed -r 's/Linux-amd64.egg$/linux-x86_64.egg/' | sed -r 's/Linux-i386.egg$/linux-i686.egg/'`" | |
115 | + # done | |
116 | + | |
117 | +} | |
118 | +export -f build | |
119 | + | |
120 | +function log { | |
121 | + os=$1 | |
122 | + arch=$2 | |
123 | + stdbuf -oL sed -e $"s/^/$os-$BUILD_ENV-$arch:\t/" | tee -a "log/$os-$BUILD_ENV-$arch.out" | |
124 | +} | |
125 | +export -f log | |
126 | + | |
127 | +##??? rm -rf log $BUILD_ROOT | |
128 | +mkdir -p log | |
129 | + | |
130 | +build Linux $BITS true 2.7 package package-java gui-tgz package-python2 2>&1 | log Linux-tgz2 $BITS; | |
131 | +build Linux $BITS true 3.0 package-python3 package-builder 2>&1 | log Linux-tgz3 $BITS | |
132 | +build Linux $BITS false 0 lib-deb bin-deb dev-deb dictionary-deb java-deb gui-deb 2>&1 | log Linux-deb $BITS | |
133 | + | |
134 | + | |
135 | +# { | |
136 | +# echo "build Linux amd64 true 2.7 package package-java package-python2 package-builder 2>&1 | log Linux-tgz2 amd64; \ | |
137 | +# build Linux amd64 true 3.0 package-python3 2>&1 | log Linux-tgz3 amd64" | |
138 | +# echo "build Linux amd64 false 0 lib-deb bin-deb dev-deb dictionary-deb java-deb 2>&1 | log Linux-deb amd64" | |
139 | +# echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 2.7 package package-java py2morfeusz 2>&1 | log Linux-tgz i386; \ | |
140 | +# buildegg Linux i386 true 2.7 2>&1 | log Linux i386; \ | |
141 | +# LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 3.0 py3morfeusz 2>&1 | log Linux-tgz i386; \ | |
142 | +# buildegg Linux i386 true 3.0 2>&1 | log Linux i386" | |
143 | +# echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 false 0 lib-deb bin-deb java-deb 2>&1 | log Linux-deb i386" | |
144 | +# echo "build Windows amd64 true 2.7 package package-java py2morfeusz 2>&1 | log Windows amd64; \ | |
145 | +# buildegg Windows amd64 true 2.7 2>&1 | log Windows amd64; \ | |
146 | +# build Windows amd64 true 3.6 py3morfeusz 2>&1 | log Windows amd64; \ | |
147 | +# buildegg Windows amd64 true 3.6 2>&1 | log Windows amd64; \ | |
148 | +# build Windows amd64 true 3.7 py3morfeusz 2>&1 | log Windows amd64; \ | |
149 | +# buildegg Windows amd64 true 3.7 2>&1 | log Windows amd64" | |
150 | +# echo "build Windows i386 true 2.7 package package-java py2morfeusz 2>&1 | log Windows i386; \ | |
151 | +# buildegg Windows i386 true 2.7 2>&1 | log Windows i386; \ | |
152 | +# build Windows i386 true 3.0 py3morfeusz 2>&1 | log Windows i386 \ | |
153 | +# buildegg Windows i386 true 3.0 2>&1 | log Windows i386" | |
154 | +# echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64; \ | |
155 | +# buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64; \ | |
156 | +# build Darwin amd64 true 3 py3morfeusz 2>&1 | log Darwin amd64; \ | |
157 | +# buildegg Darwin amd64 true 3 2>&1 | log Darwin amd64" | |
158 | +# echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64" | |
159 | +# echo "buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64" | |
160 | + | |
161 | +# } | xargs -n1 -P6 -d$'\n' bash -c | |
... | ... |
buildOtherDict.sh
0 → 100755
1 | +#!/bin/bash | |
2 | +# Kompiluje pakiet debianowy z dodatkowym słownikiem dla Morfeusza | |
3 | +# [Zrobione z myślą o Polimorfie, ale można użyć do innych.] | |
4 | +# | |
5 | +# Założenia: | |
6 | +# • kod źródłowy Morfeusza jest w MORFEUSZ_SRC | |
7 | +# • słowniki są już skompilowane w katalogu DICT_DIR | |
8 | +# • kompilacja odbędzie się w katalogu BUILD_DIR (który zostanie skasowany i utworzony) | |
9 | +# • wyniki zostaną umieszczone w TARGET_DIR | |
10 | + | |
11 | +#set -ex -o pipefail | |
12 | +set -x | |
13 | + | |
14 | +if [ "$#" -ne 2 ]; then | |
15 | + echo "Expected arguments: ‹DICT_NAME› ‹DICT_VERSION›" | |
16 | + exit 1 | |
17 | +fi | |
18 | + | |
19 | +export DICT_NAME="$1" | |
20 | +export DICT_VERSION="$2" | |
21 | + | |
22 | +export MORFEUSZ_SRC=`pwd`/Morfeusz | |
23 | +export DICT_DIR=`pwd`/dicts | |
24 | +export CROSSMORFEUSZ_ROOT=${HOME}/crossmorfeusz | |
25 | +export ANALYZER_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-a.cpp | |
26 | +export GENERATOR_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-s.cpp | |
27 | + | |
28 | +# Wersja środowiska kompilacyjnego (znaczy pod którym Ubuntu budujemy: 14.04, 16.04, 18.04, 19.04 …): | |
29 | +# Staje się debianowym numerem subwersji: morfeusz…_1.9.27-18.04_amd64.deb | |
30 | +export BUILD_ENV=18.04 | |
31 | + | |
32 | +export BITS=64 | |
33 | + | |
34 | +export BUILD_ROOT=`pwd`/build/$1 | |
35 | +export TARGET_ROOT=`pwd`/target | |
36 | + | |
37 | + | |
38 | + | |
39 | +function build { | |
40 | + set -e -o pipefail | |
41 | + os=$1 | |
42 | + arch=$2 | |
43 | + embedded=$3 | |
44 | + python_ver=$4 | |
45 | + shift 4 | |
46 | + targets=$@ | |
47 | + | |
48 | +# toolchain=$MORFEUSZ_SRC/toolchains/Toolchain-$os-$arch.cmake | |
49 | + toolchain=$MORFEUSZ_SRC/toolchains/Toolchain-Linux-native.cmake | |
50 | + buildDir=$BUILD_ROOT/$os-$BUILD_ENV-$arch-$embedded | |
51 | + targetDir=$TARGET_ROOT/$os/$BUILD_ENV/$arch | |
52 | +# rm -rf $buildDir || true | |
53 | + mkdir -p $buildDir | |
54 | + | |
55 | + | |
56 | +# echo "Will use $toolchain toolchain" | |
57 | + | |
58 | + # rm -rf $buildDir | |
59 | + #~ rm -rf $targetDir | |
60 | + mkdir -p $buildDir | |
61 | + rm -f $buildDir/CMakeCache.txt | |
62 | + mkdir -p $targetDir | |
63 | + cd $buildDir | |
64 | + | |
65 | + if [ "$embedded" = true ] | |
66 | + then | |
67 | + if [ "$os" == "Linux" ] | |
68 | + then | |
69 | + CPACK_GENERATOR=TGZ | |
70 | + fi | |
71 | + CMAKE_ARGS="-D CMAKE_TOOLCHAIN_FILE=$toolchain \ | |
72 | + -D TARGET_DIR=$targetDir \ | |
73 | + -D ANALYZER_DICTIONARY_CPP=$ANALYZER_DICTIONARY_CPP \ | |
74 | + -D GENERATOR_DICTIONARY_CPP=$GENERATOR_DICTIONARY_CPP \ | |
75 | + -D DEFAULT_DICT_NAME=$DICT_NAME \ | |
76 | + -D SKIP_DICTIONARY_BUILDING=1 \ | |
77 | + -D EMBEDDED_DEFAULT_DICT=1 \ | |
78 | + -D DICT_VERSION=$DICT_VERSION \ | |
79 | + -D BUILT_ON=$BUILD_ENV " | |
80 | + if [ "$CPACK_GENERATOR" != "" ] | |
81 | + then | |
82 | + CMAKE_ARGS="$CMAKE_ARGS -D CPACK_GENERATOR=$CPACK_GENERATOR" | |
83 | + fi | |
84 | + else | |
85 | + # "setting default ACL to prevent control-file-has-bad-permissions lintian error" | |
86 | + setfacl -R -d -m o::rx -m g::rx -m u::rwx . | |
87 | + | |
88 | + CMAKE_ARGS="-D CMAKE_TOOLCHAIN_FILE=$toolchain \ | |
89 | + -D TARGET_DIR=$targetDir \ | |
90 | + -D DEFAULT_DICT_DIR=$DICT_DIR \ | |
91 | + -D DEFAULT_DICT_NAME=$DICT_NAME \ | |
92 | + -D SKIP_DICTIONARY_BUILDING=1 \ | |
93 | + -D CPACK_GENERATOR=DEB \ | |
94 | + -D DICT_VERSION=$DICT_VERSION \ | |
95 | + -D BUILT_ON=$BUILD_ENV " | |
96 | + fi | |
97 | + CMAKE_ARGS="$CMAKE_ARGS -D PY=$python_ver" | |
98 | + cmake $CMAKE_ARGS $MORFEUSZ_SRC 2>&1 | |
99 | + echo "building $DICT_NAME for $os-$arch ($BUILD_ENV)" >&2 | |
100 | +# make | |
101 | + make $targets | |
102 | + | |
103 | + # for f in `find "$targetDir" -name "*-Linux-*.deb"` | |
104 | + # do | |
105 | + # mv "$f" "`echo $f | sed -r 's/Linux-amd64.deb$/amd64.deb/' | sed -r 's/Linux-i386.deb/i386.deb/'`" | |
106 | + # done | |
107 | + | |
108 | + # for f in `find "$targetDir" -name "*-Linux-*.egg"` | |
109 | + # do | |
110 | + # mv "$f" "`echo $f | sed -r 's/Linux-amd64.egg$/linux-x86_64.egg/' | sed -r 's/Linux-i386.egg$/linux-i686.egg/'`" | |
111 | + # done | |
112 | + | |
113 | +} | |
114 | +export -f build | |
115 | + | |
116 | +function log { | |
117 | + os=$1 | |
118 | + arch=$2 | |
119 | + stdbuf -oL sed -e $"s/^/$os-$BUILD_ENV-$arch:\t/" | tee "log/$os-$BUILD_ENV-$arch-$DICT_NAME.out" | |
120 | +} | |
121 | +export -f log | |
122 | + | |
123 | +##??? rm -rf log $BUILD_ROOT | |
124 | +mkdir -p log | |
125 | + | |
126 | +build Linux $BITS false 0 dictionary-deb 2>&1 | log Linux-deb $BITS | |
127 | + | |
128 | + | |
129 | +# { | |
130 | +# echo "build Linux amd64 true 2.7 package package-java package-python2 package-builder 2>&1 | log Linux-tgz2 amd64; \ | |
131 | +# build Linux amd64 true 3.0 package-python3 2>&1 | log Linux-tgz3 amd64" | |
132 | +# echo "build Linux amd64 false 0 lib-deb bin-deb dev-deb dictionary-deb java-deb 2>&1 | log Linux-deb amd64" | |
133 | +# echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 2.7 package package-java py2morfeusz 2>&1 | log Linux-tgz i386; \ | |
134 | +# buildegg Linux i386 true 2.7 2>&1 | log Linux i386; \ | |
135 | +# LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 3.0 py3morfeusz 2>&1 | log Linux-tgz i386; \ | |
136 | +# buildegg Linux i386 true 3.0 2>&1 | log Linux i386" | |
137 | +# echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 false 0 lib-deb bin-deb java-deb 2>&1 | log Linux-deb i386" | |
138 | +# echo "build Windows amd64 true 2.7 package package-java py2morfeusz 2>&1 | log Windows amd64; \ | |
139 | +# buildegg Windows amd64 true 2.7 2>&1 | log Windows amd64; \ | |
140 | +# build Windows amd64 true 3.6 py3morfeusz 2>&1 | log Windows amd64; \ | |
141 | +# buildegg Windows amd64 true 3.6 2>&1 | log Windows amd64; \ | |
142 | +# build Windows amd64 true 3.7 py3morfeusz 2>&1 | log Windows amd64; \ | |
143 | +# buildegg Windows amd64 true 3.7 2>&1 | log Windows amd64" | |
144 | +# echo "build Windows i386 true 2.7 package package-java py2morfeusz 2>&1 | log Windows i386; \ | |
145 | +# buildegg Windows i386 true 2.7 2>&1 | log Windows i386; \ | |
146 | +# build Windows i386 true 3.0 py3morfeusz 2>&1 | log Windows i386 \ | |
147 | +# buildegg Windows i386 true 3.0 2>&1 | log Windows i386" | |
148 | +# echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64; \ | |
149 | +# buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64; \ | |
150 | +# build Darwin amd64 true 3 py3morfeusz 2>&1 | log Darwin amd64; \ | |
151 | +# buildegg Darwin amd64 true 3 2>&1 | log Darwin amd64" | |
152 | +# echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64" | |
153 | +# echo "buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64" | |
154 | + | |
155 | +# } | xargs -n1 -P6 -d$'\n' bash -c | |
... | ... |
buildAll.sh renamed to buildWindows.sh
1 | 1 | #!/bin/bash |
2 | +# Kompiluje bibliotekę i buduje paczki dystrybucyjne zawierające | |
3 | +# Morfeusza i słowniki SGJP i Polimorf | |
4 | +# | |
5 | +# Założenia: | |
6 | +# • kod źródłowy Morfeusza jest w MORFEUSZ_SRC | |
7 | +# • słowniki są już skompilowane w katalogu DICT_DIR | |
8 | +# • kompilacja odbędzie się w katalogu BUILD_DIR (który zostanie skasowany i utworzony) | |
9 | +# • wyniki zostaną umieszczone w TARGET_DIR | |
2 | 10 | |
3 | -set -e -o pipefail | |
11 | +#set -ex -o pipefail | |
12 | +set -x | |
4 | 13 | |
5 | -if [ "$#" -ne 4 ]; then | |
6 | - echo "Must provide exactly 4 arguments: <CROSSMORFEUSZ_ROOT> <INPUT_DICTIONARIES> <DEFAULT_DICT_NAME> <DICT_VERSION>" | |
14 | +if [ "$#" -ne 3 ]; then | |
15 | + echo "Expected arguments: ‹DICT_NAME› ‹DICT_VERSION› ‹64/32›" | |
7 | 16 | exit 1 |
8 | 17 | fi |
9 | 18 | |
10 | -export CROSSMORFEUSZ_ROOT="$1" | |
11 | -export INPUT_DICTIONARIES="$2" | |
12 | -export DEFAULT_DICT_NAME="$3" | |
13 | -export DICT_VERSION="$4" | |
14 | -export ANALYZER_DICTIONARY_CPP=`mktemp`.cpp | |
15 | -export GENERATOR_DICTIONARY_CPP=`mktemp`.cpp | |
16 | -export DICT_DIR=`mktemp -d` | |
19 | +export DICT_NAME="$1" | |
20 | +export DICT_VERSION="$2" | |
21 | +export BITS=$3 | |
22 | + | |
23 | + | |
24 | +export MORFEUSZ_SRC=`pwd`/Morfeusz | |
25 | +export DICT_DIR=`pwd`/dicts | |
26 | +export CROSSMORFEUSZ_ROOT=${HOME}/crosslibs | |
27 | +export ANALYZER_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-a.cpp | |
28 | +export GENERATOR_DICTIONARY_CPP=$DICT_DIR/$DICT_NAME-s.cpp | |
29 | + | |
30 | + | |
31 | +export BUILD_ROOT=`pwd`/build/$1 | |
32 | +export TARGET_ROOT=`pwd`/target | |
33 | + | |
17 | 34 | |
18 | -function buildDictionaries { | |
19 | - | |
20 | - INPUT_TAGSET=input/morfeusz-sgjp.tagset | |
21 | - SEGMENT_RULES_FILE=input/segmenty.dat | |
22 | - | |
23 | - python fsabuilder/morfeusz_builder \ | |
24 | - --input-files="$INPUT_DICTIONARIES" \ | |
25 | - --tagset-file="$INPUT_TAGSET" \ | |
26 | - --segments-file="$SEGMENT_RULES_FILE" \ | |
27 | - --analyzer-cpp="$ANALYZER_DICTIONARY_CPP" \ | |
28 | - --generator-cpp="$GENERATOR_DICTIONARY_CPP" \ | |
29 | - --dict="$DEFAULT_DICT_NAME" \ | |
30 | - --dict-dir="$DICT_DIR" | |
31 | - | |
32 | - echo "DONE building dictionaries" >&2 | |
33 | -} | |
34 | 35 | |
35 | 36 | function build { |
36 | 37 | set -e -o pipefail |
37 | 38 | os=$1 |
38 | - arch=$2 | |
39 | + bity=$2 | |
39 | 40 | embedded=$3 |
40 | 41 | python_ver=$4 |
41 | - shift | |
42 | - shift | |
43 | - shift | |
44 | - shift | |
42 | + shift 4 | |
45 | 43 | targets=$@ |
44 | + | |
45 | + if [ "$bity" = "64" ]; then | |
46 | + arch=amd64 | |
47 | + else | |
48 | + arch=i386 | |
49 | + fi | |
50 | + | |
51 | + toolchain=$MORFEUSZ_SRC/toolchains/Toolchain-$os-$arch.cmake | |
52 | + | |
53 | + buildDir=$BUILD_ROOT/$os-$bity-$embedded | |
54 | + targetDir=$TARGET_ROOT/$os/$bity | |
55 | + | |
56 | +# rm -rf $buildDir || true | |
57 | + mkdir -p $buildDir | |
58 | + | |
46 | 59 | |
47 | - srcDir=`pwd` | |
48 | - buildDir=buildall/$os-$arch-$embedded | |
49 | - targetDir=$srcDir/target | |
50 | - toolchain=$srcDir/toolchains/Toolchain-$os-$arch.cmake | |
51 | - | |
52 | - echo "Will use $toolchain toolchain" | |
60 | +# echo "Will use $toolchain toolchain" | |
53 | 61 | |
54 | 62 | # rm -rf $buildDir |
55 | 63 | #~ rm -rf $targetDir |
56 | - rm -f $buildDir/CMakeCache.txt | |
57 | 64 | mkdir -p $buildDir |
65 | + rm -f $buildDir/CMakeCache.txt | |
58 | 66 | mkdir -p $targetDir |
59 | 67 | cd $buildDir |
60 | 68 | |
... | ... | @@ -69,64 +77,59 @@ function build { |
69 | 77 | -D TARGET_DIR=$targetDir \ |
70 | 78 | -D ANALYZER_DICTIONARY_CPP=$ANALYZER_DICTIONARY_CPP \ |
71 | 79 | -D GENERATOR_DICTIONARY_CPP=$GENERATOR_DICTIONARY_CPP \ |
72 | - -D DEFAULT_DICT_NAME=$DEFAULT_DICT_NAME \ | |
80 | + -D DEFAULT_DICT_NAME=$DICT_NAME \ | |
73 | 81 | -D SKIP_DICTIONARY_BUILDING=1 \ |
74 | 82 | -D EMBEDDED_DEFAULT_DICT=1 \ |
75 | - -D DICT_VERSION=$DICT_VERSION" | |
83 | + -D DICT_VERSION=$DICT_VERSION " | |
76 | 84 | if [ "$CPACK_GENERATOR" != "" ] |
77 | 85 | then |
78 | 86 | CMAKE_ARGS="$CMAKE_ARGS -D CPACK_GENERATOR=$CPACK_GENERATOR" |
79 | 87 | fi |
80 | 88 | else |
81 | - echo "setting default ACL to prevent control-file-has-bad-permissions lintian error" | |
82 | - setfacl -R -d -m o::rx -m g::rx -m u::rwx . | |
89 | + # "setting default ACL to prevent control-file-has-bad-permissions lintian error" | |
90 | + #setfacl -R -d -m o::rx -m g::rx -m u::rwx . | |
83 | 91 | |
84 | 92 | CMAKE_ARGS="-D CROSSMORFEUSZ_ROOT=$CROSSMORFEUSZ_ROOT \ |
85 | 93 | -D CMAKE_TOOLCHAIN_FILE=$toolchain \ |
86 | 94 | -D TARGET_DIR=$targetDir \ |
87 | 95 | -D DEFAULT_DICT_DIR=$DICT_DIR \ |
88 | - -D DEFAULT_DICT_NAME=$DEFAULT_DICT_NAME \ | |
96 | + -D DEFAULT_DICT_NAME=$DICT_NAME \ | |
89 | 97 | -D SKIP_DICTIONARY_BUILDING=1 \ |
90 | 98 | -D CPACK_GENERATOR=DEB \ |
91 | - -D DICT_VERSION=$DICT_VERSION" | |
99 | + -D DICT_VERSION=$DICT_VERSION " | |
92 | 100 | fi |
93 | 101 | CMAKE_ARGS="$CMAKE_ARGS -D PY=$python_ver" |
94 | - cmake $CMAKE_ARGS $srcDir 2>&1 | |
95 | - echo "building $toolchain" >&2 | |
96 | - make | |
102 | + cmake $CMAKE_ARGS $MORFEUSZ_SRC 2>&1 | |
103 | + echo "building for $os-$arch" >&2 | |
104 | +# make | |
97 | 105 | make $targets |
98 | 106 | |
99 | - for f in `find "$targetDir" -name "*-Linux-*.deb"` | |
100 | - do | |
101 | - mv "$f" "`echo $f | sed -r 's/Linux-amd64.deb$/amd64.deb/' | sed -r 's/Linux-i386.deb/i386.deb/'`" | |
102 | - done | |
107 | + # for f in `find "$targetDir" -name "*-Linux-*.deb"` | |
108 | + # do | |
109 | + # mv "$f" "`echo $f | sed -r 's/Linux-amd64.deb$/amd64.deb/' | sed -r 's/Linux-i386.deb/i386.deb/'`" | |
110 | + # done | |
103 | 111 | |
104 | - for f in `find "$targetDir" -name "*-Linux-*.egg"` | |
105 | - do | |
106 | - mv "$f" "`echo $f | sed -r 's/Linux-amd64.egg$/linux-x86_64.egg/' | sed -r 's/Linux-i386.egg$/linux-i686.egg/'`" | |
107 | - done | |
108 | - | |
109 | - if [ "$os" = Linux -a "$embedded" = false ]; then | |
110 | - "$srcDir/createDictionaryDeb.sh" "$DICT_DIR" "${DEFAULT_DICT_NAME}" "${DICT_VERSION}" "${targetDir}" | |
111 | - fi | |
112 | + # for f in `find "$targetDir" -name "*-Linux-*.egg"` | |
113 | + # do | |
114 | + # mv "$f" "`echo $f | sed -r 's/Linux-amd64.egg$/linux-x86_64.egg/' | sed -r 's/Linux-i386.egg$/linux-i686.egg/'`" | |
115 | + # done | |
112 | 116 | |
113 | - cd "$srcDir" | |
114 | -} | |
115 | - | |
116 | -function log { | |
117 | - os=$1 | |
118 | - arch=$2 | |
119 | - stdbuf -oL sed -e $"s/^/$os-$arch:\t/" | tee "log/$os-$arch.out" | |
120 | 117 | } |
118 | +export -f build | |
121 | 119 | |
122 | 120 | function buildegg { |
123 | 121 | os=$1 |
124 | - arch=$2 | |
122 | + bity=$2 | |
125 | 123 | embedded=$3 |
126 | 124 | python_ver=$4 |
127 | 125 | |
128 | - srcDir=`pwd` | |
129 | - buildDir=buildall/$os-$arch-$embedded/morfeusz/wrappers/python${python_ver:0:1} | |
126 | + if [ "$bity" = "64" ]; then | |
127 | + arch=amd64 | |
128 | + else | |
129 | + arch=i386 | |
130 | + fi | |
131 | + | |
132 | + buildDir=$BUILD_ROOT/$os-$bity-$embedded/morfeusz/wrappers/python${python_ver:0:1} | |
130 | 133 | if [[ "$python_ver" =~ 2.* ]] |
131 | 134 | then |
132 | 135 | eggName=morfeusz2-0.4.0-py2.7 |
... | ... | @@ -182,14 +185,14 @@ function buildegg { |
182 | 185 | fi |
183 | 186 | fi |
184 | 187 | |
185 | - targetDir=$srcDir/target | |
186 | - echo "$srcDir" | |
187 | - echo "$buildDir" | |
188 | - echo "$eggDir" | |
189 | - echo "$pythonDir" | |
188 | + targetDir=$TARGET_ROOT/$os/$bity | |
189 | + echo "src_dir: $MORFEUSZ_SRC" | |
190 | + echo "python_build_dir: $buildDir" | |
191 | + echo "egg_dir: $eggDir" | |
192 | + echo "python_lib_dir: $pythonDir" | |
190 | 193 | if [ "$os-$arch" == "Windows-amd64" ] |
191 | 194 | then |
192 | - gcc_command="x86_64-w64-mingw32-gcc -pthread -static-libgcc -static-libstdc++ -std=c++98 -DNDEBUG -DMS_WIN64 -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -fPIC -I$srcDir/morfeusz -I$buildDir/../../.. -I$pythonDir/include -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
195 | + gcc_command="x86_64-w64-mingw32-gcc -pthread -static-libgcc -static-libstdc++ -std=c++98 -DNDEBUG -DMS_WIN64 -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -fPIC -I$MORFEUSZ_SRC/morfeusz -I$buildDir/../../.. -I$pythonDir/include -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
193 | 196 | echo "$gcc_command" |
194 | 197 | eval $gcc_command |
195 | 198 | gpp_command="x86_64-w64-mingw32-g++ -pthread -static-libgcc -static-libstdc++ -DMS_WIN64 -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security $buildDir/swigPYTHON.o -L$buildDir/../.. -L$pythonDir/libs -lmorfeusz2 -l$pythonIncl -o $eggDir/_morfeusz2.pyd" |
... | ... | @@ -197,7 +200,7 @@ function buildegg { |
197 | 200 | eval $gpp_command |
198 | 201 | elif [ "$os-$arch" == "Windows-i386" ] |
199 | 202 | then |
200 | - gcc_command="i686-w64-mingw32-gcc -pthread -static-libgcc -static-libstdc++ -std=c++98 -DNDEBUG -DMS_WIN64 -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -fPIC -I$srcDir/morfeusz -I$buildDir/../../.. -I$pythonDir/include -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
203 | + gcc_command="i686-w64-mingw32-gcc -pthread -static-libgcc -static-libstdc++ -std=c++98 -DNDEBUG -DMS_WIN64 -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -fPIC -I$MORFEUSZ_SRC/morfeusz -I$buildDir/../../.. -I$pythonDir/include -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
201 | 204 | echo "$gcc_command" |
202 | 205 | eval $gcc_command |
203 | 206 | gpp_command="i686-w64-mingw32-g++ -pthread -static-libgcc -static-libstdc++ -DMS_WIN64 -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-stack-protector -Wformat -Werror=format-security $buildDir/swigPYTHON.o -L$buildDir/../.. -L$pythonDir/libs -lmorfeusz2 -l$pythonIncl -o $eggDir/_morfeusz2.pyd" |
... | ... | @@ -205,7 +208,7 @@ function buildegg { |
205 | 208 | eval $gpp_command |
206 | 209 | elif [ "$os-$arch" == "Linux-i386" ] |
207 | 210 | then |
208 | - gcc_command="x86_64-linux-gnu-gcc -m32 -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I$srcDir/morfeusz -I$buildDir/../../.. -I$pythonDir -I$pythonDir/.. -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
211 | + gcc_command="x86_64-linux-gnu-gcc -m32 -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I$MORFEUSZ_SRC/morfeusz -I$buildDir/../../.. -I$pythonDir -I$pythonDir/.. -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
209 | 212 | echo "$gcc_command" |
210 | 213 | eval $gcc_command |
211 | 214 | gpp_command="x86_64-linux-gnu-g++ -m32 -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 $buildDir/swigPYTHON.o -L$buildDir/../.. -lmorfeusz2 -o $eggDir/_morfeusz2.so" |
... | ... | @@ -213,7 +216,7 @@ function buildegg { |
213 | 216 | eval $gpp_command |
214 | 217 | elif [ "$os-$arch" == "Darwin-amd64" ] |
215 | 218 | then |
216 | - gcc_command="/home/zil/crossmorfeusz/darwin64/x86_64-apple-darwin9/bin/x86_64-apple-darwin9-gcc -std=c++98 -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -Wformat -D_FORTIFY_SOURCE=2 -fPIC -I$srcDir/morfeusz -I$buildDir/../../.. -I$pythonDir -I$pythonDir/.. -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
219 | + gcc_command="/home/zil/crossmorfeusz/darwin64/x86_64-apple-darwin9/bin/x86_64-apple-darwin9-gcc -std=c++98 -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -Wformat -D_FORTIFY_SOURCE=2 -fPIC -I$MORFEUSZ_SRC/morfeusz -I$buildDir/../../.. -I$pythonDir -I$pythonDir/.. -c $buildDir/swigPYTHON.cpp -o $buildDir/swigPYTHON.o" | |
217 | 220 | echo "$gcc_command" |
218 | 221 | eval $gcc_command |
219 | 222 | gpp_command="/home/zil/crossmorfeusz/darwin64/x86_64-apple-darwin9/bin/x86_64-apple-darwin9-g++ -std=c++98 -Wall -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -install_name _morfeusz2.so $buildDir/swigPYTHON.o -L$buildDir/../.. -L$pythonLib -lmorfeusz2 -l$pythonIncl -o $eggDir/_morfeusz2.so" |
... | ... | @@ -256,54 +259,56 @@ function buildegg { |
256 | 259 | fi |
257 | 260 | |
258 | 261 | } |
262 | +export -f buildegg | |
259 | 263 | |
260 | -export -f build | |
264 | +function log { | |
265 | + os=$1 | |
266 | + arch=$2 | |
267 | + stdbuf -oL sed -e $"s/^/$os-$arch:\t/" | tee -a "log/$os-$arch.out" | |
268 | +} | |
261 | 269 | export -f log |
262 | -export -f buildegg | |
263 | 270 | |
264 | -rm -rf log target buildall | |
265 | -mkdir -p log buildall | |
266 | - | |
267 | -buildDictionaries 2>&1 | log All all | |
268 | - | |
269 | -{ | |
270 | - echo "build Linux amd64 true 2.7 package package-java package-python2 package-builder 2>&1 | log Linux-tgz2 amd64; \ | |
271 | - build Linux amd64 true 3.0 package-python3 2>&1 | log Linux-tgz3 amd64" | |
272 | - echo "build Linux amd64 false 0 lib-deb bin-deb dev-deb dictionary-deb java-deb 2>&1 | log Linux-deb amd64" | |
273 | - echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 2.7 package package-java py2morfeusz 2>&1 | log Linux-tgz i386; \ | |
274 | - buildegg Linux i386 true 2.7 2>&1 | log Linux i386; \ | |
275 | - LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 3.0 py3morfeusz 2>&1 | log Linux-tgz i386; \ | |
276 | - buildegg Linux i386 true 3.0 2>&1 | log Linux i386" | |
277 | - echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 false 0 lib-deb bin-deb java-deb 2>&1 | log Linux-deb i386" | |
278 | - echo "build Windows amd64 true 2.7 package package-java py2morfeusz 2>&1 | log Windows amd64; \ | |
279 | - buildegg Windows amd64 true 2.7 2>&1 | log Windows amd64; \ | |
280 | - build Windows amd64 true 3.6 py3morfeusz 2>&1 | log Windows amd64; \ | |
281 | - buildegg Windows amd64 true 3.6 2>&1 | log Windows amd64; \ | |
282 | - build Windows amd64 true 3.7 py3morfeusz 2>&1 | log Windows amd64; \ | |
283 | - buildegg Windows amd64 true 3.7 2>&1 | log Windows amd64" | |
284 | - echo "build Windows i386 true 2.7 package package-java py2morfeusz 2>&1 | log Windows i386; \ | |
285 | - buildegg Windows i386 true 2.7 2>&1 | log Windows i386; \ | |
286 | - build Windows i386 true 3.0 py3morfeusz 2>&1 | log Windows i386 \ | |
287 | - buildegg Windows i386 true 3.0 2>&1 | log Windows i386" | |
288 | - echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64; \ | |
289 | - buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64; \ | |
290 | - build Darwin amd64 true 3 py3morfeusz 2>&1 | log Darwin amd64; \ | |
291 | - buildegg Darwin amd64 true 3 2>&1 | log Darwin amd64" | |
292 | - echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64" | |
293 | - echo "buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64" | |
294 | - | |
295 | -} | xargs -n1 -P6 -d$'\n' bash -c | |
296 | - | |
297 | -srcDir=`pwd` | |
298 | -targetDir=$srcDir/target | |
299 | - | |
300 | -for f in `find "$targetDir" -name "*-py3.6-linux-x86_64.egg"` | |
301 | -do | |
302 | - cp -f "$f" "`echo $f | sed -r 's/py3.6/py3.7/'`" | |
303 | -done | |
304 | - | |
305 | -for f in `find "$targetDir" -name "*-py3.5-linux-x86_64.egg"` | |
306 | -do | |
307 | - cp -f "$f" "`echo $f | sed -r 's/py3.5/py3.6/'`" | |
308 | - cp -f "$f" "`echo $f | sed -r 's/py3.5/py3.7/'`" | |
309 | -done | |
271 | +##??? rm -rf log $BUILD_ROOT | |
272 | +mkdir -p log | |
273 | + | |
274 | +build Windows $BITS true 2.7 package package-java py2morfeusz 2>&1 | log Windows $BITS | |
275 | +build Windows $BITS true 2.7 gui-installer 2>&1 | log Windows $BITS | |
276 | +buildegg Windows $BITS true 2.7 2>&1 | log Windows $BITS | |
277 | +build Windows $BITS true 3.6 py3morfeusz 2>&1 | log Windows $BITS | |
278 | +buildegg Windows $BITS true 3.6 2>&1 | log Windows $BITS | |
279 | +build Windows $BITS true 3.7 py3morfeusz 2>&1 | log Windows $BITS | |
280 | +buildegg Windows $BITS true 3.7 2>&1 | log Windows $BITS | |
281 | + | |
282 | +# build Windows $BITS true 2.7 package package-java py2morfeusz 2>&1 | log Windows $BITS | |
283 | +# buildegg Windows $BITS true 2.7 2>&1 | log Windows $BITS | |
284 | +# build Windows $BITS true 3.0 py3morfeusz 2>&1 | log Windows $BITS | |
285 | +# buildegg Windows $BITS true 3.0 2>&1 | log Windows $BITS | |
286 | + | |
287 | + | |
288 | +# { | |
289 | +# echo "build Linux amd64 true 2.7 package package-java package-python2 package-builder 2>&1 | log Linux-tgz2 amd64; \ | |
290 | +# build Linux amd64 true 3.0 package-python3 2>&1 | log Linux-tgz3 amd64" | |
291 | +# echo "build Linux amd64 false 0 lib-deb bin-deb dev-deb dictionary-deb java-deb 2>&1 | log Linux-deb amd64" | |
292 | +# echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 2.7 package package-java py2morfeusz 2>&1 | log Linux-tgz i386; \ | |
293 | +# buildegg Linux i386 true 2.7 2>&1 | log Linux i386; \ | |
294 | +# LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 3.0 py3morfeusz 2>&1 | log Linux-tgz i386; \ | |
295 | +# buildegg Linux i386 true 3.0 2>&1 | log Linux i386" | |
296 | +# echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 false 0 lib-deb bin-deb java-deb 2>&1 | log Linux-deb i386" | |
297 | +# echo "build Windows amd64 true 2.7 package package-java py2morfeusz 2>&1 | log Windows amd64; \ | |
298 | +# buildegg Windows amd64 true 2.7 2>&1 | log Windows amd64; \ | |
299 | +# build Windows amd64 true 3.6 py3morfeusz 2>&1 | log Windows amd64; \ | |
300 | +# buildegg Windows amd64 true 3.6 2>&1 | log Windows amd64; \ | |
301 | +# build Windows amd64 true 3.7 py3morfeusz 2>&1 | log Windows amd64; \ | |
302 | +# buildegg Windows amd64 true 3.7 2>&1 | log Windows amd64" | |
303 | +# echo "build Windows i386 true 2.7 package package-java py2morfeusz 2>&1 | log Windows i386; \ | |
304 | +# buildegg Windows i386 true 2.7 2>&1 | log Windows i386; \ | |
305 | +# build Windows i386 true 3.0 py3morfeusz 2>&1 | log Windows i386 \ | |
306 | +# buildegg Windows i386 true 3.0 2>&1 | log Windows i386" | |
307 | +# echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64; \ | |
308 | +# buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64; \ | |
309 | +# build Darwin amd64 true 3 py3morfeusz 2>&1 | log Darwin amd64; \ | |
310 | +# buildegg Darwin amd64 true 3 2>&1 | log Darwin amd64" | |
311 | +# echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64" | |
312 | +# echo "buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64" | |
313 | + | |
314 | +# } | xargs -n1 -P6 -d$'\n' bash -c | |
... | ... |
fsabuilder/CMakeLists.txt
... | ... | @@ -10,26 +10,26 @@ set (DEPS "") |
10 | 10 | configure_file (${SETUP_PY_IN} ${SETUP_PY}) |
11 | 11 | |
12 | 12 | add_custom_command (OUTPUT ${SETUP_PY} |
13 | - COMMAND python | |
13 | + COMMAND python3 | |
14 | 14 | ARGS setup.py build |
15 | 15 | DEPENDS ${DEPS}) |
16 | 16 | |
17 | 17 | add_custom_target (builder-setup DEPENDS ${SETUP_PY}) |
18 | 18 | |
19 | 19 | add_custom_target (install-builder |
20 | - COMMAND python ${SETUP_PY} install --home=${CMAKE_INSTALL_PREFIX} | |
20 | + COMMAND python3 ${SETUP_PY} install --home=${CMAKE_INSTALL_PREFIX} | |
21 | 21 | DEPENDS builder-setup |
22 | 22 | ) |
23 | 23 | #~ add_custom_target (package-builder-tgz |
24 | - #~ COMMAND python ${SETUP_PY} bdist -d "${TARGET_DIR}" --plat-name='all' | |
24 | + #~ COMMAND python3 ${SETUP_PY} bdist -d "${TARGET_DIR}" --plat-name='all' | |
25 | 25 | #~ DEPENDS builder-setup |
26 | 26 | #~ ) |
27 | 27 | add_custom_target (package-builder-egg |
28 | - COMMAND python ${SETUP_PY} bdist_egg -d "${TARGET_DIR}" | |
28 | + COMMAND python3 ${SETUP_PY} bdist_egg -d "${TARGET_DIR}" | |
29 | 29 | DEPENDS builder-setup |
30 | 30 | ) |
31 | 31 | add_custom_target (package-builder-sdist |
32 | - COMMAND python ${SETUP_PY} sdist -d "${TARGET_DIR}" | |
32 | + COMMAND python3 ${SETUP_PY} sdist -d "${TARGET_DIR}" | |
33 | 33 | DEPENDS builder-setup |
34 | 34 | ) |
35 | 35 | |
... | ... | @@ -38,12 +38,12 @@ set (PACKAGE_DEPENDS "package-builder-egg" "package-builder-sdist") |
38 | 38 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
39 | 39 | if (BUILT_ON) |
40 | 40 | add_custom_target (package-builder-deb-sdist |
41 | - COMMAND python ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --package "${MORFEUSZBUILDER}" --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --depends python-pyparsing --debian-version ${BUILT_ON} | |
41 | + COMMAND python3 ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --package3 "${MORFEUSZBUILDER}" --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --depends python-pyparsing --debian-version ${BUILT_ON} | |
42 | 42 | DEPENDS builder-setup |
43 | 43 | ) |
44 | 44 | else () |
45 | 45 | add_custom_target (package-builder-deb-sdist |
46 | - COMMAND python ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --package "${MORFEUSZBUILDER}" --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --depends python-pyparsing | |
46 | + COMMAND python3 ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --package3 "${MORFEUSZBUILDER}" --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --depends python-pyparsing | |
47 | 47 | DEPENDS builder-setup |
48 | 48 | ) |
49 | 49 | endif () |
... | ... |