fixup deploy script

This commit is contained in:
tali 2024-02-02 13:33:47 -05:00
parent 54291669a5
commit 8556fafd3d
2 changed files with 18 additions and 10 deletions

View File

@ -8,25 +8,35 @@ root=dist/root
rm -rf $root
mkdir -p $root/DEBIAN $root/etc $root/usr/lib/systemd/system
# build ocaml program
opam pin add ./talircd --kind=path --no-action --yes
opam install talircd --destdir=$root/usr --yes
# install helper files
install -m 644 talircd/deploy/talircd.service $root/usr/lib/systemd/system
install -m 644 talircd/deploy/talircd.conf $root/etc
# generate package control file
pkg=$(opam info talircd -fname)
ver="$(opam info talircd -fversion)"
rev=0
dsc="$(opam info talircd -fdescription)"
mtr="iitalics"
arch="$(dpkg-architecture -q DEB_TARGET_ARCH)"
control=$root/DEBIAN/control
set -x
echo "Package: ${pkg}" > $control
echo "Version: ${ver}" >> $control
echo "Description: ${dsc}" >> $control
echo "Maintainer: ${mtr}" >> $control
echo "Architecture: all" >> $control
echo "Package: ${pkg}" > $control
echo "Version: ${ver}" >> $control
echo "Description: ${dsc}" >> $control
echo "Maintainer: ${mtr}" >> $control
echo "Architecture: ${arch}" >> $control
install -m 644 talircd/deploy/talircd.service $root/usr/lib/systemd/system
install -m 644 talircd/deploy/talircd.conf $root/etc
# generate .deb
dpkg-deb --root-owner-group -b $root "dist/${pkg}_${ver}-${rev}_all.deb"
dpkg-deb --root-owner-group -b $root "dist/${pkg}_${ver}-${rev}_${arch}.deb"

View File

@ -56,5 +56,3 @@ case ${1:-build} in
*)
echo "invalid command $1"
esac
# mkdir -p "${DIST_DIR}"