Package visualization & repo scripts (#123)
The repo scripts are installed in 'share' as examples. Reviewed-on: https://git.robur.io/robur/builder-web/pulls/123 Co-authored-by: Reynir Björnsson <reynir@reynir.dk> Co-committed-by: Reynir Björnsson <reynir@reynir.dk>
This commit is contained in:
parent
932b0c963e
commit
949dbab501
2 changed files with 24 additions and 2 deletions
|
@ -18,10 +18,12 @@ rootdir=$tmpd/rootdir
|
|||
sbindir=$rootdir/usr/local/sbin
|
||||
rcdir=$rootdir/usr/local/etc/rc.d
|
||||
libexecdir=$rootdir/usr/local/libexec
|
||||
sharedir=$rootdir/usr/local/share/builder-web
|
||||
confdir=$rootdir/usr/local/etc/builder-web
|
||||
|
||||
trap 'rm -rf $tmpd' 0 INT EXIT
|
||||
|
||||
mkdir -p "$sbindir" "$libexecdir" "$rcdir"
|
||||
mkdir -p "$sbindir" "$libexecdir" "$rcdir" "$sharedir" "$confdir/upload-hooks"
|
||||
|
||||
# stage service scripts
|
||||
install -U "$pdir/rc.d/builder_web" "$rcdir/builder_web"
|
||||
|
@ -32,6 +34,14 @@ install -U "$bdir/builder-web" "$libexecdir/builder-web"
|
|||
install -U "$bdir/builder-migrations" "$sbindir/builder-migrations"
|
||||
install -U "$bdir/builder-db" "$sbindir/builder-db"
|
||||
|
||||
# stage visualization scripts
|
||||
install -U "$bdir/packaging/batch-viz.sh" "$confdir/batch-viz.sh"
|
||||
install -U "$bdir/packaging/visualizations.sh" "$confdir/upload-hooks/visualizations.sh"
|
||||
|
||||
# example repo scripts
|
||||
install -U "$bdir/packaging/dpkg-repo.sh" "$sharedir/dpkg-repo.sh"
|
||||
install -U "$bdir/packaging/FreeBSD-repo.sh" "$sharedir/FreeBSD-repo.sh"
|
||||
|
||||
# create +MANIFEST
|
||||
flatsize=$(find "$rootdir" -type f -exec stat -f %z {} + |
|
||||
awk 'BEGIN {s=0} {s+=$1} END {print s}')
|
||||
|
|
|
@ -15,10 +15,13 @@ sbindir=$rootdir/usr/sbin
|
|||
systemddir=$rootdir/usr/lib/systemd/system
|
||||
debiandir=$rootdir/DEBIAN
|
||||
libexecdir=$rootdir/usr/libexec
|
||||
sharedir=$rootdir/usr/share/builder-web
|
||||
confdir=$rootdir/etc/builder-web
|
||||
|
||||
trap 'rm -rf $tmpd' 0 INT EXIT
|
||||
|
||||
mkdir -p "$sbindir" "$debiandir" "$systemddir" "$libexecdir"
|
||||
mkdir -p "$sbindir" "$debiandir" "$systemddir" "$libexecdir" "$sharedir" \
|
||||
"$confdir" "$confdir/upload-hooks"
|
||||
|
||||
# stage app binaries
|
||||
install "$bdir/builder-web" "$libexecdir/builder-web"
|
||||
|
@ -28,10 +31,19 @@ install "$bdir/builder-db" "$sbindir/builder-db"
|
|||
# service script
|
||||
install -m 0644 "$basedir/packaging/debian/builder-web.service" "$systemddir/builder-web.service"
|
||||
|
||||
# visualizations scripts
|
||||
install "$basedir/packaging/batch-viz.sh" "$confdir/batch-viz.sh"
|
||||
install "$basedir/packaging/visualizations.sh" "$confdir/upload-hooks/visualizations.sh"
|
||||
|
||||
# example repo scripts
|
||||
install "$basedir/packaging/dpkg-repo.sh" "$sharedir/dpkg-repo.sh"
|
||||
install "$basedir/packaging/FreeBSD-repo.sh" "$sharedir/FreeBSD-repo.sh"
|
||||
|
||||
# install debian metadata
|
||||
install -m 0644 "$basedir/packaging/debian/control" "$debiandir/control"
|
||||
install -m 0644 "$basedir/packaging/debian/changelog" "$debiandir/changelog"
|
||||
install -m 0644 "$basedir/packaging/debian/copyright" "$debiandir/copyright"
|
||||
install -m 0644 "$basedir/packaging/debian/conffiles" "$debiandir/conffiles"
|
||||
install "$basedir/packaging/debian/postinst" "$debiandir/postinst"
|
||||
|
||||
ARCH=$(dpkg-architecture -q DEB_TARGET_ARCH)
|
||||
|
|
Loading…
Reference in a new issue