#!/bin/sh # Build a debian package for amd64 version="1.7.0" echo "Building amath ${version} for Debian ..." rm -Rf amath # Build sh configure 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-amd64 amath/DEBIAN/control dpkg-deb --build amath mv amath.deb amath-${version}_amd64.deb # Build a debian package for i386 rm -Rf amath # Build sh configure cflags="-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-${version}_i386.deb # Cleanup #rm -Rf amath