Skip to content

Commit d97736a

Browse files
committedAug 26, 2015
debian packaging: modify grass support (ubuntugis also has grass7)
1 parent b43026e commit d97736a

File tree

2 files changed

+80
-41
lines changed

2 files changed

+80
-41
lines changed
 

‎debian/control.in

Lines changed: 55 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Priority: optional
66
Build-Depends:
77
bison,
88
cmake (>= 2.8),
9-
#sid stretch jessie wheezy saucy sid-oracle trusty utopic vivid# debhelper (>= 9),
9+
#sid stretch jessie wheezy saucy trusty utopic vivid# debhelper (>= 9),
1010
#precise# debhelper (>= 7),
1111
flex,
1212
grass-dev,
1313
libexpat1-dev,
1414
libfcgi-dev,
15-
#sid stretch jessie sid-oracle trusty utopic vivid# libgdal-dev (>= 1.10.1-0~),
15+
#sid stretch jessie trusty utopic vivid# libgdal-dev (>= 1.10.1-0~),
1616
#precise# libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
1717
#saucy# libgdal-dev (>= 1.9.0),
1818
#wheezy# libgdal1-dev,
@@ -23,8 +23,8 @@ Build-Depends:
2323
libqt4-dev (>= 4.7.0),
2424
libqt4-opengl-dev,
2525
libqtwebkit-dev,
26-
#stretch jessie wheezy sid-oracle# libqwt-dev,
27-
#precise saucy trusty utopic vivid sid# libqwt5-qt4-dev,
26+
#stretch jessie wheezy# libqwt-dev,
27+
#precise saucy trusty utopic vivid stretch sid# libqwt5-qt4-dev,
2828
libspatialite-dev,
2929
libsqlite3-dev,
3030
libspatialindex-dev,
@@ -35,10 +35,10 @@ Build-Depends:
3535
#precise saucy# python-central (>= 0.5),
3636
#saucy wheezy# python-dev,
3737
#saucy# libpython2.7-dev,
38-
#sid stretch jessie sid-oracle trusty utopic vivid# python-all (>= 2.6.6-3~), python-all-dev (>= 2.6.6-3~),
38+
#sid stretch jessie trusty utopic vivid# python-all (>= 2.6.6-3~), python-all-dev (>= 2.6.6-3~),
3939
#sid stretch jessie wheezy precise saucy sid-oracle trusty utopic vivid# python-qt4 (>= 4.1.0), python-qt4-dev,
4040
#sid stretch jessie# pyqt4.qsci-dev,
41-
#sid stretch jessie trusty utopic vivid sid-oracle# python-pyspatialite,
41+
#sid stretch jessie trusty utopic vivid# python-pyspatialite,
4242
python-sip (>= 4.5.0),
4343
python-sip-dev (>= 4.5.0),
4444
libosgearth-dev,
@@ -50,14 +50,14 @@ Build-Depends:
5050
txt2tags,
5151
xvfb, xauth,
5252
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
53-
#sid-oracle# oracle-instantclient11.2-devel,
53+
#oracle# oracle-instantclient11.2-devel,
5454
spawn-fcgi, lighttpd, poppler-utils, locales, qt4-doc-html,
5555
libqt4-sql-sqlite
5656
Build-Conflicts: libqgis-dev, qgis-dev
5757
#sid stretch jessie sid-oracle vivid#Standards-Version: 3.9.6
5858
#wheezy#Standards-Version: 3.9.3
5959
#precise saucy trusty utopic#Standards-Version: 3.8.4
60-
#sid stretch jessie sid-oracle#X-Python-Version: >= 2.7, << 2.8
60+
#sid stretch jessie#X-Python-Version: >= 2.7, << 2.8
6161
#wheezy precise saucy trusty utopic vivid#XS-Python-Version: current
6262
Vcs-Browser: https://github.com/qgis/QGIS/
6363
Vcs-Git: https://github.com/qgis/QGIS.git
@@ -71,7 +71,8 @@ Depends:
7171
qgis-providers (= ${binary:Version}),
7272
qgis-common (= ${source:Version})
7373
Recommends:
74-
qgis-plugin-grass,
74+
#grass6# qgis-plugin-grass,
75+
qgis-provider-grass,
7576
qgis-plugin-globe,
7677
python-qgis
7778
Suggests: gpsbabel
@@ -214,7 +215,7 @@ Section: libdevel
214215
Depends:
215216
grass-dev (<< 7),
216217
libexpat1-dev,
217-
#sid stretch jessie sid-oracle trusty utopic vivid# libgdal-dev (>= 1.10.1-0~),
218+
#sid stretch jessie trusty utopic vivid# libgdal-dev (>= 1.10.1-0~),
218219
#precise# libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
219220
#saucy# libgdal-dev (>= 1.9.0),
220221
#wheezy# libgdal1-dev,
@@ -273,29 +274,45 @@ Depends:
273274
qgis-plugin-grass-common (= ${source:Version}),
274275
${shlibs:Depends},
275276
${misc:Depends},
276-
#!precise# grass-core
277-
#precise# grass (<< 7)
277+
#grass7#Breaks: qgis-plugin-grass
278+
#grass7#Replaces: qgis-plugin-grass
278279
Description: GRASS plugin for QGIS
279280
QGIS is a Geographic Information System (GIS) which manages, analyzes and
280281
display databases of geographic information.
281282
.
282283
This plugin enables GRASS data access in the QGIS geographic data viewer.
283284

