2017-02-27 22:23:06 +00:00
|
|
|
#!/bin/sh
|
2017-01-29 12:42:31 +00:00
|
|
|
|
2017-01-29 13:09:58 +00:00
|
|
|
# Build a debian package for amd64
|
2017-01-29 12:42:31 +00:00
|
|
|
|
2017-02-27 22:23:06 +00:00
|
|
|
version="1.7.0"
|
|
|
|
|
|
|
|
echo "Building amath ${version} for Debian ..."
|
2017-01-29 12:42:31 +00:00
|
|
|
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
|
2017-01-29 13:09:58 +00:00
|
|
|
cp build/debian/control-amd64 amath/DEBIAN/control
|
|
|
|
dpkg-deb --build amath
|
2017-02-27 22:23:06 +00:00
|
|
|
mv amath.deb amath-${version}_amd64.deb
|
2017-01-29 13:09:58 +00:00
|
|
|
|
|
|
|
# Build a debian package for i386
|
|
|
|
|
|
|
|
rm -Rf amath
|
|
|
|
|
|
|
|
# Build
|
2017-02-27 22:23:06 +00:00
|
|
|
sh configure cflags="-m32"
|
2017-01-29 13:09:58 +00:00
|
|
|
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
|
2017-01-29 12:42:31 +00:00
|
|
|
dpkg-deb --build amath
|
2017-02-27 22:23:06 +00:00
|
|
|
mv amath.deb amath-${version}_i386.deb
|
2017-01-29 12:42:31 +00:00
|
|
|
|
|
|
|
# Cleanup
|
2017-01-29 13:09:58 +00:00
|
|
|
#rm -Rf amath
|