[osgearth] 03/05: Use dh_auto_* instead of manual make commands.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Aug 28 19:29:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch stretch
in repository osgearth.

commit 4ff9ca1e84c1b72b5999b47664e00de798bfc925
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Aug 28 19:52:42 2015 +0200

    Use dh_auto_* instead of manual make commands.
---
 debian/changelog |   1 +
 debian/rules     | 102 +++++++++++++++++++++++++++----------------------------
 2 files changed, 52 insertions(+), 51 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0545eb7..502e7d1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ osgearth (2.5.0+dfsg-5) UNRELEASED; urgency=medium
 
   * Use -DCMAKE_VERBOSE_MAKEFILE=1 instead of passing MAKE_VERBOSE.
   * Update symbols for amd64.
+  * Use dh_auto_* instead of manual make commands.
 
  -- Bas Couwenberg <sebastic at debian.org>  Fri, 28 Aug 2015 17:02:17 +0200
 
diff --git a/debian/rules b/debian/rules
index 68386f8..adaf251 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,10 +8,6 @@ export DH_OPTIONS
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
-	NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
-endif
-
 # CMake doesn't use hardening build flags set in CPPFLAGS
 CFLAGS   += $(CPPFLAGS)
 CXXFLAGS += $(CPPFLAGS)
