On Fri, Mar 31, 2017 at 03:23:33PM +0200, Jeremie Courreges-Anglas wrote:

[...]

> > I didn't noticed an error during stop/restart but I agree it's cleaner
> > to just create the pid file in /var/run/kiwiirc.
> 
> You can't use the PLIST to create the pid file directory, /var/run is
> pruned at boot time.  Let's do it in rc_pre().  I'm not completely happy
> with the "automatic" handling of pid_dir, it is trying to be a bit too
> smart...  On the other hand, if someone wants to run multiple instances,
> better find a way to specify alternate pid files.
> 
> > README fixed, also for
> > the installation path location.
> 
> I trimmed down the README, IMO no need to describe where the pid file is
> stored, no need to say "please".
> 
> > So there is the node/npm thing left now I guess ...
> 
> Good luck with that one. :)

Honestly I have no good idea currently how to make a nice solution for
this ...

> Please find an updated tarball below, with the following changes:
> - no need to patch to pass the path to the pidfile, we can use
>   daemon_flags.  We can also use daemon_flags for the path to the config
>   file (no need for a symlink any more).
> - support rc_reload(), kiwiirc uses SIGUSR1 instead of SIGHUP
> - drop DISTNAME/WRKSRC, the defaults are fine.  I kept "kiwiirc" for
>   PKGNAME, but using "KiwiIRC" would be reasonable too IMHO.
>   No need for MASTER_SITES either, the GH_* variables are enough.
> - no need to rename the config file, no need for a symlink

'kiwi build' requires 'config.js' to exist in its basedir, otherwise
the build will fail.

> - merge do-install and post-install, and reorder: first the main copy
>   step, then tweaks for the manpage and config file.  We don't modify
>   WRKSRC any more.
> - tweak DESCR: less verbose mention of the standalone property, speak
>   more about features

The '-p' daemon flag isn't required since kiwiirc will check for
/etc/kiwiirc/config.js by default.

Also we don't need the *.js files anymore in /usr/local/lib/kiwiirc.

Changes made, and updated package attached:

diff -upNr kiwiirc.jca/Makefile kiwiirc/Makefile
--- kiwiirc.jca/Makefile        Fri Mar 31 14:22:34 2017
+++ kiwiirc/Makefile    Thu Mar 30 10:11:00 2017
@@ -23,12 +23,13 @@ PKG_ARCH =          *
 
 do-build:
        cd ${WRKSRC} && ${LOCALBASE}/bin/npm install
+       cd ${WRKSRC} && cp config.example.js config.js
        cd ${WRKSRC} && ./kiwi build
 
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/kiwiirc
        cd ${WRKSRC} && pax -rw -s '%.*/\.git.*%%p' . ${PREFIX}/lib/kiwiirc/
-       cd ${PREFIX}/lib/kiwiirc/ && rm -Rf *.md *.txt *.bat *.orig man/
+       cd ${PREFIX}/lib/kiwiirc/ && rm -Rf *.md *.txt *.bat *.orig *.js man/
        ${INSTALL_MAN} ${WRKSRC}/man/kiwiirc.1 ${PREFIX}/man/man1
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/kiwiirc
        ${INSTALL_DATA} ${WRKSRC}/config.example.js \
diff -upNr kiwiirc.jca/pkg/PLIST kiwiirc/pkg/PLIST
--- kiwiirc.jca/pkg/PLIST       Fri Mar 31 14:42:20 2017
+++ kiwiirc/pkg/PLIST   Thu Mar 30 10:16:41 2017
@@ -230,7 +230,6 @@ lib/kiwiirc/client/src/views/statusmessage.js
 lib/kiwiirc/client/src/views/tabs.js
 lib/kiwiirc/client/src/views/topicbar.js
 lib/kiwiirc/client/src/views/userbox.js
-lib/kiwiirc/config.example.js
 lib/kiwiirc/kiwi
 lib/kiwiirc/node_modules/
 lib/kiwiirc/node_modules/.bin/
diff -upNr kiwiirc.jca/pkg/kiwiirc.rc kiwiirc/pkg/kiwiirc.rc
--- kiwiirc.jca/pkg/kiwiirc.rc  Fri Mar 31 15:19:11 2017
+++ kiwiirc/pkg/kiwiirc.rc      Thu Mar 30 10:19:21 2017
@@ -4,7 +4,7 @@
 
 daemon="${TRUEPREFIX}/lib/kiwiirc/kiwi start"
 daemon_user="_kiwiirc"
-daemon_flags="-p /var/run/kiwiirc/kiwiirc.pid -c 
${SYSCONFDIR}/kiwiirc/config.js"
+daemon_flags="-p /var/run/kiwiirc/kiwiirc.pid"
 
 . /etc/rc.d/rc.subr

Attachment: kiwiirc.tgz
Description: application/tar-gz

Reply via email to