[pnetcdf] 08/08: First complete packaging test

Alastair McKinstry mckinstry at moszumanska.debian.org
Sun Jan 24 09:06:33 UTC 2016


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

mckinstry pushed a commit to branch debian/master
in repository pnetcdf.

commit b990325017c6327749b989bf06621d8fdd21b772
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Jan 18 22:07:53 2016 +0000

    First complete packaging test
---
 debian/libpnetcdf-dev.install  |  1 +
 debian/libpnetcdf0.install     |  1 -
 debian/libpnetcdf0d.install    |  1 +
 debian/patches/destdir.patch   |  6 ++++++
 debian/patches/hardening.patch | 32 ++++++++++++++++++++++++++++++++
 debian/patches/manpages.patch  | 31 +++++++++++++++++++++++++++++++
 debian/patches/series          |  3 ++-
 debian/patches/shared.patch    | 29 -----------------------------
 debian/rules                   | 12 ++++++++----
 9 files changed, 81 insertions(+), 35 deletions(-)

diff --git a/debian/libpnetcdf-dev.install b/debian/libpnetcdf-dev.install
index 47d369f..fcea134 100644
--- a/debian/libpnetcdf-dev.install
+++ b/debian/libpnetcdf-dev.install
@@ -1,2 +1,3 @@
 usr/include/*
 usr/share/man/man3/*
+usr/lib/*/libpnetcdf.a
diff --git a/debian/libpnetcdf0.install b/debian/libpnetcdf0.install
deleted file mode 100644
index 365bef5..0000000
--- a/debian/libpnetcdf0.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/libpnetcdf.a
diff --git a/debian/libpnetcdf0d.install b/debian/libpnetcdf0d.install
new file mode 100644
index 0000000..cfe12a7
--- /dev/null
+++ b/debian/libpnetcdf0d.install
@@ -0,0 +1 @@
+usr/lib/*/libpnetcdf.so.0d
diff --git a/debian/patches/destdir.patch b/debian/patches/destdir.patch
index 847e9d5..e28ad97 100644
--- a/debian/patches/destdir.patch
+++ b/debian/patches/destdir.patch
@@ -1,3 +1,9 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Add DESTDIR support so that installs can be staged
+ in $DESTDIR for packaging builds
+Forwarded: no
+Last-Updated: 2016-01-23
+
 Index: pnetcdf-1.7.0~pre1/Makefile.in
 ===================================================================
 --- pnetcdf-1.7.0~pre1.orig/Makefile.in
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..3dd7d44
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,32 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Use $(CFLAGS), $(LDFLAGS) when using CC compiler
+ Needed to ensure hardedning options are passed
+Last-Updated: 2016-01-23
+Forwarded: no
+
+Index: pnetcdf-1.7.0~pre1/macros.make.in
+===================================================================
+--- pnetcdf-1.7.0~pre1.orig/macros.make.in
++++ pnetcdf-1.7.0~pre1/macros.make.in
+@@ -48,7 +48,7 @@ MPICXX		= @MPICXX@
+ MPIF77		= @MPIF77@
+ MPIF90		= @MPIF90@
+ 
+-SEQ_CC          = @SEQ_CC@
++SEQ_CC          = @SEQ_CC@ @CFLAGS@ @LDFLAGS@
+ 
+ # debugging and optimization options for compiling and linking
+ CFLAGS		= @CFLAGS@
+Index: pnetcdf-1.7.0~pre1/src/utils/pnetcdf_version/Makefile.in
+===================================================================
+--- pnetcdf-1.7.0~pre1.orig/src/utils/pnetcdf_version/Makefile.in
++++ pnetcdf-1.7.0~pre1/src/utils/pnetcdf_version/Makefile.in
+@@ -38,7 +38,7 @@ GARBAGE		= $(PROGRAM)
+ all: $(PROGRAM)
+ 
+ pnetcdf_version: pnetcdf_version.c
+-	$(SEQ_CC) $(DEFS) -o $@ $<
++	$(SEQ_CC)  $(DEFS) -o $@ $<
+ 
+ install: $(PROGRAM) $(MANUAL)
+ 	$(INSTALL) -d -m 755 $(MANDIR)/man1
diff --git a/debian/patches/manpages.patch b/debian/patches/manpages.patch
new file mode 100644
index 0000000..59f7bdb
--- /dev/null
+++ b/debian/patches/manpages.patch
@@ -0,0 +1,31 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Minor manpage fixes needed for Debian
+Last-Updated: 2016-01-23
+Forwarded: no
+
+Index: pnetcdf-1.7.0~pre1/man/pnetcdf_f90.m4
+===================================================================
+--- pnetcdf-1.7.0~pre1.orig/man/pnetcdf_f90.m4
++++ pnetcdf-1.7.0~pre1/man/pnetcdf_f90.m4
+@@ -1,7 +1,7 @@
+ .nr yr \n(yr+1900
+ .af mo 01
+ .af dy 01
+-.TH PNETCDF 3f90 "RELEASE_DATE" "Printed: \n(yr.\n(mo.\n(dy" "LIBRARY FUNCTIONS"
++.TH PNETCDF 3 "RELEASE_DATE" "Printed: \n(yr.\n(mo.\n(dy" "LIBRARY FUNCTIONS"
+ .SH NAME
+ PnetCDF \- Parallel library for accessing files in Network Common Data Form (CDF, CDF-2 and CDF-5 formats)
+ .SH SYNOPSIS
+Index: pnetcdf-1.7.0~pre1/src/utils/ncmpigen/ncmpigen.1
+===================================================================
+--- pnetcdf-1.7.0~pre1.orig/src/utils/ncmpigen/ncmpigen.1
++++ pnetcdf-1.7.0~pre1/src/utils/ncmpigen/ncmpigen.1
+@@ -338,7 +338,7 @@ are all acceptable \fIfloat\fP constants
+ -2.0f
+ 3.14159265358979f	// will be truncated to less precision
+ 1.f
+-.1f
++.\" .1f
+ .fi
+ .RE
+ .LP
diff --git a/debian/patches/series b/debian/patches/series
index 2e30091..75564bd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 destdir.patch
-#shared.patch
+manpages.patch
+hardening.patch
diff --git a/debian/patches/shared.patch b/debian/patches/shared.patch
deleted file mode 100644
index 34a1e5b..0000000
--- a/debian/patches/shared.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Author: Alastair McKinstry <mckinstry at debian.org>
-Description: Add support for shared libraries
-Forwarded: no
-Last-Updated: 2016-01-22
-
-Index: pnetcdf-1.7.0~pre1/configure.in
-===================================================================
---- pnetcdf-1.7.0~pre1.orig/configure.in
-+++ pnetcdf-1.7.0~pre1/configure.in
-@@ -12,6 +12,10 @@ AC_CONFIG_SRCDIR([src/lib/pnetcdf.h.in])
- 
- AC_CONFIG_AUX_DIR([./scripts])
- 
-+LT_INIT([shared])
-+AC_SUBST([LIBTOOL_DEPS])
-+AC_CONFIG_MACRO_DIR([m4])
-+
- CONFIGURE_ARGS_CLEAN=`echo $* | tr '"' ' '`
- 
- dnl parse the version numbers to 4 env variables
-@@ -602,6 +606,8 @@ fi
- 
- AC_PROG_INSTALL
- 
-+AM_CONDITIONAL([CREATING_SHARED_LIBS], [test "x$enable_shared" = xyes])
-+
- have_yacc_lex=no
- dnl Starting from PnetCDF 1.5.0, yacc and lex is no longer needed
- dnl see comments in src/utils/ncmpigen/Makefile.in for build rules for
diff --git a/debian/rules b/debian/rules
index 64ab78d..f860f26 100644
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,7 @@ DEB_CFLAGS_MAINT_APPEND:= -Wall -pedantic
 DEB_CXXFLAGS_MAINT_APPEND:= -Wall -pedantic
 DEB_FCFLAGS_MAINT_APPEND:= -Wall -pedantic
 DEB_FFLAGS_MAINT_APPEND:= -Wall -pedantic
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
 SHLIB=libpnetcdf.so.0d
 
@@ -23,7 +24,7 @@ override_dh_auto_clean:
 	rm -rf build-*
 
 override_dh_auto_configure:
-	dh_auto_configure  --builddirectory=build-static
+	dh_auto_configure  --builddirectory=build-static 
 	dh_auto_configure  --builddirectory=build-shared -- \
 		CFLAGS=" $(CFLAGS) -fPIC"  CXXFLAGS="$(CXXFLAGS) -fPIC" \
 		FCFLAGS="$(FCFLAGS) -fPIC" FFLAGS="$(FFLAGS) -fPIC"
@@ -32,11 +33,14 @@ override_dh_auto_build:
 	$(MAKE) -C build-static
 	$(MAKE) -C build-shared
 	( cd build-shared/src/lib && \
-		mpicxx -shared -o libpnetcdf.so.0d \
+		mpicxx -shared -o $(SHLIB) -Wl,--soname -Wl,$(SHLIB) $(LDFLAGS) \
 		-Wl,--whole-archive libpnetcdf.a -Wl,--no-whole-archive -lgfortran )
 
 override_dh_auto_install:
 	$(MAKE) -C build-static install DESTDIR=$(DESTDIR)
 	mkdir -p $(DESTDIR)/$(LIBDIR) $(DESTDIR)/usr/share
-	mv $(DESTDIR)/usr/man $(DESTDIR)/usr/share
-	mv $(DESTDIR)/usr/lib/lib* $(DESTDIR)/$(LIBDIR)
+	cp -a $(DESTDIR)/usr/man $(DESTDIR)/usr/share
+	cp -a $(DESTDIR)/usr/lib/lib* $(DESTDIR)/$(LIBDIR)
+	cp -a build-shared/src/lib/$(SHLIB) $(DESTDIR)/$(LIBDIR)
+	dh_link -p libpnetcdf-dev $(LIBDIR)/$(SHLIB) $(LIBDIR)/libpnetcdf.so
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pnetcdf.git



More information about the debian-science-commits mailing list