Skip to content

Commit

Permalink
debian packaging: fix removed diversion (take II; followup 8b054e6; r…
Browse files Browse the repository at this point in the history
…everts 5f310a7)
  • Loading branch information
jef-n committed Feb 12, 2016
1 parent 9e2890d commit 7489af8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
3 changes: 1 addition & 2 deletions debian/control.in
Expand Up @@ -84,8 +84,7 @@ Recommends:
qgis-provider-grass, qgis-provider-grass,
qgis-plugin-globe qgis-plugin-globe
Suggests: gpsbabel Suggests: gpsbabel
Replaces: qgis-plugin-grass (<< 1:2.13.0+git20160204) Conflicts: uim-qt3
Conflicts: uim-qt3, qgis-plugin-grass (<< 1:2.13.0+git20160204)
Description: Geographic Information System (GIS) Description: Geographic Information System (GIS)
A Geographic Information System (GIS) manages, analyzes, and displays A Geographic Information System (GIS) manages, analyzes, and displays
databases of geographic information. QGIS supports shape file viewing and databases of geographic information. QGIS supports shape file viewing and
Expand Down
23 changes: 23 additions & 0 deletions debian/qgis.preinst
@@ -0,0 +1,23 @@
#!/bin/sh

set -e

if [ "$1" = "install" -o "$1" = "upgrade" ]; then
# Fix bad diversions
div=$(dpkg-divert --listpackage /usr/bin/qgis)
if [ -n "$div" -a "$div" = qgis-plugin-grass ]; then
for i in /usr/bin/qgis /usr/bin/qbrowser; do
if [ -e $i ] && ! [ -e $i.undiverted ]; then
mv $i $i.undiverted
fi
dpkg-divert --package qgis-plugin-grass --remove --rename --divert $i.bin $i
if [ -e $i.undiverted ]; then
mv $i.undiverted $i
fi
done
fi
fi

#DEBHELPER#

exit 0
4 changes: 2 additions & 2 deletions debian/qgis.sh.in
@@ -1,14 +1,14 @@
#!/bin/sh #!/bin/sh


if dpkg -s qgis-plugin-grass >/dev/null; then if dpkg -s qgis-plugin-grass >/dev/null 2>&1; then
if [ "$LD_LIBRARY_PATH" = "" ]; then if [ "$LD_LIBRARY_PATH" = "" ]; then
LD_LIBRARY_PATH=/usr/lib/{GRASS}/lib LD_LIBRARY_PATH=/usr/lib/{GRASS}/lib
else else
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/{GRASS}/lib LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/{GRASS}/lib
fi fi
fi fi


if dpkg -s qgis-oracle-provider >/dev/null; then if dpkg -s qgis-oracle-provider >/dev/null 2>&1; then
if [ "$LD_LIBRARY_PATH" = "" ]; then if [ "$LD_LIBRARY_PATH" = "" ]; then
LD_LIBRARY_PATH={ORACLE_LIBDIR} LD_LIBRARY_PATH={ORACLE_LIBDIR}
else else
Expand Down

0 comments on commit 7489af8

Please sign in to comment.