Skip to content

Commit

Permalink
debian packaging: modify grass support (ubuntugis also has grass7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 26, 2015
1 parent d97736a commit 7de000d
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 51 deletions.
13 changes: 6 additions & 7 deletions debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Package: libqgis-dev
Architecture: any
Section: libdevel
Depends:
grass-dev (<< 7),
grass-dev,
libexpat1-dev,
#sid stretch jessie trusty utopic vivid# libgdal-dev (>= 1.10.1-0~),
#precise# libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
Expand Down Expand Up @@ -267,20 +267,19 @@ Description: QGIS - debugging symbols
.
This package contains debugging symbols.

Package: qgis-plugin-grass
Package: qgis-provider-grass
Architecture: any
Depends:
qgis (= ${binary:Version}),
qgis-plugin-grass-common (= ${source:Version}),
${shlibs:Depends},
${misc:Depends},
${misc:Depends}
#grass7#Breaks: qgis-plugin-grass
#grass7#Replaces: qgis-plugin-grass
Description: GRASS plugin for QGIS
QGIS is a Geographic Information System (GIS) which manages, analyzes and
display databases of geographic information.
.
This plugin enables GRASS data access in the QGIS geographic data viewer.
This provider enables GRASS data access in QGIS.

#grass6#Package: qgis-plugin-grass
#grass6#Architecture: any
Expand All @@ -301,7 +300,7 @@ Description: GRASS plugin for QGIS
#grass6#Package: qgis-plugin-grass-common
#grass6#Architecture: all
#grass6#Depends:
#jessie saucy trusty trusty# python2.7,
#jessie saucy trusty# python2.7,
#wheezy precise# python,
#grass6# ${misc:Depends}
#grass6#Breaks: qgis-common (<< 1.5)
Expand Down Expand Up @@ -356,7 +355,7 @@ Depends:
python-six,
#sid stretch jessie trusty utopic vivid# python-pyspatialite,
#jessie# liblwgeom-2.1.4,
#sid stretch# liblwgeom-2.1.7,
#stretch sid# liblwgeom-2.1.8,
libqgispython{QGIS_ABI},
${shlibs:Depends},
${python:Depends},
Expand Down
4 changes: 0 additions & 4 deletions debian/qgis-plugin-grass.install.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
usr/lib/qgis/grass/modules/qgis.d.rast{GRASSVER}
usr/lib/qgis/grass/modules/qgis.g.info{GRASSVER}
usr/lib/qgis/grass/bin/qgis.g.browser{GRASSVER}
usr/lib/qgis/plugins/libgrassplugin{GRASSVER}.so
usr/lib/qgis/plugins/libgrassprovider{GRASSVER}.so
usr/lib/qgis/plugins/libgrassrasterprovider{GRASSVER}.so
12 changes: 0 additions & 12 deletions debian/qgis-plugin-grass.postrm

This file was deleted.

13 changes: 0 additions & 13 deletions debian/qgis-plugin-grass.preinst

This file was deleted.

4 changes: 4 additions & 0 deletions debian/qgis-provider-grass.install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
usr/lib/qgis/grass/modules/qgis.d.rast{GRASSVER}
usr/lib/qgis/grass/modules/qgis.g.info{GRASSVER}
usr/lib/qgis/plugins/libgrassprovider{GRASSVER}.so
usr/lib/qgis/plugins/libgrassrasterprovider{GRASSVER}.so
2 changes: 2 additions & 0 deletions debian/qgis-provider-grass.lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
qgis-plugin-grass: package-name-doesnt-match-sonames
qgis-plugin-grass: no-symbols-control-file
12 changes: 12 additions & 0 deletions debian/qgis-provider-grass.postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

set -e

if [ "$1" = "remove" ]; then
dpkg-divert --package qgis-provider-grass --remove --rename --divert /usr/bin/qgis.bin /usr/bin/qgis
dpkg-divert --package qgis-provider-grass --remove --rename --divert /usr/bin/qbrowser.bin /usr/bin/qbrowser
fi

#DEBHELPER#

exit 0
13 changes: 13 additions & 0 deletions debian/qgis-provider-grass.preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -e

if [ "$1" = "install" -o "$1" = "upgrade" ]; then
dpkg-divert --package qgis-provider-grass --add --rename --divert /usr/bin/qgis.bin /usr/bin/qgis
dpkg-divert --package qgis-provider-grass --add --rename --divert /usr/bin/qbrowser.bin /usr/bin/qbrowser
fi

#DEBHELPER#

exit 0

30 changes: 15 additions & 15 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ CMAKE_OPTS := \
-DQT_TAG_FILE=/usr/share/qt4/doc/html/qt.tags \
-DQT_DOC_URL=/usr/share/qt4/doc/html/

ifeq ($(GRASSVER),7)
CMAKE_OPTS += \
-DWITH_GRASS=FALSE \
-DWITH_GRASS7=TRUE \
-DGRASS_PREFIX7=/usr/lib/$(GRASS)
else
CMAKE_OPTS += \
-DWITH_GRASS=TRUE \
-DWITH_GRASS7=FALSE \
-DGRASS_PREFIX=/usr/lib/$(GRASS)
endif

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
Expand Down Expand Up @@ -110,18 +122,6 @@ else
CMAKE_OPTS += -DENABLE_TESTS=TRUE
endif

ifeq ($(GRASSVER),7)
CMAKE_OPTS += \
-DWITH_GRASS=FALSE \
-DWITH_GRASS7=TRUE \
-DGRASS_PREFIX7=/usr/lib/$(GRASS)
else
CMAKE_OPTS += \
-DWITH_GRASS=TRUE \
-DWITH_GRASS7=FALSE \
-DGRASS_PREFIX=/usr/lib/$(GRASS)
endif

ifneq (,$(findstring $(DISTRIBUTION),"wheezy jessie stretch trusty sid sid-oracle"))
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
Expand Down Expand Up @@ -264,9 +264,9 @@ override_dh_auto_install:
$(RM) $(CURDIR)/debian/tmp/usr/bin/qbrowser

# qgis binary wrappers
install -o root -g root -m 755 -d $(CURDIR)/debian/qgis-plugin-grass/usr/bin
install -o root -g root -m 755 $(CURDIR)/debian/qgis.sh $(CURDIR)/debian/qgis-plugin-grass/usr/bin/qgis
install -o root -g root -m 755 $(CURDIR)/debian/qgis.sh $(CURDIR)/debian/qgis-plugin-grass/usr/bin/qbrowser
install -o root -g root -m 755 -d $(CURDIR)/debian/qgis-provider-grass/usr/bin
install -o root -g root -m 755 $(CURDIR)/debian/qgis.sh $(CURDIR)/debian/qgis-provider-grass/usr/bin/qgis
install -o root -g root -m 755 $(CURDIR)/debian/qgis.sh $(CURDIR)/debian/qgis-provider-grass/usr/bin/qbrowser

override_dh_install:
# Don't ship srs.db, automatically updated in postinst with crssync
Expand Down

0 comments on commit 7de000d

Please sign in to comment.