File: install-generic

package info (click to toggle)
openoffice.org 1%3A3.2.1-11%2Bsqueeze8
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 567,792 kB
  • ctags: 485
  • sloc: sh: 5,518; makefile: 3,578; perl: 2,906; python: 318; xml: 234; lisp: 44
file content (119 lines) | stat: -rwxr-xr-x 3,894 bytes parent folder | download
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/bash

piece=$1
ooo_build_tag=$2

source $OO_TOOLSDIR/piece/sys-setup

custom_install="$OO_TOOLSDIR/piece/inst-$piece"
if test -f $custom_install; then
    $custom_install $piece $ooo_build_tag $DISTRO
fi

# ----- monster make_installer section -----

# can't just source $SOLARENV/inc/minor.mk [ sadly ] - missing quotes.
export BUILD=`grep "BUILD=" "$OO_INSTDIR/solenv/inc/minor.mk" | cut -d= -f2`
export LAST_MINOR=`grep "LAST_MINOR=" "$OO_INSTDIR/solenv/inc/minor.mk" | cut -d= -f2`
export OUT="`pwd`/solver/install"
export LOCAL_OUT=$OUT;
export LOCAL_COMMON_OUT=$OUT;
# install from the copy in the solver - to the system
export SOLARVERSION="`pwd`/solver"

if test "z$DESTDIR" == "z"; then
    echo "install-generic requires a destdir to be set"
    exit 1
fi

export LANGS=
for lang in $OO_LANGS ; do
    if test -z "$LANGS" ; then
	LANGS="$lang"
    else
	LANGS="$LANGS,$lang"
    fi
done

if test "$piece" = "sdk" ; then
    PRODUCT=OpenOffice_SDK
else
    PRODUCT=OpenOffice
fi

perl -w $SOLARENV/bin/make_installer.pl \
     -f $OO_INSTDIR/solver/instsetoo_native/util/openoffice.lst \
     -l $LANGS -p $PRODUCT -buildid $BUILD -destdir $DESTDIR \
     -dontstrip -simple $OO_INSTDIR

# ----- end monster make_installer section -----

# Now try to copy the bits we didn't install into a -devel RPM ...

SRCDIR="$SOLARPIECEVERSION/$INPATH"
DEST="$DESTDIR$OO_SOLVERDIR"
echo "Copy / install remaining devel pieces ..."
filelist="$DESTDIR/all_filelist.txt"
touch $filelist
$OO_TOOLSDIR/piece/copyexcept -x $filelist $SRCDIR/* $DEST
rm -f $filelist

# FIXME: we need to provide external files also in other pieces (e.g. prebuild mono.dlls)
#        external is automatically taken into build dependencies even when removed from
#        the dirs list in build-generic
#        => the build.lst and deliver.log must be deleted in other pieces to avoid conflict of devel packages
if test "$piece" != "libs-extern" -a "$piece" != "libs_extern" ; then
    rm -f $DEST/inc/external/build.lst
    rm -f $DEST/inc/external/deliver.log
fi

# hotfix post upstream install
# allows to modify the install process from the piece package sources
hotfix_post_upstream_install="ooo-build/bin/post-upstream-install"
if test -f "$hotfix_post_upstream_install" ; then
    "$hotfix_post_upstream_install" $piece $ooo_build_tag $DISTRO || exit 1;
fi


# hack to install the noarch files later in the noarch RPMs
if test -n "$DESTDIR" -a "$OOO_BUILD_NOARCH" = 'YES' ; then
    $OO_TOOLSDIR/piece/save-noarch $piece $ooo_build_tag || exit 1;
fi

# file lists
if test -n "$DESTDIR" -a "$OO_BUILD_FILE_LISTS_ENABLE" != "NO" ; then
    custom_file_list="$OO_TOOLSDIR/piece/file-list-$piece"
    if test -f $custom_file_list; then
	$custom_file_list $piece $ooo_build_tag $DISTRO || exit 1;
    else
	$OO_TOOLSDIR/piece/merge-file-lists "files-$piece.txt" $DESTDIR/gid_*
    fi
fi

# add executable rights to libraries
echo "Fixing permissions of libraries..."
for libdir in $OO_INSTDIR/ure/lib \
	      $OO_INSTDIR/program \
	      $OO_INSTDIR/basis$VERSION/program ; do
    test -d $DESTDIR$libdir && \
	find $DESTDIR$libdir -name '*.so*' -type f -exec chmod a+x {} \;
done

# clean up solver
echo "Cleaning up solver..."
find $DEST -depth -name ".svn" -type d -exec rm -rf {} \;
find $DEST -name "*.orig" -exec rm -rf {} \;
find $DEST -type f -exec chmod go-w {} \;
find $DEST -name "*.h" -exec chmod a-x {} \;

# custom post install stuff
custom_post_install="$OO_TOOLSDIR/piece/post-inst-$piece"
if test -f $custom_post_install -a "$OO_BUILD_POST_PROCESS_ENABLE" != "NO" ; then
    $custom_post_install $piece $ooo_build_tag $DISTRO || exit 1;
fi

# hotfix post install; allows to modify the install process from the piece package sources
hotfix_post_install="ooo-build/bin/post-install"
if test -f "$hotfix_post_install" ; then
    "$hotfix_post_install" $piece $ooo_build_tag $DISTRO || exit 1;
fi