postinst is in gnome-speech-swift 1:0.4.25-5ubuntu2.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_version 2.0
srcdir=/usr/share/gnome-speech/sources/swift
if [ "$1" = "configure" ]; then
db_get gnome-speech-swift/swift_dir
swift_dir="$RET"
if [ -d "$swift_dir" -a -d "$swift_dir/include" -a -d "$swift_dir/lib" ]; then
# compile code here
swift_CFLAGS="-I$srcdir -I/usr/include/gnome-speech-1.0 -I$swift_dir/include -DORBIT2=1 -pthread -I/usr/include/bonobo-activation-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -Wall -g -O2"
gcc $swift_CFLAGS -o /usr/bin/swift-synthesis-driver.bin \
$srcdir/swiftsynthesisdriver.c $srcdir/swiftspeaker.c \
-Wl,--export-dynamic -lgnomespeech -lbonobo-2 -lbonobo-activation -lgmodule-2.0 -ldl -lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0 -L$swift_dir/lib -lswift -lm
sed -e 's,@prefix@,/usr,' \
<$srcdir/GNOME_Speech_SynthesisDriver_Swift.server.in \
>/usr/lib/bonobo/servers/GNOME_Speech_SynthesisDriver_Swift.server
cp /usr/share/gnome-speech/sources/swift-synthesis-driver /usr/bin
chmod 755 /usr/bin/swift-synthesis-driver
if [ "$swift_dir" != "/opt/swift" -a ! -f /etc/swift.xml ]; then
if [ ! -f /opt/swift/etc/swift.xml ]; then
ln -s $swift_dir/etc/swift.xml /etc/swift.xml
fi
fi
# Tell ldconfig about the swift libraries.
echo $swift_dir > /etc/ld.so.conf.d/cepstral_swift
ldconfig
fi
fi
|