-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpostinst.in
More file actions
46 lines (41 loc) · 1.36 KB
/
postinst.in
File metadata and controls
46 lines (41 loc) · 1.36 KB
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
#!/bin/sh -e
# called from dpkg with:
# $1 full path to .deb postinst script (blank if there is none in .deb)
# $2... parameter list normally passed as $1... per debian documentation
# See: http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
# NB: this script *must* run $1 with $2... parameters at some point
#
# $FINK_PACKAGE_NAME package name
if [ -z "$FINK_PACKAGE_NAME" ]; then
echo "uh oh...$0 called with no \$FINK_PACKAGE_NAME!"
fi
. @PREFIX@/bin/init.sh
if [ "$2" = "configure" ]; then
if [ -z "$FINK_PACKAGE_NAME" ]; then
echo "Not cleaning up .la files being installed because cannot determine package-name"
else
filelist="@PREFIX@/var/lib/dpkg/info/$FINK_PACKAGE_NAME.list"
if [ ! -f "$filelist" ]; then
echo "Not cleaning up .la files being installed because cannot read $filelist"
else
msg="Clearing dependency_libs of .la files being installed"
for lafile in `grep '\.la$' "$filelist"`; do
if [ -f "$lafile" ] && [ ! -h "$lafile" ]; then
if [ -n "$msg" ]; then
echo $msg
msg=""
fi
# echo ' perl -pi -e "s/^(dependency_libs)=.*/\1='"''"'/" "'$lafile'" || true'
perl -pi -e "s/^(dependency_libs)=.*/\1=''/" "$lafile" || true
fi
done
fi
fi
fi
if [ -n "$1" ]; then
if [ -x "$1" ]; then
"$@"
else
echo "uh oh...$0 told to run $1 but it doesn't exist!"
fi
fi