amath/builddeb.sh

73 lines
1.3 KiB
Bash
Raw Permalink Normal View History

2017-01-29 12:42:31 +00:00
#! /bin/sh
2017-01-29 13:09:58 +00:00
# Build a debian package for amd64
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-02 21:59:35 +00:00
mv amath.deb amath-1.6.3_amd64.deb
2017-01-29 13:09:58 +00:00
# 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
2017-01-29 12:42:31 +00:00
dpkg-deb --build amath
2017-02-02 21:59:35 +00:00
mv amath.deb amath-1.6.3_i386.deb
2017-01-29 12:42:31 +00:00
# Cleanup
2017-01-29 13:09:58 +00:00
#rm -Rf amath