On Sat, Nov 27, 2021 at 06:29:57PM +0100, Omar Polo wrote:
> Klemens Nanni <[email protected]> writes:
>
> > On Fri, Nov 26, 2021 at 04:22:18PM +0100, Omar Polo wrote:
> >> please find attached a tarball for pounce:
> >>
> >> % pkg_info pounce
> >> Information for inst:pounce-3.0
> >>
> >> Comment:
> >> multi-client, TLS-only IRC bouncer
> >>
> >> Description:
> >> pounce is a multi-client, TLS-only IRC bouncer. It maintains a
> >> persistent connection to an IRC server, acting as a proxy and buffer
> >> for a number of clients. When a client connects, any messages
> >> received since it last disconnected will be relayed to it. Unlike
> >> some other bouncers, pounce uses a single buffer for all IRC messages,
> >> which acts as a queue from which each client reads messages
> >> independently.
> >>
> >> Maintainer: Omar Polo <[email protected]>
> >>
> >> WWW: https://git.causal.agency/pounce/about/
> >>
> >>
> >> It's from the same authors as net/catgirl and works in a similar way.
> >> I'm using it on a i386 box and works like a charm, it was way easier to
> >> wrap my head around it than with znc.
> >>
> >> OK/comments/feedbacks?
> >
> > OK kn
> >
> > You could build and install the extra/ tools via post-build and
> > post-install. Would be even nicer if upstream provided an extra target
> > or so building these, so you'd eventually have to just set
> > ALL_TARGET='all extra' or so in our port to ship them.
>
> Agreed, I don't think I'll use them but they seems useful. I cannot
> even test them because they don't accept self-signed certificates and
> I'm running the bouncer in my LAN.
>
> Here's an improved tarball. I'm calling the configure scripts for the
> extras in post-configure, otherwise too many variables are unset and the
> port become messier.
>
> still OK? :)
Hand-rolled build/install targets should probably be modeled after what
the real targets do, i.e.
$ make -p | grep -w -e FAKE_TARGET -e ALL_TARGET
ALL_TARGET = all
FAKE_TARGET = ${INSTALL_TARGET}
@cd ${WRKBUILD} && exec ${_PBUILD} ${SETENV} ${MAKE_ENV}
${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKE_FILE} ${ALL_TARGET}
@cd ${WRKBUILD} && umask 022 && exec ${_PBUILD} ${SETENV}
${MAKE_ENV} ${FAKE_SETUP} ${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f ${MAKE_FILE}
${FAKE_TARGET}
also see "build, all" in bsd.port.mk(5); so your targets should
probably go like this to be precise:
post-build:
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f
${MAKE_FILE} -C ${WRKBUILD}/extra/notify ${ALL_TARGET}
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f
${MAKE_FILE} -C ${WRKBUILD}/extra/palaver ${ALL_TARGET}
post-install:
${MAKE_ENV} ${FAKE_SETUP} ${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f
${MAKE_FILE} -C ${WRKBUILD}/extra/notify ${FAKE_TARGET}
${MAKE_ENV} ${FAKE_SETUP} ${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f
${MAKE_FILE} -C ${WRKBUILD}/extra/palaver ${FAKE_TARGET}
or use loops:
EXTRAS = notify palaver
post-configure:
.for prog in ${EXTRAS}
cd ${WRKSRC}/extra/${prog} && ${SETENV} ${CONFIGURE_ENV}
./${CONFIGURE_SCRIPT}
.endfor
post-build:
.for prog in ${EXTRAS}
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f
${MAKE_FILE} \
-C ${WRKBUILD}/extra/${prog} ${ALL_TARGET}
.endfor
post-install:
.for prog in ${EXTRAS}
${SETENV} ${MAKE_ENV} ${FAKE_SETUP} ${MAKE_PROGRAM}
${ALL_FAKE_FLAGS} \
-f ${MAKE_FILE} -C ${WRKBUILD}/extra/${prog} ${FAKE_TARGET}
.endfor
If upstream would provide targets for this in the global Makefile, this
would all be obsolete and fall under a single `make' for us porters, so
probably worth persuing.
OK kn either way. Your targets work, albeit being inconsistent with how
bsd.port.mk usually does it. Pick what you want or leave the extras
out, I have only tested pounce(1) itself.