Parent: [16c95b] (diff)

Download this file

makestaticdist.sh    99 lines (79 with data), 1.9 kB

 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
#!/bin/sh
#set -x
# A shell-script to make a recoll static binary distribution:
fatal()
{
echo $*;exit 1
}
TAR=tar
targetdir=${targetdir-/tmp}
if test ! -d qtgui;then
echo "Should be executed in the master recoll directory"
exit 1
fi
version=`cat VERSION`
sys=`uname -s`
sysrel=`uname -r`
qtguiassign=`egrep '^QTGUI=' recollinstall`
stripassign=`egrep '^STRIP=' recollinstall`
test ! -z "$qtguiassign" || fatal "Can't find qt version"
test ! -z "$stripassign" || fatal "Can't find strip string"
eval $qtguiassign
eval $stripassign
echo "QTGUI: " $QTGUI "STRIP: " $STRIP
topdirsimple=recoll-${version}-${sys}-${sysrel}
topdir=$targetdir/$topdirsimple
tarfile=$targetdir/recoll-${version}-${sys}-${sysrel}.tgz
if test ! -d $topdir ; then
mkdir $topdir || exit 1
else
echo "Removing everything under $topdir Ok ? (y/n)"
read rep
if test $rep = 'y';then
rm -rf $topdir/*
else
exit 1
fi
fi
rm -f index/recollindex ${QTGUI}/recoll
make static || exit 1
${STRIP} index/recollindex ${QTGUI}/recoll
files="
COPYING
INSTALL
Makefile
README
VERSION
desktop
desktop/recoll-searchgui.desktop
desktop/recoll.png
doc/man
doc/user
filters
index/rclmon.sh
index/recollindex
qtgui/i18n/*.qm
qtgui/images
qtgui/mtpics/*.png
qtgui/recoll
recollinstall
sampleconf
"
$TAR chf - $files | (cd $topdir; $TAR xf -)
# Remove any install dependancy
chmod +w $topdir/Makefile || exit 1
sed -e '/^install:/c\
install: ' < $topdir/Makefile > $topdir/toto && \
mv $topdir/toto $topdir/Makefile
# Clean up .svn directories from target. This would be easier with a
# --exclude tar option, but we want this to work with non-gnu tars
cd $topdir || exit 1
svndirs=`find . -name .svn -print`
echo "In: `pwd`. Removing $svndirs ok ?"
read rep
test "$rep" = 'y' -o "$rep" = 'Y' && rm -rf $svndirs
cd $targetdir
(cd $targetdir ; \
$TAR chf - $topdirsimple | \
gzip > $tarfile)
echo $tarfile created