This file is indexed.

postinst is in libpetsc3.7.5-dev 3.7.5+dfsg1-4+b1.

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.5
PETSC_ARCH=${DEB_HOST_MULTIARCH}
PETSC_REAL_ARCH=${PETSC_ARCH}-real
PETSC_VERSION_NUMBER=$( echo ${PETSC_VERSION} | sed "s/\.//g" )

PETSC_DIR_REAL=/usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_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_REAL} ${PETSC_VERSION_NUMBER}77 \
  --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so libpetsc.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_real.so.${PETSC_VERSION} \
  --slave /usr/include/petsc petscinclude ${PETSC_DIR_REAL}/include \
  --slave /usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/PETSc.pc PETSc.pc ${PETSC_DIR_REAL}/lib/pkgconfig/PETSc.pc \
  --slave /usr/share/octave/site/m/petsc petsc-octave ${PETSC_DIR_REAL}/share/petsc/matlab

# alternative base version of petsc real
update-alternatives --install /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_real.so libpetsc_real.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_real.so.${PETSC_VERSION} ${PETSC_VERSION_NUMBER}77

# alternative petsc for this X.Y soname (e.g. real or complex)
update-alternatives --install /usr/lib/petscdir/${SONAME} petsc${SONAME} ${PETSC_DIR_REAL} ${PETSC_VERSION_NUMBER}77

# alternative real petsc for this X.Y soname
update-alternatives --install /usr/lib/petscdir/${SONAME}-real petsc${SONAME}-real ${PETSC_DIR_REAL} ${PETSC_VERSION_NUMBER}77


fi



# Automatically added by dh_python2:
if which pycompile >/dev/null 2>&1; then
	pycompile -p libpetsc3.7.5-dev /usr/lib/petscdir/3.7.5/x86_64-linux-gnu-real/bin
fi

# End automatically added section