284-
Package: qgis-plugin-grass-common
285-
Architecture: all
286-
Depends:
287-
#sid stretch jessie saucy sid-oracle trusty# python2.7,
285+
#grass6#Package: qgis-plugin-grass
286+
#grass6#Architecture: any
287+
#grass6#Depends:
288+
#grass6# qgis (= ${binary:Version}),
289+
#grass6# qgis-plugin-grass-common (= ${source:Version}),
290+
#grass6# qgis-provider-grass (= ${source:Version}),
291+
#grass6# ${shlibs:Depends},
292+
#grass6# ${misc:Depends},
293+
#!sid !precise# grass-core
294+
#precise# grass
295+
#grass6#Description: GRASS plugin for QGIS
296+
#grass6# QGIS is a Geographic Information System (GIS) which manages, analyzes and
297+
#grass6# display databases of geographic information.
298+
#grass6# .
299+
#grass6# This plugin enables GRASS data access in QGIS.
300+
#grass6#
301+
#grass6#Package: qgis-plugin-grass-common
302+
#grass6#Architecture: all
303+
#grass6#Depends:
304+
#jessie saucy trusty trusty# python2.7,
288305
#wheezy precise# python,
289-
${misc:Depends}
290-
Breaks: qgis-common (<< 1.5)
291-
Replaces: qgis-common (<< 1.5)
292-
Description: GRASS plugin for QGIS - architecture-independent data
293-
QGIS is a Geographic Information System (GIS) which manages, analyzes and
294-
display databases of geographic information.
295-
.
296-
This package contains architecture-independent supporting data files for use
297-
with the QGIS GRASS plugin.
298-
306+
#grass6# ${misc:Depends}
307+
#grass6#Breaks: qgis-common (<< 1.5)
308+
#grass6#Replaces: qgis-common (<< 1.5)
309+
#grass6#Description: GRASS plugin for QGIS - architecture-independent data
310+
#grass6# QGIS is a Geographic Information System (GIS) which manages, analyzes and
311+
#grass6# display databases of geographic information.
312+
#grass6# .
313+
#grass6# This package contains architecture-independent supporting data files for use
314+
#grass6# with the QGIS GRASS plugin.
315+
#grass6#
299316
Package: qgis-plugin-globe
300317
Architecture: any
301318
Depends:
@@ -337,9 +354,9 @@ Depends:
337354
python-dateutil,
338355
python-tz,
339356
python-six,
340-
#sid stretch jessie trusty utopic vivid sid-oracle# python-pyspatialite,
341-
#sid stretch# liblwgeom-2.1.7,
357+
#sid stretch jessie trusty utopic vivid# python-pyspatialite,
342358
#jessie# liblwgeom-2.1.4,
359+
#sid stretch# liblwgeom-2.1.7,
343360
libqgispython{QGIS_ABI},
344361
${shlibs:Depends},
345362
${python:Depends},
@@ -427,13 +444,13 @@ Description: QGIS API documentation
427444
.
428445
This package contains the QGIS API documentation.
429446

