[rkward/releases/0.6.5] /: Fix PPA builds

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Mar 31 20:41:07 UTC 2016


Git commit 84ae6970e89f051c1b80fd32d4d1fe7c56b232be by Thomas Friedrichsmeier.
Committed on 31/03/2016 at 20:41.
Pushed by tfry into branch 'releases/0.6.5'.

Fix PPA builds

M  +2    -0    debian-official/changelog
M  +1    -1    debian-official/rkward-data.manpages
M  +12   -89   debian-official/rules
M  +1    -1    debian/rules

http://commits.kde.org/rkward/84ae6970e89f051c1b80fd32d4d1fe7c56b232be

diff --git a/debian-official/changelog b/debian-official/changelog
index 672994d..0786399 100644
--- a/debian-official/changelog
+++ b/debian-official/changelog
@@ -2,6 +2,8 @@ rkward (0.6.5-1) UNRELEASED; urgency=low
   * new upstream release
     (unchanged with respect to ~rc1)
   * fix debian/watch file
+  * switch to dh-based rules file
+    !!!TODO!!!: Does this fix the rkward-data build for binary-arch problem?
   * !!!TODO!!!: Make build really reproducible (fix for earlier attempt upstream)
     closes: #783290
 
diff --git a/debian-official/rkward-data.manpages b/debian-official/rkward-data.manpages
index 56c56af..f46a858 100644
--- a/debian-official/rkward-data.manpages
+++ b/debian-official/rkward-data.manpages
@@ -1 +1 @@
-build/doc/rkward/rkward.1
+debian/build/doc/rkward/rkward.1
diff --git a/debian-official/rules b/debian-official/rules
index 491ab34..07d47f4 100755
--- a/debian-official/rules
+++ b/debian-official/rules
@@ -1,25 +1,4 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
-# Based on the sample debian/rules of dh_make
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# For CXXFLAGS and CFLAGS.
-# See http://lists.debian.org/debian-devel-announce/2011/09/msg00001.html 
-DPKG_EXPORT_BUILDFLAGS = 1
--include /usr/share/dpkg/buildflags.mk
-
-CFLAGS += -Wall
-
-# Workaround for cmake not handling CPPFLAGS (https://wiki.debian.org/HardeningWalkthrough):
-CFLAGS += $(CPPFLAGS)
-CXXFLAGS += $(CPPFLAGS)
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 #we need to know the R version
 RVERS = $(shell dpkg-query -W --showformat='$${Version}' r-base-core)
@@ -31,29 +10,20 @@ builttime = $(shell dpkg-parsechangelog -l$(CURDIR)/debian/changelog | awk -F':
 
 # easier typing
 DESTDIR = $(CURDIR)/debian/tmp
+BUILDDIR = $(CURDIR)/debian/build
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-
-build-stamp:
-	dh_testdir
-
-	mkdir -p $(CURDIR)/build
+%:
+	dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR)
 
+override_dh_auto_configure:
+	mkdir -p $(BUILDDIR)
 	# Some installations of R need a specific version of the compiler(s)
 	# R CMD config provides info on which compiler to use
-	cd $(CURDIR)/build && \
+	cd $(BUILDDIR) && \
 	CC="`/usr/bin/R CMD config CC`" \
 	CXX="`/usr/bin/R CMD config CXX`" \
 	F77="`/usr/bin/R CMD config F77`" \
-	cmake .. \
+	cmake ../.. \
 		-DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` \
 		-DDATA_INSTALL_DIR=`kde4-config --install data` \
 		-DHTML_INSTALL_DIR=`kde4-config --install html` \
@@ -74,62 +44,21 @@ build-stamp:
 		-DR_LIBDIR=/usr/lib/R/site-library/ \
 		-DBUILD_TIMESTAMP="$(builttime)"
 
-	# Add here commands to compile the package.
-	cd $(CURDIR)/build && $(MAKE)
-
-	touch build-stamp
+override_dh_auto_install:
+	dh_auto_install
 
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp
-	# remove any .svn subdir included by accident
-	rm -rf $(CURDIR)/debian/.svn
-
-	# Add here commands to clean up after the build process.
-	rm -rf $(CURDIR)/build/
-
-	dh_clean 
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-
-	# Install into debian/tmp, first
-	cd $(CURDIR)/build && $(MAKE) install DESTDIR=$(DESTDIR)
 	# dirty hack to get rid of conflicting r.xml file without adjusting all makefiles
 	rm -vf $(DESTDIR)/`kde4-config --install data`/katepart/syntax/r.xml
-	
 	# remove unneeded R package files
 	rm -vf $(DESTDIR)/usr/lib/R/site-library/R.css $(DESTDIR)/usr/lib/R/site-library/rkward/COPYING
-
 	# remove x-test locale
 	rm -rvf $(DESTDIR)/usr/share/kde4/apps/rkward/po/x-test $(DESTDIR)/usr/share/locale/x-test
 
-	# Sort the remaining bits into rkward and rkward-data subpackages
-	dh_install
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs ChangeLog
-	dh_installdocs
-	dh_installexamples
-	dh_installmenu
-	dh_installman
-	dh_link
-	dh_strip
+override_dh_compress:
 	# do not compress KDE HTML help
 	dh_compress -Xusr/share/doc/kde/HTML
-	dh_fixperms
-	dh_installdeb
+
+override_dh_shlibdeps:
 	dh_shlibdeps
 	# unfortunately, the r-base-core dependency can not be found by dh_shlibdeps, so we need to get at the version manually
 	# NOTE: This "if" is currently always true (see build-deps), but left here, for convenience, in case we get into trouble
@@ -137,9 +66,3 @@ binary-arch: build install
 	@if [ "$(RMAJOR)" -eq "3" ] && [ "$(RMINOR)" -ge "0" ] ; then \
 		echo "rvers=r-base-core (>= 3.0.0)" >> $(CURDIR)/debian/rkward.substvars ; \
 	fi
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/rules b/debian/rules
index f798733..4f904a7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -109,7 +109,7 @@ install: build
 	rm -rvf $(DESTDIR)/usr/share/kde4/apps/rkward/po/x-test $(DESTDIR)/usr/share/locale/x-test
 
 	# Sort the remaining bits into rkward and rkward-data subpackages
-	dh_install
+	dh_install --sourcedir=$(DESTDIR)
 
 # Build architecture-independent files here.
 binary-indep: build install



More information about the rkward-tracker mailing list