minor fixes

This commit is contained in:
Hannes Mehnert 2022-07-27 10:15:22 +02:00
parent 34ce8df43d
commit 21cf8a3dcd
4 changed files with 12 additions and 10 deletions

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# opam-graph
Visualizes dependencies of "opam switch export" as dot or svg.

View file

@ -1,7 +1,7 @@
#!/bin/sh -e #!/bin/sh -e
# only execute anything if either # only execute anything if either
# - running under orb with package = builder-web # - running under orb with package = opam-graph
# - not running under opam at all # - not running under opam at all
if [ "$ORB_BUILDING_PACKAGE" != "opam-graph" -a "$OPAM_PACKAGE_NAME" != "" ]; then if [ "$ORB_BUILDING_PACKAGE" != "opam-graph" -a "$OPAM_PACKAGE_NAME" != "" ]; then
exit 0; exit 0;
@ -37,6 +37,6 @@ sed -e "s:%%FLATSIZE%%:${flatsize}:" -e "/^[Vversion:/s/-/./g" "$pdir/MANIFEST"
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=format:%ct) export SOURCE_DATE_EPOCH=$(git log -1 --pretty=format:%ct)
pkg create -r "$rootdir" -M "$manifest" -o "$basedir/" pkg create -r "$rootdir" -M "$manifest" -o "$basedir/"
mv "$basedir"/builder-web-*.pkg "$basedir/builder-web.pkg" mv "$basedir"/opam-graph-*.pkg "$basedir/opam-graph.pkg"
echo 'bin: [ "builder-web.pkg" ]' > "$basedir/builder-web.install" echo 'bin: [ "opam-graph.pkg" ]' > "$basedir/opam-graph.install"
echo 'doc: [ "README.md" ]' >> "$basedir/builder-web.install" echo 'doc: [ "README.md" ]' >> "$basedir/opam-graph.install"

View file

@ -4,5 +4,5 @@ Upstream-Contact: Robur Team <team@robur.coop>
Source: https://git.robur.io/robur/opam-graph Source: https://git.robur.io/robur/opam-graph
Files: * Files: *
Copyright: "Hannes Mehnert <hannes@mehnert.org>" Copyright: "Robur Team <team@robur.coop>"
License: ISC License: ISC

View file

@ -1,7 +1,7 @@
#!/bin/sh -e #!/bin/sh -e
# only execute anything if either # only execute anything if either
# - running under orb with package = builder-web # - running under orb with package = opam-graph
# - not running under opam at all # - not running under opam at all
if [ "$ORB_BUILDING_PACKAGE" != "opam-graph" -a "$OPAM_PACKAGE_NAME" != "" ]; then if [ "$ORB_BUILDING_PACKAGE" != "opam-graph" -a "$OPAM_PACKAGE_NAME" != "" ]; then
exit 0; exit 0;
@ -13,16 +13,15 @@ tmpd=$basedir/_build/stage
rootdir=$tmpd/rootdir rootdir=$tmpd/rootdir
bindir=$rootdir/usr/bin bindir=$rootdir/usr/bin
debiandir=$rootdir/DEBIAN debiandir=$rootdir/DEBIAN
libexecdir=$rootdir/usr/libexec
trap 'rm -rf $tmpd' 0 INT EXIT trap 'rm -rf $tmpd' 0 INT EXIT
mkdir -p "$debiandir" "$bindir" "$libexecdir" mkdir -p "$debiandir" "$bindir"
install "$bdir/opam-graph" "$bindir/opam-graph" install "$bdir/opam-graph" "$bindir/opam-graph"
ARCH=$(dpkg-architecture -q DEB_TARGET_ARCH) ARCH=$(dpkg-architecture -q DEB_TARGET_ARCH)
sed -i -e "s/^Architecture:.*/Architecture: ${ARCH}/" "$debiandir"/control sed -i -e "s/^Architecture:.*/Architecture: ${ARCH}/" "$debiandir"/control
dpkg-deb --build "$rootdir" "$basedir"/builder-web.deb dpkg-deb --build "$rootdir" "$basedir"/opam-graph.deb
echo 'bin: [ "builder-web.deb" ]' > "$basedir/builder-web.install" echo 'bin: [ "opam-graph.deb" ]' > "$basedir/opam-graph.install"