forked from Arelle/Arelle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildSol10Sun4Dist-64bit35.sh
101 lines (83 loc) · 2.68 KB
/
buildSol10Sun4Dist-64bit35.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/sh
# this file must have unix newlines (to prevent extraneous errors when running)
# must run sudo on ubuntu
# specify python version to build with
PYTHON=python3.5
# specify locally build python prefixed lib
LD_LIBRARY_PATH=/usr/local/lib/sparcv9
OPT_CSW_LIB=/opt/csw/lib/sparcv9
# specify latest gcc tools
PATH=/usr/local/bin:/opt/csw/bin:/usr/bin:/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/sfw/bin
# create version with date and a shell file to name output with the date
${PYTHON} buildVersion.py
# clean all previously compiled pyc files
find arelle -name '*.cpython-3?.pyc' -exec rm {} \;
BUILT64=exe.solaris-2.10-sun4v.64bit-3.5
if [ -d build/${BUILT64} ]
then
rm -fR build/${BUILT64}
fi
mkdir build/${BUILT64}
if [ ! -d dist ]
then
mkdir dist
fi
# run cx_Freeze setup
# must use /opt/csw over older libraries for libc++ etc
${PYTHON} setup.py build_exe
# builds into sparcv9 but ziploader expects lib
# HF - think this is no longer needed
#cd build/${BUILT64}
#mv sparcv9 lib
#mkdir sparcv9
#cd sparcv9
#ln -s ../lib/*.zip .
#cd ../../..
# add utility scripts for Arelle
find . -name libstdc++.so.6 -exec rm {} \;
cp arelle/scripts-unix/* build/${BUILT64}
ls build/${BUILT64}
# remove .git subdirectories
find build/${BUILT64} -name .git -exec rm -fR {} \;
cd build/${BUILT64}
# for now there's no tkinter on solaris sun4 (intended for server only)
rm arelle
# libraries not taken from right source lib:
cp -p ${OPT_CSW_LIB}/libstdc++.so.6 ./lib
# add missing libraries
# no longer needed when specifying LD_LIBRARY_PATH
# cp /usr/local/lib/sparcv9/libiconv.so* .
# cp /usr/local/lib/sparcv9/libintl.so* .
# cp /usr/local/lib/sparcv9/libexslt.so* .
# cp /usr/local/lib/sparcv9/libxslt.so* .
# cp /usr/local/lib/sparcv9/libxml2.so* .
# cp /usr/local/lib/sparcv9/libxslt.so* .
# cp /usr/local/lib/sparcv9/libgdbm.so* .
# cp /usr/local/lib/sparcv9/libsqlite3.so* .
# cp /usr/local/lib/sparcv9/libreadline.so* .
# cp /usr/local/lib/sparcv9/libhistory.so* .
# cp /usr/local/lib/sparcv9/libz.so* .
rm -f ../../dist/${BUILT64}.tgz
# remove cryptEDGAR from public distribution
rm plugin/security/cryptEDGAR.py
gtar -czf ../../dist/${BUILT64}.tgz .
# add back plugin
cp -p ../../arelle/plugin/security/cryptEDGAR.py plugin/security/cryptEDGAR.py
cd ../..
# add arelle into SEC XBRL.JAR
cd build
rm -fR arelle
mv ${BUILT64} arelle
rm -fr arelle/examples
rm -fr arelle/lib/arelle/examples
cp /export/home/edgar/xbrl.jar ../dist
echo updating xbrl.jar
rm ../dist/xbrl.jar
cp ../dist/xbrl-without-arelle.jar ../dist/xbrl.jar
jar tvf ../dist/xbrl.jar | grep python35.zip
jar uf ../dist/xbrl.jar arelle
jar tvf ../dist/xbrl.jar | grep python35.zip
mv arelle ${BUILT64}
cd ..
/bin/sh buildRenameSol10Sun4.sh
# rm -R build2