From 57e74e12b0c2d02c96b445e0c6a2cc14e1d3b1f7 Mon Sep 17 00:00:00 2001 From: Carsten Larsen Date: Sun, 29 Jan 2017 14:09:58 +0100 Subject: [PATCH] Debian multiarch support --- build/debian/control-am64 | 17 +++++++++++ build/debian/{control => control-i386} | 2 +- builddeb.sh | 40 ++++++++++++++++++++++++-- 3 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 build/debian/control-am64 rename build/debian/{control => control-i386} (96%) diff --git a/build/debian/control-am64 b/build/debian/control-am64 new file mode 100644 index 00000000..7ba32a3d --- /dev/null +++ b/build/debian/control-am64 @@ -0,0 +1,17 @@ +Package: amath +Version: 1.6.2 +Architecture: amd64 +Maintainer: Carsten Larsen +Installed-Size: 276 +Depends: libc6 +Section: math +Essential: no +Priority: optional +Homepage: http://amath.innolan.net +Built-Using: gcc-5.4 +Description: Simple command line calculator + Features a case sensitive command line interface, internal IEEE 754 + calculations with 15 significant digits, calculations with real and + complex numbers, variables and user defined functions, logarithmic + and exponential functions, trigonometric and hyperbolic function + and selected mathematical constants and rounding functions. diff --git a/build/debian/control b/build/debian/control-i386 similarity index 96% rename from build/debian/control rename to build/debian/control-i386 index a1b4108c..f6749ff3 100644 --- a/build/debian/control +++ b/build/debian/control-i386 @@ -2,7 +2,7 @@ Package: amath Version: 1.6.2 Architecture: i386 Maintainer: Carsten Larsen -Installed-Size: 265640 +Installed-Size: 140 Depends: libc6 Section: math Essential: no diff --git a/builddeb.sh b/builddeb.sh index 4cbe05f8..5bef45e8 100755 --- a/builddeb.sh +++ b/builddeb.sh @@ -1,6 +1,6 @@ #! /bin/sh -# Build a debian package for i386 +# Build a debian package for amd64 rm -Rf amath @@ -30,9 +30,43 @@ cp build/debian/README amath/usr/share/doc/amath/ cp script/* amath/usr/local/share/amath/ # Make the package -cp build/debian/control amath/DEBIAN/ +cp build/debian/control-amd64 amath/DEBIAN/control +dpkg-deb --build amath +mv amath.deb amath-1.6.2_amd64.deb + +# Build a debian package for i386 + +rm -Rf amath + +# Build +sh configure -m32 +make clean +make +mv amath amath.tmp +make clean + +# Create filesystem layout +rm -Rf amath + +mkdir -p amath/DEBIAN +mkdir -p amath/usr/bin +mkdir -p amath/usr/share/doc/amath +mkdir -p amath/usr/local/share/amath + +mv amath.tmp amath/usr/bin/amath + +# Copy documentation +cp LICENSE amath/usr/share/doc/amath/ +cp HISTORY amath/usr/share/doc/amath/ +cp build/debian/README amath/usr/share/doc/amath/ + +# Copy scripts +cp script/* amath/usr/local/share/amath/ + +# Make the package +cp build/debian/control-i386 amath/DEBIAN/control dpkg-deb --build amath mv amath.deb amath-1.6.2_i386.deb # Cleanup -rm -Rf amath +#rm -Rf amath