Debian multiarch support

This commit is contained in:
Carsten Larsen 2017-01-29 14:09:58 +01:00
parent 1551700ec1
commit 57e74e12b0
3 changed files with 55 additions and 4 deletions

17
build/debian/control-am64 Normal file
View File

@ -0,0 +1,17 @@
Package: amath
Version: 1.6.2
Architecture: amd64
Maintainer: Carsten Larsen <cs@innolan.dk>
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.

View File

@ -2,7 +2,7 @@ Package: amath
Version: 1.6.2
Architecture: i386
Maintainer: Carsten Larsen <cs@innolan.dk>
Installed-Size: 265640
Installed-Size: 140
Depends: libc6
Section: math
Essential: no

View File

@ -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