fixup deploy script
This commit is contained in:
parent
54291669a5
commit
8556fafd3d
|
@ -8,25 +8,35 @@ root=dist/root
|
||||||
rm -rf $root
|
rm -rf $root
|
||||||
mkdir -p $root/DEBIAN $root/etc $root/usr/lib/systemd/system
|
mkdir -p $root/DEBIAN $root/etc $root/usr/lib/systemd/system
|
||||||
|
|
||||||
|
# build ocaml program
|
||||||
|
|
||||||
opam pin add ./talircd --kind=path --no-action --yes
|
opam pin add ./talircd --kind=path --no-action --yes
|
||||||
opam install talircd --destdir=$root/usr --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)
|
pkg=$(opam info talircd -fname)
|
||||||
ver="$(opam info talircd -fversion)"
|
ver="$(opam info talircd -fversion)"
|
||||||
rev=0
|
rev=0
|
||||||
dsc="$(opam info talircd -fdescription)"
|
dsc="$(opam info talircd -fdescription)"
|
||||||
mtr="iitalics"
|
mtr="iitalics"
|
||||||
|
arch="$(dpkg-architecture -q DEB_TARGET_ARCH)"
|
||||||
|
|
||||||
control=$root/DEBIAN/control
|
control=$root/DEBIAN/control
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
echo "Package: ${pkg}" > $control
|
echo "Package: ${pkg}" > $control
|
||||||
echo "Version: ${ver}" >> $control
|
echo "Version: ${ver}" >> $control
|
||||||
echo "Description: ${dsc}" >> $control
|
echo "Description: ${dsc}" >> $control
|
||||||
echo "Maintainer: ${mtr}" >> $control
|
echo "Maintainer: ${mtr}" >> $control
|
||||||
echo "Architecture: all" >> $control
|
echo "Architecture: ${arch}" >> $control
|
||||||
|
|
||||||
install -m 644 talircd/deploy/talircd.service $root/usr/lib/systemd/system
|
# generate .deb
|
||||||
install -m 644 talircd/deploy/talircd.conf $root/etc
|
|
||||||
|
|
||||||
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"
|
||||||
|
|
|
@ -56,5 +56,3 @@ case ${1:-build} in
|
||||||
*)
|
*)
|
||||||
echo "invalid command $1"
|
echo "invalid command $1"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# mkdir -p "${DIST_DIR}"
|
|
||||||
|
|
Loading…
Reference in New Issue