430-
#sid-oracle#Package: qgis-oracle-provider
431-
#sid-oracle#Architecture: any
432-
#sid-oracle#Depends: ${shlibs:Depends}, ${misc:Depends}
433-
#sid-oracle#Section: contrib/database
434-
#sid-oracle#Description: QGIS oracle provider
435-
#sid-oracle# QGIS is a Geographic Information System (GIS) which manages, analyzes and
436-
#sid-oracle# display databases of geographic information.
437-
#sid-oracle# .
438-
#sid-oracle# This package contains the QGIS oracle provider.
439-
#sid-oracle#
447+
#oracle#Package: qgis-oracle-provider
448+
#oracle#Architecture: any
449+
#oracle#Depends: ${shlibs:Depends}, ${misc:Depends}
450+
#oracle#Section: contrib/database
451+
#oracle#Description: QGIS oracle provider
452+
#oracle# QGIS is a Geographic Information System (GIS) which manages, analyzes and
453+
#oracle# display databases of geographic information.
454+
#oracle# .
455+
#oracle# This package contains the QGIS oracle provider.
456+
#oracle#

‎debian/rules

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ ifeq (,$(DISTRIBUTION))
2424
DISTRIBUTION := $(shell dpkg-parsechangelog --format rfc822 | sed -ne "s/^Distribution: //p")
2525
endif
2626

27-
ifneq ($(DISTRIBUTION),$(findstring $(DISTRIBUTION),"wheezy jessie stretch precise trusty utopic vivid sid-oracle"))
27+
ifneq (,$(findstring -oracle,$(DISTRIBUTION)))
28+
DISTRIBUTION := $(subst -oracle,,$(DISTRIBUTION))
29+
WITH_ORACLE=1
30+
endif
31+
32+
ifneq ($(DISTRIBUTION),$(findstring $(DISTRIBUTION),"wheezy jessie stretch precise trusty utopic vivid"))
2833
DISTRIBUTION := sid
2934
endif
3035

@@ -84,7 +89,7 @@ ifneq (,$(findstring $(DISTRIBUTION),"jessie stretch trusty utopic vivid sid sid
8489
CMAKE_OPTS += -DPYTHON_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libpython2.7.so
8590
endif
8691

87-
ifneq (,$(findstring -oracle,$(DISTRIBUTION)))
92+
ifneq (,$(WITH_ORACLE))
8893
CMAKE_OPTS += -DWITH_ORACLE=TRUE
8994
endif
9095

@@ -142,11 +147,28 @@ ifneq (,$(findstring profile,$(DEB_BUILD_OPTIONS)))
142147
LDFLAGS += -pg
143148
endif
144149

150+
# multi distribution support:
151+
# - remove prefixes for current distribution
152+
# - remove lines that exclude current distribution
153+
# - remove prefixes that exclude other distributions
154+
# - remove remaining comments
155+
156+
ifneq (,$(WITH_ORACLE))
157+
FILTER_ORACLE = \
158+
-e 's/^#(.* |)oracle( .*|)#//' \
159+
-e '/^#(.* |)!oracle( .*|)#/d'
160+
endif
161+
145162
define gentemplate
146163
$(2): $(1)
147164
sed -r \
148165
-e 's/^#(.* |)$(DISTRIBUTION)( .*|)#//' \
149-
-e '/^#($|[^!])/d' \
166+
-e '/^#(.* |)!$(DISTRIBUTION)( .*|)#/d' \
167+
-e 's/^#(.* |)grass$(GRASSVER)( .*|)#//' \
168+
-e '/^#(.* |)!grass$(GRASSVER)( .*|)#/d' \
169+
$(FILTER_ORACLE) \
170+
-e 's/^#(.* |)![^ ]*( .*|)#//' \
171+
-e '/^#/d' \
150172
-e "s/\{DEB_BUILD_GNU_TYPE\}/$(DEB_BUILD_GNU_TYPE)/g" \
151173
-e "s#\{QT_PLUGIN_DIR\}#$(QT_PLUGIN_DIR)#g" \
152174
-e "s/\{QGIS_ABI\}/$(QGIS_ABI)/g" \

0 commit comments

Comments
 (0)
Please sign in to comment.