Skip to content

Commit

Permalink
debian packageing update (grass6/7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 1, 2015
1 parent 4c57941 commit 40459c6
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 76 deletions.
3 changes: 2 additions & 1 deletion debian/changelog
Expand Up @@ -2,8 +2,9 @@ qgis (2.8.3-1) UNRELEASED; urgency=medium

* split grass provider off into a separate package.
* disable grass plugin on sid (because of GRASS7)
* add ubuntu wily

-- Jürgen E. Fischer <jef@norbit.de> Tue, 25 Aug 2015 21:47:32 +0200
-- Jürgen E. Fischer <jef@norbit.de> Thu, 01 Oct 2015 14:11:17 +0200

qgis (2.8.3) UNRELEASED; urgency=medium

Expand Down
2 changes: 1 addition & 1 deletion debian/compat.in
@@ -1,3 +1,3 @@
#sid jessie sid-oracle trusty utopic vivid#9
#stretch sid jessie trusty utopic vivid wily#9
#wheezy jessie#8
#precise#7
116 changes: 59 additions & 57 deletions debian/control.in
Expand Up @@ -6,13 +6,13 @@ Priority: optional
Build-Depends:
bison,
cmake (>= 2.8),
#sid jessie wheezy saucy sid-oracle trusty utopic vivid# debhelper (>= 9),
#sid stretch jessie wheezy saucy trusty utopic vivid wily# debhelper (>= 9),
#precise# debhelper (>= 7),
flex,
grass-dev,
libexpat1-dev,
libfcgi-dev,
#sid jessie sid-oracle trusty utopic vivid# libgdal-dev (>= 1.10.1-0~),
#sid stretch jessie trusty utopic vivid wily# libgdal-dev (>= 1.10.1-0~),
#precise# libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
#saucy# libgdal-dev (>= 1.9.0),
#wheezy# libgdal1-dev,
Expand All @@ -23,21 +23,23 @@ Build-Depends:
libqt4-dev (>= 4.7.0),
libqt4-opengl-dev,
libqtwebkit-dev,
#jessie wheezy# libqwt-dev,
#sid sid-oracle precise saucy trusty utopic vivid# libqwt5-qt4-dev,
#stretch jessie wheezy# libqwt-dev,
#precise saucy trusty utopic vivid wily stretch sid# libqwt5-qt4-dev,
libspatialite-dev,
libsqlite3-dev,
libspatialindex-dev,
pkg-config,
pyqt4-dev-tools,
python-qscintilla2,
python-qt4 (>= 4.1.0),
python-qt4-dev,
#precise saucy wheezy# python,
#precise saucy# python-central (>= 0.5),
#saucy wheezy# python-dev,
#saucy# libpython2.7-dev,
#sid jessie sid-oracle trusty utopic vivid# python-all (>= 2.6.6-3~), python-all-dev (>= 2.6.6-3~),
#sid jessie wheezy precise saucy sid-oracle trusty utopic vivid# python-qt4 (>= 4.1.0), python-qt4-dev,
#sid# pyqt4.qsci-dev,
#sid stretch jessie trusty utopic vivid wily# python-all (>= 2.6.6-3~), python-all-dev (>= 2.6.6-3~),
#sid stretch jessie# pyqt4.qsci-dev,
#sid stretch jessie trusty utopic vivid wily# python-pyspatialite,
python-sip (>= 4.5.0),
python-sip-dev (>= 4.5.0),
libosgearth-dev,
Expand All @@ -49,14 +51,14 @@ Build-Depends:
txt2tags,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
#sid-oracle# oracle-instantclient11.2-devel,
#oracle# oracle-instantclient11.2-devel,
spawn-fcgi, lighttpd, poppler-utils, locales
Build-Conflicts: libqgis-dev, qgis-dev
#sid jessie sid-oracle vivid#Standards-Version: 3.9.6
#sid stretch jessie vivid wily#Standards-Version: 3.9.6
#wheezy#Standards-Version: 3.9.3
#precise saucy trusty utopic#Standards-Version: 3.8.4
#sid jessie sid-oracle#X-Python-Version: >= 2.7, << 2.8
#wheezy precise saucy trusty utopic vivid#XS-Python-Version: current
#sid stretch jessie#X-Python-Version: >= 2.7, << 2.8
#wheezy precise saucy trusty utopic vivid wily#XS-Python-Version: current
Vcs-Browser: https://github.com/qgis/QGIS/
Vcs-Git: https://github.com/qgis/QGIS.git
Homepage: http://qgis.org/
Expand All @@ -69,7 +71,7 @@ Depends:
qgis-providers (= ${binary:Version}),
qgis-common (= ${source:Version})
Recommends:
#!sid# qgis-plugin-grass,
#grass6# qgis-plugin-grass,
qgis-provider-grass,
qgis-plugin-globe,
python-qgis
Expand Down Expand Up @@ -213,7 +215,7 @@ Section: libdevel
Depends:
grass-dev,
libexpat1-dev,
#sid jessie sid-oracle trusty utopic vivid# libgdal-dev (>= 1.10.1-0~),
#sid stretch jessie trusty utopic vivid wily# libgdal-dev (>= 1.10.1-0~),
#precise# libgdal-dev (>= 1.9.0) | libgdal1-dev (<< 1.9.0),
#saucy# libgdal-dev (>= 1.9.0),
#wheezy# libgdal1-dev,
Expand Down Expand Up @@ -251,45 +253,45 @@ Depends:
qgis (= ${binary:Version}),
${shlibs:Depends},
${misc:Depends}
#sid#Breaks: qgis-plugin-grass
#sid#Replaces: qgis-plugin-grass
#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 provider enables GRASS data access in QGIS.

#!sid#Package: qgis-plugin-grass
#!sid#Architecture: any
#!sid#Depends:
#!sid# qgis (= ${binary:Version}),
#!sid# qgis-plugin-grass-common (= ${source:Version}),
#!sid# qgis-provider-grass (= ${source:Version}),
#!sid# ${shlibs:Depends},
#!sid# ${misc:Depends},
#!sid !precise# grass-core
#precise# grass
#!sid#Description: GRASS plugin for QGIS
#!sid# QGIS is a Geographic Information System (GIS) which manages, analyzes and
#!sid# display databases of geographic information.
#!sid# .
#!sid# This plugin enables GRASS data access in QGIS.
#!sid#
#!sid#Package: qgis-plugin-grass-common
#!sid#Architecture: all
#!sid#Depends:
#jessie saucy trusty# python2.7,
#wheezy precise# python,
#!sid# ${misc:Depends}
#!sid#Breaks: qgis-common (<< 1.5)
#!sid#Replaces: qgis-common (<< 1.5)
#!sid#Description: GRASS plugin for QGIS - architecture-independent data
#!sid# QGIS is a Geographic Information System (GIS) which manages, analyzes and
#!sid# display databases of geographic information.
#!sid# .
#!sid# This package contains architecture-independent supporting data files for use
#!sid# with the QGIS GRASS plugin.
#!sid#
#grass6#Package: qgis-plugin-grass
#grass6#Architecture: any
#grass6#Depends:
#grass6# qgis (= ${binary:Version}),
#grass6# qgis-plugin-grass-common (= ${source:Version}),
#grass6# qgis-provider-grass (= ${source:Version}),
#grass6# ${shlibs:Depends},
#grass6# ${misc:Depends},
#grass6##!precise# grass-core (<< 7)
#grass6##precise# grass (<< 7)
#grass6#Description: GRASS plugin for QGIS
#grass6# QGIS is a Geographic Information System (GIS) which manages, analyzes and
#grass6# display databases of geographic information.
#grass6# .
#grass6# This plugin enables GRASS data access in QGIS.
#grass6#
#grass6#Package: qgis-plugin-grass-common
#grass6#Architecture: all
#grass6#Depends:
#grass6##saucy trusty# python2.7,
#grass6##precise# python,
#grass6# ${misc:Depends}
#grass6#Breaks: qgis-common (<< 1.5)
#grass6#Replaces: qgis-common (<< 1.5)
#grass6#Description: GRASS plugin for QGIS - architecture-independent data
#grass6# QGIS is a Geographic Information System (GIS) which manages, analyzes and
#grass6# display databases of geographic information.
#grass6# .
#grass6# This package contains architecture-independent supporting data files for use
#grass6# with the QGIS GRASS plugin.
#grass6#
Package: qgis-plugin-globe
Architecture: any
Depends:
Expand Down Expand Up @@ -331,7 +333,7 @@ Depends:
python-dateutil,
python-tz,
python-six,
#sid jessie trusty utopic vivid sid-oracle# python-pyspatialite,
#sid stretch jessie trusty utopic vivid wily# python-pyspatialite,
libqgispython{QGIS_ABI},
${shlibs:Depends},
${python:Depends},
Expand Down Expand Up @@ -417,13 +419,13 @@ Description: QGIS API documentation
.
This package contains the QGIS API documentation.

#sid-oracle#Package: qgis-oracle-provider
#sid-oracle#Architecture: any
#sid-oracle#Depends: ${shlibs:Depends}, ${misc:Depends}
#sid-oracle#Section: contrib/database
#sid-oracle#Description: QGIS oracle provider
#sid-oracle# QGIS is a Geographic Information System (GIS) which manages, analyzes and
#sid-oracle# display databases of geographic information.
#sid-oracle# .
#sid-oracle# This package contains the QGIS oracle provider.
#sid-oracle#
#oracle#Package: qgis-oracle-provider
#oracle#Architecture: any
#oracle#Depends: ${shlibs:Depends}, ${misc:Depends}
#oracle#Section: contrib/database
#oracle#Description: QGIS oracle provider
#oracle# QGIS is a Geographic Information System (GIS) which manages, analyzes and
#oracle# display databases of geographic information.
#oracle# .
#oracle# This package contains the QGIS oracle provider.
#oracle#
53 changes: 36 additions & 17 deletions debian/rules
Expand Up @@ -16,14 +16,20 @@ DEB_BUILD_MULTIARCH ?= $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
QT_PLUGIN_DIR = usr/lib/$(DEB_BUILD_MULTIARCH)/qt4/plugins

DEB_TEST_TARGET ?= Experimental
BUILDDIR ?= debian/build

QGIS_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')

ifeq (,$(DISTRIBUTION))
DISTRIBUTION := $(shell dpkg-parsechangelog --format rfc822 | sed -ne "s/^Distribution: //p")
endif

ifneq ($(DISTRIBUTION),$(findstring $(DISTRIBUTION),"wheezy jessie precise trusty utopic vivid sid-oracle"))
ifneq (,$(findstring -oracle,$(DISTRIBUTION)))
DISTRIBUTION := $(subst -oracle,,$(DISTRIBUTION))
WITH_ORACLE=1
endif

ifneq ($(DISTRIBUTION),$(findstring $(DISTRIBUTION),"wheezy jessie stretch precise trusty utopic vivid wily"))
DISTRIBUTION := sid
endif

Expand All @@ -40,12 +46,12 @@ QGIS_MINOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")/\1/p
QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/p' CMakeLists.txt)
QGIS_ABI=$(QGIS_MAJOR).$(QGIS_MINOR).$(QGIS_PATCH)
GRASS=grass$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1,2))
GRASSVER=$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1))

