Joerg Jung <m...@umaxx.net> writes:

> Hi,
>
> please find attached a port for net/geomyidae.
>
> $ cat pkg/DESCR                                                       
> Geomyidae is a daemon for serving the Gopher protocol.
> It is based on gopherd for Plan 9.
>
> Comments? OKs?

The Makefile could be more useful: show the actual commands used, and
make the build respect CFLAGS.  I also think that you'd better install
the program and manpage in post-install instead of patching the
Makefile.

The rc.d script should be tweaked, pexp should be just "${daemon}.*"
since geomyidae mangles the arguments (thus what's stored in
/var/run/rc.d/geomyidae is no longer usable).

Regarding the program: it supports either IPv6 or IPv4, not both (since
on OpenBSD net.inet6.ip6.v6only == 1 and you can't change that), and by
default binds to IPv6.  The manpage says it binds to 127.0.0.1 by
default but this is not true.  I think it makes more sense to bind to
IPv4, 0.0.0.0 by default.

Diff against your tarball, and updated tarball attached.

diff -pruN geomyidae.orig/Makefile geomyidae/Makefile
--- geomyidae.orig/Makefile     Sat Jun 20 23:12:52 2015
+++ geomyidae/Makefile  Mon Jun 22 13:32:29 2015
@@ -24,6 +24,8 @@ FAKE_FLAGS =          DESTDIR=""
 NO_TEST =              Yes
 
 post-install:
+       ${INSTALL_PROGRAM} ${WRKBUILD}/geomyidae ${PREFIX}/bin
+       ${INSTALL_MAN} ${WRKBUILD}/geomyidae.8 ${PREFIX}/man/man8
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/geomyidae
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/geomyidae
        cd ${WRKSRC} && ${INSTALL_DATA} CGI README \
diff -pruN geomyidae.orig/patches/patch-Makefile 
geomyidae/patches/patch-Makefile
--- geomyidae.orig/patches/patch-Makefile       Sat Jun 20 22:31:45 2015
+++ geomyidae/patches/patch-Makefile    Mon Jun 22 13:31:34 2015
@@ -1,23 +1,29 @@
 $OpenBSD$
---- Makefile.orig      Sat Jun 20 22:26:44 2015
-+++ Makefile   Sat Jun 20 22:30:18 2015
-@@ -37,15 +37,10 @@ clean:
-       @rm -f ${NAME} ${OBJ} ${NAME}-${VERSIOn}.tar.gz 
+--- Makefile.orig      Sat Apr 13 21:28:27 2013
++++ Makefile   Mon Jun 22 13:31:30 2015
+@@ -7,7 +7,7 @@ PREFIX ?= /usr
+ BINDIR ?= $(PREFIX)/bin
+ MANDIR ?= $(PREFIX)/man/man8
  
- install:
--      @echo installing executable to ${DESTDIR}${PREFIX}/bin
--      @mkdir -p ${DESTDIR}${BINDIR}
--      @cp -f ${NAME} ${DESTDIR}${BINDIR}
--      @strip ${DESTDIR}${BINDIR}/${NAME}
--      @chmod 755 ${DESTDIR}${BINDIR}/${NAME}
--      @echo installing manpage to ${DESTDIR}${MANDIR}
--      @mkdir -p ${DESTDIR}${MANDIR}
--      @cp -f ${NAME}.8 ${DESTDIR}${MANDIR}
--      @chmod 644 ${DESTDIR}${MANDIR}/${NAME}.8
-+      ${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}${BINDIR}
-+      ${BSD_INSTALL_PROGRAM} ${NAME} ${DESTDIR}${BINDIR}
-+      ${BSD_INSTALL_MAN_DIR} ${DESTDIR}${MANDIR}
-+      ${BSD_INSTALL_MAN} ${NAME}.8 ${DESTDIR}${MANDIR}
+-CFLAGS += -O2 -Wall -I. -I/usr/include 
++CFLAGS += -Wall -I. -I/usr/include 
+ LDFLAGS += -L/usr/lib -L. -lc
+ : CC = cc
  
- uninstall:
-       @echo removing executable file from ${DESTDIR}${PREFIX}/bin
+@@ -23,14 +23,12 @@ options:
+       @echo "CC       = ${CC}"
+ 
+ .c.o:
+-      @echo CC $<
+-      @${CC} ${CFLAGS} -c $<
++      ${CC} ${CFLAGS} -c $<
+ 
+ ${OBJ}:
+ 
+ ${NAME}: ${OBJ}
+-      @echo CC -o $@
+-      @${CC} -o $@ ${OBJ} ${LDFLAGS}
++      ${CC} -o $@ ${OBJ} ${LDFLAGS}
+ 
+ clean:
+       @echo cleaning
diff -pruN geomyidae.orig/patches/patch-geomyidae_8 
geomyidae/patches/patch-geomyidae_8
--- geomyidae.orig/patches/patch-geomyidae_8    Thu Jan  1 01:00:00 1970
+++ geomyidae/patches/patch-geomyidae_8 Mon Jun 22 13:54:31 2015
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- geomyidae.8.orig   Mon Jun 22 13:53:42 2015
++++ geomyidae.8        Mon Jun 22 13:54:25 2015
+@@ -134,7 +134,7 @@ processing.
+ Host to use in directory listings (default: localhost)
+ .
+ .It Fl i Ar IP
+-IP to which geomyidae binds to (default: 127.0.0.1)
++IP to which geomyidae binds to (default: 0.0.0.0)
+ .El
+ .
+ .Sh FORMATTING
diff -pruN geomyidae.orig/pkg/geomyidae.rc geomyidae/pkg/geomyidae.rc
--- geomyidae.orig/pkg/geomyidae.rc     Sat Jun 20 23:53:22 2015
+++ geomyidae/pkg/geomyidae.rc  Mon Jun 22 14:01:16 2015
@@ -3,8 +3,10 @@
 # $OpenBSD: rc.template,v 1.6 2014/08/14 19:54:10 ajacoutot Exp $
 
 daemon="${TRUEPREFIX}/bin/geomyidae"
-daemon_flags="-l /var/log/geomyidae.log -u _geomyidae -g _geomyidae"
+daemon_flags="-4 -l /var/log/geomyidae.log -u _geomyidae -g _geomyidae"
 
 . /etc/rc.d/rc.subr
+
+pexp="${daemon}.*"
 
 rc_cmd $1

Attachment: geomyidae.tgz
Description: Binary data

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to