Skip to content

Commit

Permalink
debian packaging update:
Browse files Browse the repository at this point in the history
* replace grass diversion with generic wrapper also supporting oracle
* update liblwgeom dependency for stretch and unstable
  • Loading branch information
jef-n committed Feb 4, 2016
1 parent ddabad2 commit 8b054e6
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 59 deletions.
2 changes: 1 addition & 1 deletion debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ Depends:
python-six,
#sid stretch jessie trusty utopic vivid wily# python-pyspatialite,
#jessie# liblwgeom-2.1.4,
#stretch sid# liblwgeom-2.2-2,
#stretch sid# liblwgeom-2.2-5,
libqgispython{QGIS_ABI},
${shlibs:Depends},
${python:Depends},
Expand Down
13 changes: 0 additions & 13 deletions debian/qgis-plugin-grass.postrm

This file was deleted.

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

This file was deleted.

18 changes: 14 additions & 4 deletions debian/qgis.sh.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
#!/bin/sh

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

if dpkg -s qgis-oracle-provider >/dev/null; then
if [ "$LD_LIBRARY_PATH" = "" ]; then
LD_LIBRARY_PATH={ORACLE_LIBDIR}
else
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{ORACLE_LIBDIR}
fi
fi

export LD_LIBRARY_PATH
Expand Down
38 changes: 25 additions & 13 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,18 @@ endif

ifneq (,$(WITH_ORACLE))
ifeq ($(DEB_BUILD_ARCH),amd64)
CMAKE_OPTS += \
-DWITH_ORACLE=TRUE \
-DORACLE_INCLUDEDIR=/usr/include/oracle/12.1/client64/ \
-DORACLE_LIBDIR=/usr/lib/oracle/12.1/client64/lib/
ORACLE_INCLUDEDIR=/usr/include/oracle/12.1/client64/
ORACLE_LIBDIR=/usr/lib/oracle/12.1/client64/lib/
endif
ifeq ($(DEB_BUILD_ARCH),i386)
ORACLE_INCLUDEDIR=/usr/include/oracle/12.1/client/
ORACLE_LIBDIR=/usr/lib/oracle/12.1/client/lib/
endif

CMAKE_OPTS += \
-DWITH_ORACLE=TRUE \
-DORACLE_INCLUDEDIR=/usr/include/oracle/12.1/client/ \
-DORACLE_LIBDIR=/usr/lib/oracle/12.1/client/lib/
endif
-DORACLE_LIBDIR=$(ORACLE_LIBDIR) \
-DORACLE_INCLUDEDIR=$(ORACLE_INCLUDEDIR)
endif

ifneq (,$(findstring $(DISTRIBUTION),"sid stretch jessie"))
Expand Down Expand Up @@ -277,17 +278,20 @@ override_dh_auto_install:

# qgis binaries
install -o root -g root -m 755 -d $(CURDIR)/debian/qgis/usr/bin
install -o root -g root -m 755 $(CURDIR)/debian/tmp/usr/bin/qgis $(CURDIR)/debian/qgis/usr/bin
install -o root -g root -m 755 $(CURDIR)/debian/tmp/usr/bin/qbrowser $(CURDIR)/debian/qgis/usr/bin
install -o root -g root -m 755 $(CURDIR)/debian/tmp/usr/bin/qgis $(CURDIR)/debian/qgis/usr/bin/qgis.bin
install -o root -g root -m 755 $(CURDIR)/debian/tmp/usr/bin/qbrowser $(CURDIR)/debian/qgis/usr/bin/qbrowser.bin

$(RM) $(CURDIR)/debian/tmp/usr/bin/qgis
$(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
sed -r -e "s/\{GRASS\}/$(GRASS)/g" $(CURDIR)/debian/qgis.sh.in >$(CURDIR)/debian/qgis.sh
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
sed -r \
-e "s/\{GRASS\}/$(GRASS)/g" \
-e "s#\{ORACLE_LIBDIR\}#$(ORACLE_LIBDIR)#g" \
$(CURDIR)/debian/qgis.sh.in >$(CURDIR)/debian/qgis.sh

install -o root -g root -m 755 $(CURDIR)/debian/qgis.sh $(CURDIR)/debian/qgis/usr/bin/qgis
install -o root -g root -m 755 $(CURDIR)/debian/qgis.sh $(CURDIR)/debian/qgis/usr/bin/qbrowser

override_dh_install:
# Don't ship srs.db, automatically updated in postinst with crssync
Expand Down Expand Up @@ -338,10 +342,18 @@ override_dh_compress:
dh_compress --exclude=pdf

override_dh_makeshlibs:
ifneq (,$(WITH_ORACLE))
dh_makeshlibs -Xqgis-plugin-grass -Xlibqgis-customwidgets -Xqgis-provider-oracle -- -c0 -v$(QGIS_VERSION)
else
dh_makeshlibs -Xqgis-plugin-grass -Xlibqgis-customwidgets -- -c0 -v$(QGIS_VERSION)
endif

override_dh_shlibdeps:
ifneq (,$(WITH_ORACLE))
dh_shlibdeps -l/usr/lib/$(GRASS)/lib -l$(ORACLE_LIBDIR)
else
dh_shlibdeps -l/usr/lib/$(GRASS)/lib
endif

override_dh_strip:
dh_strip --dbg-package=qgis-dbg
Expand Down

0 comments on commit 8b054e6

Please sign in to comment.