[Pkg-octave-commit] [SCM] Debian packaging for octave branch, master, updated. 3.2.2-2-102-g2b393c2

Thomas Weber tweber at debian.org
Wed Dec 7 17:56:11 UTC 2011


The following commit has been merged in the master branch:
commit 759cb24e8c9f02b646437dc373c2fbea888d88cc
Author: Thomas Weber <tweber at debian.org>
Date:   Mon Nov 14 23:06:01 2011 +0100

    Completely revamp debian/rules for debhelper 7
    
    Bump compat level to 7 for that.

diff --git a/debian/compat b/debian/compat
index 1e8b314..7f8f011 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-6
+7
diff --git a/debian/rules b/debian/rules
index b37305d..8dae2d8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,481 +1,32 @@
 #!/usr/bin/make -f
-#
-# debian/rules file for the Debian/GNU Linux octave package
-# Copyright 1997-99,2000-03 by Dirk Eddelbuettel <edd at debian.org>
-#
-# $Id$
+# -*- makefile -*-
 
-include /usr/share/quilt/quilt.make
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
 
-# in order: octave, octave2.1, 2.1.28, 2.1  (or whatever the version is), 3.0
-# the difference in major and PACKAGEVER: first one is taken from the octave
-# version (ie 2.1.69), the second one from the binary package name in Debian
-# (ie octave2.1); necessary for the 3.0 rc uploads.
-source		:= $(shell head -1 debian/changelog | \
-			perl -nle 'm/^([a-z]+)/ and print $$1')
-PACKAGE		:= $(shell head -1 debian/changelog | \
-			perl -nle 'm/^(\S+)\s+/ and print $$1')
-version       	:= $(shell head -1 debian/changelog | \
-			perl -nle 'm/\S+\s+\((?:\d:)*([\d.]+)(~[^-]+)*-\S+\)/ and print $$1')
-major       	:= $(shell echo $(version) | perl -nle \
-			'm/(\d\.\d)\.\d+/ and print $$1')
-PACKAGEVER	:= $(shell echo $(PACKAGE) | \
-			perl -nle 'm/.*(\d.\d)/ and print $$1')
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
 
-ifeq ($(major),3.2)
-priority	:= 80
-else
-ifeq ($(major),3.1)
-priority	:= 70
-else
-ifeq ($(major),3.0)
-priority	:= 90
-endif
-endif
-endif
+%:
+	dh $@ --with autoreconf --parallel
 
-api_version = $(shell perl -ne 'if (/OCTAVE_API_VERSION\s+"api-v(.*)"/)	\
-	                          { print "$$1\n" ; last }' < src/version.h)
+clean:
+	dh clean
 
-## The following is necessary when building the documentation file octave.pdf
-export TEXMFCNF = $(CURDIR)/debian:
 
-doc_package	= $(PACKAGE)-doc
-html_package	= $(PACKAGE)-htmldoc
-dev_package	= $(PACKAGE)-headers
-emacs_package	= $(PACKAGE)-emacsen
-info_package	= $(PACKAGE)-info
-common_package = $(PACKAGE)-common
+# override normal dh_compress call to avoid compressing .pdf files
+override_dh_compress:
+	dh_compress -O--parallel --exclude=.pdf
 
-debbase		:= $(CURDIR)/debian
-debtmp		:= $(debbase)/$(PACKAGE)
-debshare	:= $(debtmp)/usr/share
-deblib		:= $(debtmp)/usr/lib
-debdoc		:= $(debshare)/doc/$(PACKAGE)
-debhtmldoc	:= $(debtmp)-htmldoc/usr/share/doc/$(PACKAGE)-htmldoc
-deblsp		:= $(debbase)/$(emacs_package)/usr/share/emacs/site-lisp/$(emacs_package)
-debini		:= $(debbase)/$(common_package)/usr/share/octave/$(version)/m/startup
-debapp		:= $(debshare)/applications
+# override this call, so we do not pass the --parallel option to it; 
+# "make -j2 install" does not work as of now
+override_dh_auto_install:
+	dh_auto_install --max-parallel=1
 
