summaryrefslogblamecommitdiff
path: root/packaging/package_debian.sh
blob: 59f5774e54b61b178f6cfde75ee1d920aaf964e3 (plain) (tree)
1
2
3
4
5
6
7
8
9

           
               
 

                                    


                          
                



               
                               








                                                 
                                   

                                      


                           



                                                     
#!/bin/bash
set -x
set -o pipefail

FEATURES="--features guile,readline"

tmpdir=$(mktemp -d)

dir="${tmpdir}/skaldpress"
origdir="$(pwd)"

mkdir -p ${dir}
rm -r ${dir}
mkdir -p ${dir}
cargo build $FEATURES --release

bindir=${dir}/usr/local/bin
mkdir -p ${bindir}

mandir=${dir}/usr/share/man/man1
mkdir -p ${mandir}

cp -r packaging/DEBIAN ${dir}/DEBIAN
cp target/release/skaldpress ${bindir}/skaldpress
cp target/release/smp ${bindir}/smp
cp skaldpress.1 ${mandir}/skaldpress.1
cp smp.1 ${mandir}/smp.1

cd ${tmpdir}
dpkg-deb --build skaldpress

cd "${origdir}"
cp "${tmpdir}/skaldpress.deb" "$(pwd)/skaldpress.deb"
rm -r "${tmpdir}"