CMAKE_OPTS := \
-DBUILDNAME=$(DEB_BUILD_NAME) \
-DCMAKE_VERBOSE_MAKEFILE=1 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGRASS_PREFIX=/usr/lib/$(GRASS) \
-DBINDINGS_GLOBAL_INSTALL=TRUE \
-DPEDANTIC=TRUE \
-DWITH_QSPATIALITE=TRUE \
Expand All @@ -62,7 +68,9 @@ CMAKE_OPTS := \
-DWITH_INTERNAL_PYGMENTS=FALSE \
-DWITH_INTERNAL_DATEUTIL=FALSE \
-DWITH_INTERNAL_PYTZ=FALSE \
-DWITH_INTERNAL_SIX=FALSE
-DWITH_INTERNAL_SIX=FALSE \
-DWITH_GRASS=TRUE \
-DGRASS_PREFIX=/usr/lib/$(GRASS)

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
Expand All @@ -73,19 +81,23 @@ ifneq (,$(findstring $(DISTRIBUTION),"wheezy jessie sid precise"))
CMAKE_OPTS += -DWITH_PYSPATIALITE=TRUE
endif

ifneq (,$(findstring $(DISTRIBUTION),"sid sid-oracle"))
ifneq (,$(findstring $(DISTRIBUTION),"sid stretch"))
CMAKE_OPTS += -DPOSTGRES_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libpq.so
endif