-savefiles	:= BUGS configure config.h.in scripts/configure	\
-			examples/octave.desktop.in
-ifneq ($(major),3.2)
-savefiles	+= doc/conf.texi
-endif
-texifiles	:= doc/interpreter/octave.texi		\
-			doc/liboctave/liboctave.texi	\
-			doc/faq/Octave-FAQ.texi
-
-
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-host_confflags = --build=$(DEB_BUILD_GNU_TYPE)
-ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
-  host_confflags += --host=$(DEB_HOST_GNU_TYPE)
-endif
-DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-
-f77_compiler	= gfortran
-fc_flag		=
-fc_libs		= "-lgfortranbegin -lgfortran"
-compilerflags	= -O2 -g
-
-# default to blas, atlas can overload where available (see README.Atlas)
-#atlas		= --with-blas=/usr/lib/libblas.so \#		  --with-lapack=/usr/lib/liblapack.so
-#atlas		= --with-blas=/usr/lib/libblas-3.so \
-#		  --with-lapack=/usr/lib/liblapack-3.so
-atlas		= --with-blas=-lblas-3gf --with-lapack=-llapackgf-3
-
-ifeq ($(DEB_BUILD_ARCH),arm)
-## edd 20 Jun 2002      no optimisation or debugging on baby systems
-# edd 25 Aug 2002  arm does not have atlas
-compilerflags	= -O0 -g0
-atlas		= --without-blas
-endif
-
-c_compiler	= gcc
-cxx_compiler	= g++
-
-#export DH_VERBOSE=1
-
-sliceterm = UNDEF+V_$(shell echo $(PACKAGEVER) | sed s/\\./_/g)
-
-debian/%: debian/in/%
-	slice -o $(sliceterm):$@ $<
-
-maintainer-clean:
-	rm -f debian/control
-
-maintainer-scripts: debian/control
-	for in in debian/in/PACKAGE* ; do \
-		slice -o $(sliceterm):debian/temp $$in ; \
-		out=`echo $$in | sed 's:/in/:/:;s/PACKAGE/$(PACKAGE)/'` ; \
-		sed 's/@VERSION@/$(version)/g;s/@PACKAGE@/$(PACKAGE)/g;s/@MAJOR@/$(major)/g;s/@PRIORITY@/$(priority)/g;s/@APIVERSION@/$(api_version)/g;' \
-			< debian/temp > $$out ; \
-	done
-	rm -f debian/temp
-
-	for f in octave-depends defs.make ; do \
-		sed 's/@VERSION@/$(version)/g;s/@MAJOR@/$(major)/g' \
-			< debian/in/$$f > debian/$$f ; \
-	done
-
-	for f in watch NEWS ; do				\
-		slice -o $(sliceterm):debian/$$f debian/in/$$f ;	\
-	done
-	## Remove empty NEWS file
-	-test ! -s debian/NEWS && rm -f debian/NEWS
-	slice -o $(sliceterm):debian/patches/series debian/in/series
-
-get-orig-source: upstream
-upstream:
-	links ftp://ftp.octave.org/pub/octave/bleeding-edge
-
-$(patsubst %,build-%,arch indep) :: build-% : \
-		build-%-stamp configure-stamp make-%-stamp check-stamp
-$(patsubst %,build-%-stamp,arch indep) :: build-%-stamp : \
-		configure make-% check
-	touch $@
-
-.PHONY: save-files
-save-files:
-	-for f in $(savefiles) $(texifiles) ; do	\
-		test -f $$f && cp $$f $$f-save ;	\
-	done
-
-configure: maintainer-scripts save-files patch configure-stamp
-configure-stamp:
-	dh_testdir
-
-	autoconf --force
-	autoheader --force
-
-	# Patch desktop file such that the referenced command exists
-	-test -f examples/octave.desktop.in				\
-		&& perl -pi -e 's:/bin/octave:/bin/octave-$(version):'	\
-			examples/octave.desktop.in
-
-	DEFAULT_PAGER=pager				\
-	CC=$(c_compiler) 				\
-	CXX=$(cxx_compiler)				\
-	F77=$(f77_compiler)				\
-	FLIBS=$(fc_libs)				\
-	infofile=/usr/share/info/$(PACKAGE).info	\
-	./configure					\
-			$(host_confflags)		\
-			--prefix=/usr			\
-			--datadir=/usr/share		\
-			--libdir=/usr/lib		\
-			--libexecdir=/usr/lib		\
-			--infodir=/usr/share/info	\
-			--mandir=/usr/share/man		\
-			$(atlas)			\
-			--with-hdf5			\
-			--with-fftw			\
-			$(fc_flag)			\
-			--enable-shared			\
-			--enable-rpath			\
-			--disable-static
-
-	pod2man debian/octave-depends > octave-depends-$(version).1
-
-	for f in $(texifiles) ; do					\
-		perl -pi -e 's/^(\@setfilename .+ctave)/$${1}$(major)/'	\
-			$$f ; 						\
-	done
-
-	chmod +x debian/subdirs-vars.pl
-	cp octMakefile octMakefile-orig
-	for i in no-doc only-doc ; do				\
-		debian/subdirs-vars.pl $$i			\
-			< octMakefile > octMakefile-$$i ;	\
-	done
-
-	touch configure-stamp
-
-make-arch: configure-stamp make-arch-stamp
-make-arch-stamp:
-
-	make -C doc conf.texi
-	ln -fs octMakefile-no-doc octMakefile
-	$(MAKE)		CFLAGS="$(compilerflags)"		\
-			CXXFLAGS="$(compilerflags)"		\
-			FFLAGS="$(compilerflags)"		\
-			CC="$(c_compiler)"			\
-			CXX="$(cxx_compiler)"			\
-			F77="$(f77_compiler)"
-
-	touch make-arch-stamp
-
-make-indep: configure-stamp make-arch-stamp make-indep-stamp
-make-indep-stamp:
-
-	ln -fs octMakefile-only-doc octMakefile
-	$(MAKE) AWK=gawk
-
-	touch make-indep-stamp
-
-check: configure-stamp make-arch-stamp check-stamp
-check-stamp:
-	ln -fs octMakefile-no-doc octMakefile
-	-$(MAKE) check
-	touch check-stamp
-
-clean: unpatch
-	dh_testdir
-	dh_testroot
-
-	[ ! -f doc/Makefile ] || $(MAKE) -C doc clean
-ifeq ($(major),3.2)
-	rm -f doc/conf.texi
-endif
-	[ ! -f doc/interpreter/images/Makefile ] \
-		|| $(MAKE) -C doc/interpreter/images distclean
-	[ ! -f doc/Makefile ] || $(MAKE) -C doc maintainer-clean
-	find doc -name \*.info\* | xargs rm -f
-	# Remove all *.html shipped with the upstream tarball, such that
-	# when the package is build twice in a row it will have the same
-	# contents.  This bug happens because makeinfo yields different
-	# names for the HTML files than those in the tarball.
-	find doc -name \*.html | xargs rm -f
-
-	-test -f octMakefile-orig && mv octMakefile-orig octMakefile
-
-	# In order to run distclean, octMakefile should be used (actually
-	# octMakefile.in, which always exist).  However, Makeconf must
-	# always be present.
-	touch Makeconf
-	[ ! -f octMakefile.in ]	\
-		|| $(MAKE) -f octMakefile.in distclean
-
-	rm -f build-*-stamp configure-stamp make-*-stamp check-stamp	\
-		install-*-stamp Makefile.tmp octMakefile-*
-
-	rm -f `ls debian/in/PACKAGE* | sed 's/PACKAGE/$(PACKAGE)/;s:/in::'`
-	rm -f octave-depends-$(version).1
-	( cd debian ; rm -f octave-depends defs.make )
-
-	-for f in $(savefiles) $(texifiles) ; do	\
-		test -f $$f-save && mv $$f-save $$f ;	\
-	done
-
-	rm -f debian/NEWS debian/temp
-
-	# Make sure a debian/watch file is included in the source package
-	slice -o $(sliceterm):debian/watch debian/in/watch
-
-	dh_clean
-
-install: install-arch install-indep
-
-install-indep: configure-stamp make-indep-stamp install-indep-stamp
-install-indep-stamp :
-	dh_testdir
-	dh_testroot
-	dh_installdirs -A
-
-	ln -fs octMakefile-only-doc octMakefile
-	$(MAKE) INSTALL_PROGRAM="install -s" DESTDIR=$(debtmp)	\
-		install
-
-	touch install-indep-stamp
-
-install-arch: configure-stamp make-arch-stamp check-stamp install-arch-stamp
-install-arch-stamp :
-	dh_testdir
-	dh_testroot
-	dh_installdirs -A
-
-	ln -fs octMakefile-no-doc octMakefile
-	$(MAKE) INSTALL_PROGRAM="install -s" DESTDIR=$(debtmp)	\
-		install
-
-	dh_installman				\
-		octave-depends-$(version).1	\
-		doc/interpreter/octave.1	\
-		doc/interpreter/octave-bug.1	\
-		doc/interpreter/mkoctfile.1	\
-		doc/interpreter/octave-config.1
-
-	install debian/octave-depends \
-		 $(debtmp)/usr/bin/octave-depends-$(version)
-	install --mode=644 debian/defs.make \
-		$(debtmp)/usr/share/octave/debian/defs.make-$(version)
-
-	(cd $(debtmp)/usr/share/man/man1; 				\
-		mv -v	octave.1	octave-$(version).1;    	\
-		ln -s	octave-$(version).1	octave$(major).1;	\
-		mv -v   octave-bug.1	octave-bug-$(version).1;	\
-		mv -v	octave-config.1	octave-config-$(version).1;   	\
-		mv -v   mkoctfile.1	mkoctfile-$(version).1;		)
-	(cd $(debtmp)/usr/bin; 						\
-		rm -v   octave	octave-bug mkoctfile octave-config)
-
-	# install the directory for Octave packages
-	install -d $(debtmp)/usr/lib/octave/packages/$(major)
-
-	touch install-arch-stamp
-
-binary-indep: build-indep install-indep
-	dh_testdir -i
-	dh_testroot -i
-
-        # already installed by make
-	dh_installinfo -n -p$(info_package)  	doc/*/*$(major)*.info*
-
-	dh_installdocs -n -p$(doc_package) doc/liboctave/*.pdf	\
-		doc/interpreter/octave-a4.pdf doc/refcard/*.pdf doc/faq/*.pdf
-	dh_installdocs -i
-	for dir in faq interpreter liboctave ; do			\
-		test -d $(debhtmldoc)/$$dir				\
-			|| mkdir $(debhtmldoc)/$$dir ;			\
-		find doc/$$dir \( -name \*.html -o -name \*.png \) 	\
-			 -exec cp \{} $(debhtmldoc)/$$dir \; ;		\
-	done
-
-        # install Octave Emacs files and Debian Emacsen files
-	dh_installdirs -p$(emacs_package)
-	dh_installdirs -p$(emacs_package) \
-		usr/share/emacs/site-lisp/$(emacs_package)
-	install -p -m 0644 emacs/*.el		$(deblsp)
-	dh_installemacsen -p$(emacs_package)
-	-install -p -m 0755 emacs/octave-tags			\
-		$(debbase)/$(emacs_package)/usr/bin/octave-tags-$(version)
-	-install -p -m 0644 emacs/octave-tags.1			\
-	     $(debbase)/$(emacs_package)/usr/share/man/man1/octave-tags-$(version).1
-
-	# install the directory for Octave packages
-	install -d $(debbase)/$(common_package)/usr/share/octave/packages/$(major)
-
-        ## link the conf.file back from /etc over the version.spec. rc
-	ln -sf /etc/$(PACKAGE).conf 		$(debini)/octaverc
-
-        # The ls-R database is not needed anymore
-	rm -vf $(debbase)/$(common_package)/usr/share/octave/ls-R
-
-        # install lintian overrride
-	dh_lintian -p$(common_package)
-	dh_lintian -p$(info_package)
-
-	dh_installchangelogs -i	ChangeLog
-	dh_compress -i --exclude=.pdf
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
-
-# Build architecture-dependent files here.
-binary-arch: build-arch install-arch check
-	dh_testdir -a
-	dh_testroot -a
-	dh_installdirs -p$(PACKAGE)
-
-        # remove the /usr/share/info/dir stab
-	rm -vf $(debtmp)/usr/share/info/dir
-
-        # Remove empty site/ dirs
-	rm -rf $$(find debian/ -name site -type d)
-
-        # save the include files for the header package
-	dh_movefiles -p$(dev_package) --sourcedir=debian/$(PACKAGE)	\
-			usr/include/		 			\
-			usr/bin/mkoctfile-$(version) 			\
-			usr/bin/octave-config-$(version)		\
-			usr/bin/octave-depends-$(version) 		\
-			usr/share/man/man1/mkoctfile-$(version).1	\
-			usr/share/man/man1/octave-config-$(version).1	\
-			usr/share/man/man1/octave-depends-$(version).1	\
-			usr/share/octave/debian/defs.make-$(version)
-	rm -r $(debtmp)/usr/include
-	rm -rf $(debtmp)/usr/share/info
-
-	# install files for the common package
-	dh_movefiles -p$(common_package) --sourcedir=debian/$(PACKAGE)	\
-			usr/share/octave
-
-	rm -rf $(debtmp)/usr/share/octave $(debtmp)/usr/share/enscript
-
-	install -p -m 0644  debian/$(PACKAGE).conf  $(debtmp)/etc
-
-        # install lintian overrride
-	dh_lintian -p$(PACKAGE)
-
-	dh_installdocs -a			README README.kpathsea	\
-						NEWS* PROJECTS		\
-						BUGS SENDING-PATCHES
-	-test "$(PACKAGEVER)" != 3.2 && dh_installdocs -a THANKS
-
-	dh_installdocs -p$(PACKAGE) 		debian/README.Atlas
-
-        # The ls-R database is not needed anymore
-	rm -vf $(debtmp)/usr/lib/octave/ls-R
-
-	## Rename the desktop file
-	-[ -e $(debapp)/www.octave.org-octave.desktop ]		\
-		&& mv $(debapp)/www.octave.org-octave.desktop	\
-			$(debapp)/octave$(major).desktop
-
-	dh_installexamples -p$(dev_package) examples/* \
-		--exclude=octave.desktop
-
-	dh_installmenu -p$(PACKAGE)
-	dh_installchangelogs -a ChangeLog ChangeLog.1
-	for i in glob libcruft liboctave src scripts test doc; do \
-		cp -vax $$i/ChangeLog $(debdoc)/changelog.$$i; done
-	# make octaveX.Y a symlink to octave-x.y.z and link the manpage to octaveX.Y
-	dh_link --package=$(PACKAGE) \
-		usr/bin/octave-$(version) usr/bin/$(PACKAGE)
-	dh_link --package=$(PACKAGE) \
-		usr/share/man/man1/octave-$(version).1.gz \
-		usr/share/man/man1/octave$(major).1.gz
-	# FIXME: The following should be removed after the final 3.0 release
-ifneq ($(PACKAGEVER),$(major))
-	dh_link --package=$(PACKAGE) \
-		usr/share/man/man1/octave$(major).1.gz \
-		usr/share/man/man1/octave$(PACKAGEVER).1.gz
-endif
-	# make mkoctfileX.Y a symlink and symlink the manpage as well
-	dh_link --package=$(dev_package) \
-		usr/bin/mkoctfile-$(version) usr/bin/mkoctfile$(major)
-	dh_link --package=$(dev_package) \
-		usr/share/man/man1/mkoctfile-$(version).1.gz \
-		usr/share/man/man1/mkoctfile$(major).1.gz
-	# FIXME: The following should be removed after the final 3.0 release
-ifneq ($(PACKAGEVER),$(major))
-	dh_link --package=$(dev_package) \
-		usr/share/man/man1/mkoctfile$(major).1.gz \
-		usr/share/man/man1/mkoctfile$(PACKAGEVER).1.gz
-endif
-	# make octaveX.Y-depends a symlink and symlink the manpage as well
-	dh_link --package=$(dev_package) \
-		usr/bin/octave-depends-$(version) \
-		usr/bin/octave$(major)-depends
-	dh_link --package=$(dev_package) \
-		usr/share/man/man1/octave-depends-$(version).1.gz \
-		usr/share/man/man1/octave$(major)-depends.1.gz
-	# FIXME: The following should be removed after the final 3.0 release
-ifneq ($(PACKAGEVER),$(major))
-	dh_link --package=$(dev_package) \
-		usr/share/man/man1/octave$(major)-depends.1.gz \
-		usr/share/man/man1/octave$(PACKAGEVER)-depends.1.gz
-endif
-
-	dh_strip -a --dbg-package=$(PACKAGE)-dbg
-	dh_strip -a
-	dh_compress -a
-	dh_fixperms -a
-	dh_installdeb -a
-	dh_shlibdeps -a -l/usr/lib/octave-$(version)
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
-
-source diff:
-	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-binary: binary-arch binary-indep
-.PHONY: build clean make configure binary-indep binary-arch binary
-
-.NOTPARALLEL:
+# save debug information into the debug package
+override_dh_strip:
+	dh_strip -a --dbg-package=octave-dbg
 
+get-orig-source:
+	uscan --force-download --rename --destdir .
+.PHONY: get-orig-source

-- 
Debian packaging for octave



More information about the Pkg-octave-commit mailing list