Révision 3628 TXM/trunk/org.txm.setups/BuildLinux64bit.sh
BuildLinux64bit.sh (revision 3628) | ||
---|---|---|
1 |
VERSIONWITHOUTSUB=`cat ../org.txm.rcp/VERSION` |
|
2 |
SUBVERSION=`cat ../org.txm.rcp/SUBVERSION` |
|
1 |
DIRNAME=`dirname $0` |
|
2 |
VERSIONWITHOUTSUB=`cat $DIRNAME/../bundles/org.txm.rcp/VERSION` |
|
3 |
SUBVERSION=`cat $DIRNAME/../bundles/org.txm.rcp/SUBVERSION` |
|
3 | 4 |
VERSION=${VERSIONWITHOUTSUB}${SUBVERSION} |
4 | 5 |
|
5 | 6 |
STEP=$1 |
6 | 7 |
ARCH="64" |
7 | 8 |
ARCHCODE="x86_64" |
8 | 9 |
TIMESTAMP=`date +"%Y-%m-%d"` |
9 |
APP="TXM_${VERSION}_${TIMESTAMP}_Linux${ARCH}" |
|
10 |
APP="$DIRNAME/TXM_${VERSION}_${TIMESTAMP}_Linux${ARCH}" |
|
11 |
BUILDDIR="$DIRNAME/../products/org.txm.rcp.product/target/products/org.txm.rcp.app/linux/gtk/$ARCHCODE" |
|
10 | 12 |
|
11 | 13 |
rm -rf "$APP" |
12 | 14 |
mkdir "$APP" |
... | ... | |
15 | 17 |
echo purge | sudo debconf-communicate TXM |
16 | 18 |
|
17 | 19 |
# ensure postinst preinst ... rights |
18 |
chmod 644 shared/debian/DEBIAN/templates && |
|
19 |
chmod 755 shared/debian/DEBIAN/postinst && |
|
20 |
chmod 755 shared/debian/DEBIAN/postrm && |
|
21 |
chmod 755 shared/debian/DEBIAN/preinst && |
|
22 |
chmod 755 shared/debian/usr/bin/TXM* |
|
20 |
chmod 644 $DIRNAME/shared/debian/DEBIAN/templates &&
|
|
21 |
chmod 755 $DIRNAME/shared/debian/DEBIAN/postinst &&
|
|
22 |
chmod 755 $DIRNAME/shared/debian/DEBIAN/postrm &&
|
|
23 |
chmod 755 $DIRNAME/shared/debian/DEBIAN/preinst &&
|
|
24 |
chmod 755 $DIRNAME/shared/debian/usr/bin/TXM*
|
|
23 | 25 |
if [ $? != 0 ]; then |
24 | 26 |
echo "** $APP: failed to set rights of postinst preinst ... files " |
25 | 27 |
exit 1; |
26 | 28 |
fi |
27 | 29 |
|
28 | 30 |
# remove old profile that can contains unwanted repositories |
29 |
rm -f "exportRCP/linux.gtk.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/.settings/*" &&
|
|
30 |
rm -f "exportRCP/linux.gtk.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/*"
|
|
31 |
rm -f "$BUILDDIR/p2/org.eclipse.equinox.p2.engine/.settings/*" &&
|
|
32 |
rm -f "$BUILDDIR/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/*"
|
|
31 | 33 |
if [ $? != 0 ]; then |
32 | 34 |
echo "** $APP: failed to remove p2 preferences" |
33 | 35 |
exit 1; |
... | ... | |
36 | 38 |
mkdir -p "$APP/usr/lib/TXM" |
37 | 39 |
|
38 | 40 |
# copy debian shared files: INSTALL, R libs... |
39 |
rsync -r --exclude '.svn' shared/debian/* "$APP" |
|
41 |
rsync -r --exclude '.svn' $DIRNAME/shared/debian/* "$APP"
|
|
40 | 42 |
if [ $? != 0 ]; then |
41 | 43 |
echo "** $APP: failed to get 'debian' shared files" |
42 | 44 |
exit 1; |
43 | 45 |
fi |
44 | 46 |
|
45 | 47 |
# copy shared files: css, xsl, scripts, samples... |
46 |
rsync -r --exclude '.svn' shared/all/* "$APP/usr/lib/TXM" |
|
48 |
rsync -r --exclude '.svn' $DIRNAME/shared/all/* "$APP/usr/lib/TXM"
|
|
47 | 49 |
if [ $? != 0 ]; then |
48 | 50 |
echo "** $APP: failed to get shared files" |
49 | 51 |
exit 1; |
50 | 52 |
fi |
51 | 53 |
|
52 | 54 |
# copy eclise arch dependent build |
53 |
rsync -r --exclude '.svn' "exportRCP/linux.gtk.${ARCHCODE}/TXM" "$APP/usr/lib" |
|
55 |
rsync -r --exclude '.svn' "$BUILDDIR" "$APP/usr/lib/TXM" |
|
56 |
cp -rf "$APP/usr/lib/TXM/$ARCHCODE/"* "$APP/usr/lib/TXM" |
|
57 |
rm -rf "$APP/usr/lib/TXM/$ARCHCODE" |
|
54 | 58 |
if [ $? != 0 ]; then |
55 | 59 |
echo "** $APP: failed to get ${ARCH}bit binaries Linux $ARCHCODE files" |
56 | 60 |
exit 1; |
57 | 61 |
fi |
58 | 62 |
|
59 | 63 |
echo " clean" |
60 |
bash directoryCleaner.sh "$APP" |
|
64 |
bash $DIRNAME/directoryCleaner.sh "$APP"
|
|
61 | 65 |
if [ $? != 0 ]; then |
62 | 66 |
echo "** $APP: failed to clean Debian package $APP" |
63 | 67 |
exit 1; |
Formats disponibles : Unified diff