forked from McStasMcXtrace/McCode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_rpms_fedora_mcxtrace
executable file
·59 lines (51 loc) · 2.34 KB
/
build_rpms_fedora_mcxtrace
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
#!/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="mcpl"
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`
# 64-bit
./mkdist mcxtrace $1 "" "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-comps $1 "" "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-perl-cmdline $1 tools/Legacy-Perl-cmdline/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-python-mccodelib $1 tools/Python/mccodelib/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-python-mxrun $1 tools/Python/mcrun/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-python-mxplot-pyqtgraph $1 tools/Python/mcplot/pyqtgraph/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-python-mxplot-svg $1 tools/Python/mcplot/svg/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-python-mxgui $1 tools/Python/mcgui/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-python-mxdisplay-webgl $1 tools/Python/mcdisplay/webgl/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-python-mxdisplay-pyqtgraph $1 tools/Python/mcdisplay/pyqtgraph/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-clusterscripts $1 tools/cluster-scripts/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-manuals $1 docpkg/manuals/mcxtrace/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-python-mxdoc $1 tools/Python/mcdoc/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-python-mxplot-matplotlib $1 tools/Python/mcplot/matplotlib/ "" rpm64-fedora "" -- rpm
./mkdist mcxtrace-tools-matlab-mxplot $1 tools/matlab/mcplot/ "" rpm64-fedora "" -- rpm
#build metapackages?
if [ "x$2" != "x" ]; then
cd meta-pkgs/rpm
for controlfile in `ls mcxtrace-suite-python.spec`
do
sed -i.bak s/@VERSION@/${1}/g $controlfile
rpmbuild -bb --target x86_64 $controlfile
mv $controlfile.bak $controlfile
done
mv $HOME/rpmbuild/RPMS/x86_64/mcxtrace-suite-*rpm $WORK/dist
cp $WORK/INSTALL-McXtrace/Linux/centos/README.md $WORK/dist
fi