forked from McStasMcXtrace/McCode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_debs_mcstas32
72 lines (59 loc) · 2.71 KB
/
build_debs_mcstas32
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
#!/bin/sh
if [ "x$1" = "x" ]; then
# No arguments
echo Please provide one argument,e.g : $0 2.0
exit 1;
fi
# Ensure our 3rd party modules are in place and updated
THIRDPARTY=`ls 3rdparty | grep -v patches`
cd 3rdparty
echo $THIRDPARTY | xargs -n1 rm -r
cd -
git submodule init
git submodule update --recursive --remote --recursive --remote
for MODULE in `echo $THIRDPARTY`
do
if [ -d "3rdparty/patches/${MODULE}" ]; then
echo Making McCode cmake modules available for $MODULE
rsync -avz cmake/ 3rdparty/${MODULE}/cmake
echo Applying McCode patches to 3rdparty/${MODULE}
cp -rp 3rdparty/patches/${MODULE}/* 3rdparty/${MODULE}/
fi
done
WORK=`pwd`
# From 2.1 onwards, let McStas reside in /usr/share on Debian-like systems
export MCINSTALL_PREFIX=/usr/share/
# 64-bit
./mkdist mcstas $1 "" "" deb32 "" -- deb
./mkdist mcstas-comps $1 "" "" deb32 "" -- deb
./mkdist mcstas-tools-perl $1 tools/Legacy-Perl/ "" deb32 "" -- deb
./mkdist mcstas-tools-perl-cmdline $1 tools/Legacy-Perl-cmdline/ "" deb32 "" -- deb
./mkdist mcstas-tools-matlab-mcplot $1 tools/matlab/mcplot/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcplot-pyqtgraph $1 tools/Python/mcplot/pyqtgraph/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcplot-matplotlib $1 tools/Python/mcplot/matplotlib/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcplot-svg $1 tools/Python/mcplot/svg/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcresplot $1 tools/Python/mcresplot/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcrun $1 tools/Python/mcrun/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcgui $1 tools/Python/mcgui/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mccodelib $1 tools/Python/mccodelib/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcdisplay-webgl $1 tools/Python/mcdisplay/webgl/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcdisplay-pyqtgraph $1 tools/Python/mcdisplay/pyqtgraph/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcdisplay-mantid $1 tools/Python/mcdisplay/mantid_xml/ "" deb32 "" -- deb
./mkdist mcstas-clusterscripts $1 tools/cluster-scripts/ "" deb32 "" -- deb
./mkdist mcstas-manuals $1 docpkg/manuals/mcstas/ "" deb32 "" -- deb
./mkdist mcstas-tools-python-mcdoc $1 tools/Python/mcdoc/ "" deb32 "" -- deb
export MCINSTALL_PREFIX=/usr/share/mcstas/$1/
./mkdist mcstas-ncrystal $1 3rdparty/ncrystal "" deb32 "" -- deb
export MCINSTALL_PREFIX=/usr/share/
#build metapackages?
if [ "x$2" != "x" ]; then
cd meta-pkgs/deb
for controlfile in `ls control.mcstas*`
do
sed -i.bak s/@VERSION@/${1}/g $controlfile
equivs-build $controlfile
mv $controlfile.bak $controlfile
done
mv $WORK/meta-pkgs/deb/mcstas-suite*${1}*.deb $WORK/dist
cp $WORK/INSTALL-McStas-2.x/Linux/debian/README.md $WORK/dist
fi