[Pkg-gnupg-commit] [libassuan] 03/04: produce packages for cross-building on Windows

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Feb 16 22:40:50 UTC 2016


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

dkg pushed a commit to branch debian-windows
in repository libassuan.

commit f82e6653157fe1951ca23aad42a5aba74d2b94bb
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Sun Feb 14 11:11:14 2016 -0500

    produce packages for cross-building on Windows
    
    Use files and locations suggested by Stephen Kitt
---
 debian/clean                                     |  2 ++
 debian/control                                   | 18 ++++++++++++++++
 debian/libassuan-mingw-w64-dev.install           |  6 ++++++
 debian/libassuan-mingw-w64-dev.lintian-overrides | 13 ++++++++++++
 debian/rules                                     | 27 ++++++++++++++++++++++++
 5 files changed, 66 insertions(+)

diff --git a/debian/clean b/debian/clean
index 567609b..9f273fc 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1 +1,3 @@
 build/
+build-x86_64-w64-mingw32/
+build-i686-w64-mingw32/
diff --git a/debian/control b/debian/control
index 0f68e24..1c1bd00 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Uploaders: Eric Dorland <eric at debian.org>,
 Build-Depends: debhelper (>= 9.20151219),
                dh-autoreconf,
                libgpg-error-dev (>= 1.17)
+Build-Depends-Indep: libgpg-error-mingw-w64-dev, mingw-w64
 Standards-Version: 3.9.6.1
 Vcs-Git: https://anonscm.debian.org/git/pkg-gnupg/libassuan.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-gnupg/libassuan.git
@@ -34,3 +35,20 @@ Description: IPC library for the GnuPG components -- header files
  components. Both server and client side functions are provided.
  .
  This package contains header files and static libraries for libassuan.
+
+Package: libassuan-mingw-w64-dev
+Architecture: all
+Priority: extra
+Section: libdevel
+Depends: ${misc:Depends}
+Suggests: wine
+Description: IPC library for the GnuPG components -- Windows port
+ Libassuan is a small library implementing the so-called "Assuan
+ protocol". This protocol is used for IPC between most newer GnuPG
+ components. Both server and client side functions are provided.
+ .
+ This package contains header files and static libraries for libassuan.
+ .
+ This is a Windows version of libassuan.  It's meant to be used when
+ cross-building software that targets the Windows platform, e.g. the
+ win32-loader component of Debian-Installer.
diff --git a/debian/libassuan-mingw-w64-dev.install b/debian/libassuan-mingw-w64-dev.install
new file mode 100644
index 0000000..ab6e93e
--- /dev/null
+++ b/debian/libassuan-mingw-w64-dev.install
@@ -0,0 +1,6 @@
+usr/i686-w64-mingw32/bin/*
+usr/i686-w64-mingw32/lib/*
+usr/i686-w64-mingw32/include/*
+usr/x86_64-w64-mingw32/bin/*
+usr/x86_64-w64-mingw32/lib/*
+usr/x86_64-w64-mingw32/include/*
diff --git a/debian/libassuan-mingw-w64-dev.lintian-overrides b/debian/libassuan-mingw-w64-dev.lintian-overrides
new file mode 100644
index 0000000..8ce8807
--- /dev/null
+++ b/debian/libassuan-mingw-w64-dev.lintian-overrides
@@ -0,0 +1,13 @@
+# libassuan-mingw-w64-dev is "arch-independent" from debian's perspective,
+# since it ships binaries that are only used during cross-building
+# windows software.
+libassuan-mingw-w64-dev: arch-independent-package-contains-binary-or-object
+
+# The location of these cross-building tools is the result of
+# discussion with mingw maintainers:
+# https://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/2016-February/003281.html
+libassuan-mingw-w64-dev: file-in-unusual-dir
+libassuan-mingw-w64-dev: non-standard-dir-in-usr
+
+# DLLs exported via Samba need to be executable (see #796224)
+libassuan-mingw-w64-dev: executable-not-elf-or-script
diff --git a/debian/rules b/debian/rules
index 0ae87de..e02a89e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,3 +14,30 @@ override_dh_auto_install-arch:
 
 override_dh_strip:
 	dh_strip --ddeb-migration='libassuan0-dbg (<< 2.4.2-2~)'
+
+### "arch-independent" Win32 builds: ###
+
+WIN_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os" CPPFLAGS=
+
+WIN_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os" CPPFLAGS=
+
+override_dh_auto_build-indep:
+	for cpu in i686 x86_64; do \
+	 mkdir -p build-$$cpu-w64-mingw32 && \
+	 cd build-$$cpu-w64-mingw32 && $(WIN_FLAGS) ../configure \
+	    --with-libgpg-error-prefix=/usr/$$cpu-w64-mingw32 \
+	    --prefix=/usr/$$cpu-w64-mingw32 \
+	    --enable-static \
+	    --host $$cpu-w64-mingw32 && \
+	  $(WIN_FLAGS) $(MAKE) \
+	  || exit 1 ; \
+	  cd .. ; \
+	done
+
+override_dh_auto_install-indep:
+	for cpu in i686 x86_64; do \
+	  cd build-$$cpu-w64-mingw32 && \
+	  $(MAKE) install DESTDIR=$(shell pwd)/debian/tmp \
+	  || exit 1 ; \
+	  cd .. ; \
+	done

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



More information about the Pkg-gnupg-commit mailing list