ifneq (,$(findstring $(DISTRIBUTION),"jessie trusty utopic vivid sid sid-oracle"))
ifneq (,$(findstring $(DISTRIBUTION),"sid"))
CMAKE_OPTS += -DGEOS_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libgeos_c.so
endif

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

ifneq (,$(findstring -oracle,$(DISTRIBUTION)))
CMAKE_OPTS += -DWITH_ORACLE=TRUE
endif

ifneq (,$(findstring $(DISTRIBUTION),"sid"))
ifneq (,$(findstring $(DISTRIBUTION),"sid stretch jessie"))
CMAKE_OPTS += -DSPATIALINDEX_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libspatialindex.so
endif

Expand All @@ -102,7 +114,7 @@ else
CMAKE_OPTS += -DENABLE_TESTS=TRUE
endif

ifneq (,$(findstring $(DISTRIBUTION),"wheezy jessie trusty sid sid-oracle"))
ifneq (,$(findstring $(DISTRIBUTION),"wheezy jessie stretch trusty sid"))
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
Expand All @@ -128,22 +140,29 @@ ifneq (,$(findstring profile,$(DEB_BUILD_OPTIONS)))
endif

# multi distribution support:
# - remove prefixes for current distribution
# - remove lines that exclude current distribution
# - remove prefixes that exclude other distributions
# - remove lines with applicable excludes
# - remove prefixes with applicable includes
# - remove prefixes with not applicable excludes
# - remove remaining comments