@@ -23,16 +19,20 @@ BUILD_DATE := $(shell dpkg-parsechangelog | sed -n 's/^Date: //p' | LC_ALL=C dat
 MANPAGES:=$(wildcard debian/man/*.*.xml)
 
 %:
-	dh $@ --with pkgkde_symbolshelper
+	dh $@ --with pkgkde_symbolshelper \
+	      --parallel
 
 override_dh_clean:
-	dh_clean
-
-	-$(RM) -f $(CURDIR)/debian/man/*.1
+	dh_clean debian/man/*.1
 	-$(RM) -rf build/
 
 override_dh_auto_configure:
-	mkdir -p build && cd build && cmake .. -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLIB_POSTFIX="" -DDEB_HOST_MULTIARCH=$(DEB_HOST_MULTIARCH)
+	dh_auto_configure --builddirectory=build -- \
+		-DCMAKE_VERBOSE_MAKEFILE=1 \
+		-DCMAKE_BUILD_TYPE=Release \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DLIB_POSTFIX="" \
+		-DDEB_HOST_MULTIARCH=$(DEB_HOST_MULTIARCH)
 
 override_dh_auto_build:
 	# Create man pages from DocBook XML
@@ -41,56 +41,56 @@ override_dh_auto_build:
 	  mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \
 	done
 
-	$(MAKE) $(NJOBS) -C build
+	dh_auto_build --builddirectory=build
 
 override_dh_auto_install:
-	$(MAKE) -C build install DESTDIR=$(CURDIR)/debian/tmp
+	dh_auto_install --builddirectory=build
 
-	mkdir -p $(CURDIR)/debian/osgearth-data/usr/share/osgearth/maps && \
-	  cp $(CURDIR)/tests/*.earth $(CURDIR)/debian/osgearth-data/usr/share/osgearth/maps/ && \
-	  cp $(CURDIR)/debian/*.earth $(CURDIR)/debian/osgearth-data/usr/share/osgearth/maps/ && \
-	  sed --in-place -e 's!\\!/!g' -e 's!\.\./data!/usr/share/osgearth/data!g' $(CURDIR)/debian/osgearth-data/usr/share/osgearth/maps/*.earth
+	mkdir -p debian/osgearth-data/usr/share/osgearth/maps && \
+	  cp tests/*.earth debian/osgearth-data/usr/share/osgearth/maps/ && \
+	  cp debian/*.earth debian/osgearth-data/usr/share/osgearth/maps/ && \
+	  sed --in-place -e 's!\\!/!g' -e 's!\.\./data!/usr/share/osgearth/data!g' debian/osgearth-data/usr/share/osgearth/maps/*.earth
 
-	mkdir -p $(CURDIR)/debian/osgearth-data/usr/share/osgearth/data && \
-	  cp $(CURDIR)/data/world.tif $(CURDIR)/debian/osgearth-data/usr/share/osgearth/data/ && \
-	  cp -r $(CURDIR)/data/resources/ $(CURDIR)/debian/osgearth-data/usr/share/osgearth/data/
+	mkdir -p debian/osgearth-data/usr/share/osgearth/data && \
+	  cp data/world.tif debian/osgearth-data/usr/share/osgearth/data/ && \
+	  cp -r data/resources/ debian/osgearth-data/usr/share/osgearth/data/
 
 	# Don't install binaries which depend on removed data files
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_annotation
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_city
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_clamp
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_featureeditor
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_features
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_imageoverlay
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_los
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_minimap
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_occlusionculling
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_qt
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_tracks
+	$(RM) debian/*/usr/bin/osgearth_annotation
+	$(RM) debian/*/usr/bin/osgearth_city
+	$(RM) debian/*/usr/bin/osgearth_clamp
+	$(RM) debian/*/usr/bin/osgearth_featureeditor
+	$(RM) debian/*/usr/bin/osgearth_features
+	$(RM) debian/*/usr/bin/osgearth_imageoverlay
+	$(RM) debian/*/usr/bin/osgearth_los
+	$(RM) debian/*/usr/bin/osgearth_minimap
+	$(RM) debian/*/usr/bin/osgearth_occlusionculling
+	$(RM) debian/*/usr/bin/osgearth_qt
+	$(RM) debian/*/usr/bin/osgearth_tracks
 
 	# Don't install example binaries
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_colorfilter
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_contour
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_controls
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_elevation
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_featurefilter
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_featureinfo
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_featuremanip
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_featurequery
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_graticule
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_manip
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_map
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_measure
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_package_qt
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_qt_simple
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_qt_windows
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_sequencecontrol
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_shadercomp
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_shadow
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_terrainprofile
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_tilesource
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_toc
-	$(RM) -f $(CURDIR)/debian/tmp/usr/bin/osgearth_verticalscale
+	$(RM) debian/*/usr/bin/osgearth_colorfilter
+	$(RM) debian/*/usr/bin/osgearth_contour
+	$(RM) debian/*/usr/bin/osgearth_controls
+	$(RM) debian/*/usr/bin/osgearth_elevation
+	$(RM) debian/*/usr/bin/osgearth_featurefilter
+	$(RM) debian/*/usr/bin/osgearth_featureinfo
+	$(RM) debian/*/usr/bin/osgearth_featuremanip
+	$(RM) debian/*/usr/bin/osgearth_featurequery
+	$(RM) debian/*/usr/bin/osgearth_graticule
+	$(RM) debian/*/usr/bin/osgearth_manip
+	$(RM) debian/*/usr/bin/osgearth_map
+	$(RM) debian/*/usr/bin/osgearth_measure
+	$(RM) debian/*/usr/bin/osgearth_package_qt
+	$(RM) debian/*/usr/bin/osgearth_qt_simple
+	$(RM) debian/*/usr/bin/osgearth_qt_windows
+	$(RM) debian/*/usr/bin/osgearth_sequencecontrol
+	$(RM) debian/*/usr/bin/osgearth_shadercomp
+	$(RM) debian/*/usr/bin/osgearth_shadow
+	$(RM) debian/*/usr/bin/osgearth_terrainprofile
+	$(RM) debian/*/usr/bin/osgearth_tilesource
+	$(RM) debian/*/usr/bin/osgearth_toc
+	$(RM) debian/*/usr/bin/osgearth_verticalscale
 
 override_dh_install:
 	dh_install --autodest --list-missing

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osgearth.git



More information about the Pkg-grass-devel mailing list