postinst is in libpetsc-complex-3.7.7-dev 3.7.7+dfsg1-2build5.
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #!/bin/sh -e
DEB_HOST_MULTIARCH=x86_64-linux-gnu
SONAME=3.7
PETSC_VERSION=3.7.7
PETSC_ARCH=${DEB_HOST_MULTIARCH}
PETSC_COMPLEX_ARCH=${PETSC_ARCH}-complex
PETSC_VERSION_NUMBER=$( echo ${PETSC_VERSION} | sed "s/\.//g" )
PETSC_DIR_COMPLEX=/usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}
# Make alternatives links
if [ "$1" = "configure" ]; then
# alternative libpetsc.so.multiarch is deprecated
# test if libpetsc.so.multiarch is still in use
if update-alternatives --query petsc | grep libpetsc.so.multiarch > /dev/null ; then
# if so, refresh the alternatives (remove libpetsc.so.multiarch) by removing the old definitions
# Show no mercy. Wipe them out. All of them..
# i.e. remove both real and complex alternatives for the old version
# This should be safe since Conflicts are set up with the package versions using deprecated libpetsc.so.multiarch.
echo Removing deprecated petsc alternatives using libpetsc.so.multiarch.
for alt in `update-alternatives --list petsc`; do
update-alternatives --remove petsc ${alt}
done
fi
# alternative default petsc (e.g. real or complex)
update-alternatives --install /usr/lib/petsc petsc ${PETSC_DIR_COMPLEX} ${PETSC_VERSION_NUMBER}73 \
--slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so libpetsc.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_complex.so.${PETSC_VERSION} \
--slave /usr/include/petsc petscinclude ${PETSC_DIR_COMPLEX}/include \
--slave /usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/PETSc.pc PETSc.pc ${PETSC_DIR_COMPLEX}/lib/pkgconfig/PETSc.pc \
--slave /usr/share/octave/site/m/petsc petsc-octave ${PETSC_DIR_COMPLEX}/share/petsc/matlab
# alternative base version of petsc complex
update-alternatives --install /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_complex.so libpetsc_complex.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_complex.so.${PETSC_VERSION} ${PETSC_VERSION_NUMBER}73
# alternative petsc for this X.Y soname (e.g. real or complex)
update-alternatives --install /usr/lib/petscdir/${SONAME} petsc${SONAME} ${PETSC_DIR_COMPLEX} ${PETSC_VERSION_NUMBER}73
# alternative complex petsc for this X.Y soname
update-alternatives --install /usr/lib/petscdir/${SONAME}-complex petsc${SONAME}-complex ${PETSC_DIR_COMPLEX} ${PETSC_VERSION_NUMBER}73
fi
# Automatically added by dh_python2:
if which pycompile >/dev/null 2>&1; then
pycompile -p libpetsc-complex-3.7.7-dev /usr/lib/petscdir/3.7.7/x86_64-linux-gnu-complex/bin
fi
# End automatically added section
|