CONTROL_EXPRESSIONS = $(DISTRIBUTION) grass$(GRASSVER)

ifneq (,$(WITH_ORACLE))
CONTROL_EXPRESSIONS += oracle
endif

define gentemplate
$(2): $(1)
sed -r \
-e 's/^#(.* |)$(DISTRIBUTION)( .*|)#//' \
-e '/^#(.* |)!$(DISTRIBUTION)( .*|)#/d' \
-e 's/^#(.* |)![^ ]*( .*|)#//' \
-e '/#(.+ |)!($(subst $(eval) ,|,$(CONTROL_EXPRESSIONS)))( .+|)#/d' \
-e 's/#([^#]+ |)($(subst $(eval) ,|,$(CONTROL_EXPRESSIONS)))( [^#]+|)#//g' \
-e 's/#([^#]+ |)![^#]+( [^#]*|)#//g' \
-e '/^#/d' \
-e "s/\{DEB_BUILD_GNU_TYPE\}/$(DEB_BUILD_GNU_TYPE)/g" \
-e "s#\{QT_PLUGIN_DIR\}#$(QT_PLUGIN_DIR)#g" \
-e "s/\{QGIS_ABI\}/$(QGIS_ABI)/g" \
-e "s/\{GRASS\}/$(GRASS)/g" \
-e "s/\{GRASSVER\}/$(GRASSVER)/g" \
$$^ >$$@

templates:: $(2)
Expand All @@ -160,7 +179,7 @@ cleantemplates:
$(MAKE) -f debian/rules debian/control debian/compat

binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep:
dh $@ --with python2 --parallel --builddirectory=debian/build
dh $@ --with python2 --parallel --builddirectory=$(BUILDDIR)

override_dh_clean: cleantemplates
dh_clean
Expand All @@ -169,7 +188,7 @@ override_dh_clean: cleantemplates
-$(RM) $(CURDIR)/src/core/qgscontexthelp_texts.cpp
-$(RM) $(CURDIR)/src/core/qgsexpression_texts.cpp

-$(RM) -r $(CURDIR)/debian/build/
-$(RM) -r $(CURDIR)/$(BUILDDIR)/

override_dh_auto_configure: templates
dh_auto_configure -- $(CMAKE_OPTS)
Expand All @@ -181,9 +200,9 @@ override_dh_auto_test:
localedef -f UTF-8 -i en_US ./debian/tmp/locale/en_US.UTF-8/
-LOCPATH=$(CURDIR)/debian/tmp/locale/ \
LC_ALL=en_US.UTF-8 \
LD_LIBRARY_PATH=$(CURDIR)/debian/build/output/lib:$(LD_LIBRARY_PATH) \
LD_LIBRARY_PATH=$(CURDIR)/$(BUILDDIR)/output/lib:$(LD_LIBRARY_PATH) \
PATH=/usr/sbin:$(PATH) \
$(TESTMAKE) -C debian/build $(DEB_TEST_TARGET)
$(TESTMAKE) -C $(BUILDDIR) $(DEB_TEST_TARGET)
else
override_dh_auto_test:
@echo Skipping tests.
Expand Down

0 comments on commit 40459c6

Please sign in to comment.