#!/bin/bash

piece=$1
ooo_build_tag=$2

source $OO_TOOLSDIR/piece/sys-setup

# impress
$OO_TOOLSDIR/piece/merge-file-lists "files-$piece.txt" $DESTDIR/gid_*
$OO_TOOLSDIR/piece/desktop-support-app "$piece" "$ooo_build_tag" "$piece"

# draw subpackage (heh, only desktop stuff)
$OO_TOOLSDIR/piece/desktop-support-app "draw" "$ooo_build_tag" "draw"

# install the prebuilt registry files
$OO_TOOLSDIR/piece/install-registry $piece $ooo_build_tag "$piece"
$OO_TOOLSDIR/piece/install-registry $piece $ooo_build_tag "draw"

# prune redundant files the scp2 likes to make for us
remove_file "files-$piece.txt" "$OO_INSTDIR/basis$VERSION/ure-link"
