On Sun, Apr 15, 2018 at 12:15:20AM -0700, Ayaka Koshibe wrote:
> On Sun, Apr 08, 2018 at 07:17:30PM +0200, Klemens Nanni wrote:
> > On Sat, Apr 07, 2018 at 05:50:54PM -0700, Ayaka Koshibe wrote:
> > > And I found the manpage for mn isn't generated properly during last-minute
> > > testing...
> > >
> > > Updated Makefile diff, plus cleanup to run MAKEDEV in /dev, rather than
> > > create
> > > and move a file, as suggested by phessler.
> > How about these on top of your diff:
>
> I wanted to keep my diffs as-is since they were purely bug fixes, and seemed
> better off separate from pure improvements.
That makes sense, I didn't want to stuff all that into your diff/commit.
> > Use CFLAGS in do-build, enabling DEBUG.
> >
> > Compact .for loops in targets to smaller brace expansion. IMO the
> > examples/ path is clear enough, so I also avoided renaming switchd.conf.
> >
> > Set SEPARATE_BUILD since you're already using WRKSRC and WRKBUILD
> > accordingly.
> >
> > Feedback?
>
> Personally I find it easier to read without the brace expansions, but
> otherwise the suggestions make sense to me, thanks.
Sure, updated diff below.
Note how README.md is now installed from WRKSRC from WRKBUILD: they
used to be the same so the fake target would work, but with
SEPARATE_BUILD this would fail.
> > Maybe also use the latest git commit instead of bumping revision?
>
> If I understand correctly, this would be interpreted as an upstream version
> change, hence not need the REVSISON bump?
Yes, GH_TAGNAME and DISTNAME would change instead of bumping REVISION.
But I looked closer and none of the new commits seem to affect us, so
that might just do next time.
pre-install now goes into post-install as well, as I could find a reason
to keep these apart.
Feedback? OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/mininet/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile 10 Apr 2018 07:55:10 -0000 1.7
+++ Makefile 15 Apr 2018 08:54:25 -0000
@@ -3,7 +3,7 @@
COMMENT = emulator for rapid prototyping of software defined networks
DISTNAME = mininet-0.0.20170813
-REVISION = 4
+REVISION = 5
GH_ACCOUNT = mininet
GH_PROJECT = mininet
GH_COMMIT = 87e26ef931ee6063332ceba77db472140f832d3a
@@ -18,33 +18,30 @@ MAINTAINER = Ayaka Koshibe <akoshibe@gma
PERMIT_PACKAGE_CDROM = Yes
WANTLIB = c
+
MODULES = lang/python
MODPY_SETUPTOOLS = Yes
BUILD_DEPENDS = devel/help2man
RUN_DEPENDS = net/socat \
net/iperf
+SEPARATE_BUILD = Yes
+
do-build:
- $(CC) ${WRKSRC}/mnexec.c -o ${WRKBUILD}/mnexec
+ ${CC} ${CFLAGS} ${WRKSRC}/mnexec.c -o ${WRKBUILD}/mnexec
help2man -N -n "create a Mininet network." --no-discard-stderr \
"PYTHONPATH=${WRKBUILD} ${MODPY_BIN} -B ${WRKBUILD}/bin/mn" \
-o ${WRKBUILD}/mn.1
help2man -N -n "execution utility for Mininet." -h "-h" -v "-v" \
--no-discard-stderr ${WRKBUILD}/mnexec -o ${WRKBUILD}/mnexec.1
-pre-install:
+post-install:
${INSTALL_PROGRAM} ${WRKBUILD}/mnexec ${PREFIX}/bin
-.for m in mnexec mn
- ${INSTALL_MAN} ${WRKBUILD}/$m.1 ${PREFIX}/man/man1
-.endfor
+ ${INSTALL_MAN} ${WRKBUILD}/*.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mininet
- ${INSTALL_DATA} ${WRKBUILD}/README.md ${PREFIX}/share/doc/mininet
-
-post-install:
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${PREFIX}/share/doc/mininet
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mininet
- ${INSTALL_DATA} ${WRKSRC}/util/switchd.conf \
- ${PREFIX}/share/examples/mininet/switchd.mininet.conf-sample
-.for f in examples/README.md examples/*.py
+.for f in examples/README.md examples/*.py util/switchd.conf
${INSTALL_DATA} ${WRKSRC}/$f ${PREFIX}/share/examples/mininet
.endfor
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/mininet/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST 7 Dec 2017 06:33:40 -0000 1.4
+++ pkg/PLIST 15 Apr 2018 08:54:25 -0000
@@ -94,7 +94,7 @@ share/examples/mininet/scratchnet.py
share/examples/mininet/scratchnetuser.py
share/examples/mininet/simpleperf.py
share/examples/mininet/sshd.py
-share/examples/mininet/switchd.mininet.conf-sample
+share/examples/mininet/switchd.conf
@sample ${SYSCONFDIR}/switchd.mininet.conf
share/examples/mininet/tree1024.py
share/examples/mininet/treeping64.py
===================================================================
Stats: --- 13 lines 440 chars
Stats: +++ 10 lines 321 chars
Stats: -3 lines
Stats: -119 chars