| git.druid.rocks | index | druid520 | ports | ports/ | networking/ | sdhcp/ | add.sh |
ports/networking/sdhcp/add.sh
set -e
# git.2f30.org only speaks dumb http (no shallow-clone support, "fatal:
# dumb http transport does not support shallow capabilities" confirmed
# for real against --depth 1) -- a plain full clone instead, same as
# any other dumb-http source this tree fetches.
git clone https://git.2f30.org/sdhcp
cd sdhcp
# NOT "make install" -- its own "binlib: util.a; $(MAKE) bin" recipe
# is a real, nested recursive $(MAKE) call, same class of thing tcc's
# own install-unx recipe already hit under bmake tonight. that one
# failed outright (a rejected gnu-only flag); this one is worse in a
# different way -- confirmed for real, genuinely FLAKY under bmake:
# "make install" (with or without an explicit -j) intermittently fails
# ("sdhcp.1: open: No such file or directory" partway through the man-
# page install step) maybe one run in three, succeeding cleanly the
# rest of the time -- a real race somewhere around that nested $(MAKE)
# invocation, not a deterministic, always-reproducible bug. rather than
# ship something that only sometimes works, this replicates the whole
# (tiny: two library objects, one binary, one man page) build+install
# directly, matching this recipe's own real actions one for one
# (checked directly against its own Makefile) instead of depending on
# any $(MAKE) call, nested or not, at all.
${CC:-cc} -c -o util/strlcpy.o util/strlcpy.c -D_DEFAULT_SOURCE
${CC:-cc} -c -o util/eprintf.o util/eprintf.c -D_DEFAULT_SOURCE
${AR:-ar} -r -c util.a util/strlcpy.o util/eprintf.o
${RANLIB:-ranlib} util.a
${CC:-cc} -c -o sdhcp.o sdhcp.c -D_DEFAULT_SOURCE
${CC:-cc} -o sdhcp sdhcp.o util.a -s
mkdir -p $MP_PREFIX/sbin $MP_PREFIX/share/man/man1
install -m755 sdhcp $MP_PREFIX/sbin/sdhcp
sed 's/VERSION/0.1/g' sdhcp.1 > $MP_PREFIX/share/man/man1/sdhcp.1
chmod 644 $MP_PREFIX/share/man/man1/sdhcp.1