diff --git a/net/nakenchat/Makefile b/net/nakenchat/Makefile index 3f78aa5030ed..7c6807f94478 100644 --- a/net/nakenchat/Makefile +++ b/net/nakenchat/Makefile @@ -6,17 +6,57 @@ # PORTNAME= nakenchat -PORTVERSION= 2.00 +PORTVERSION= 2.12 CATEGORIES= net -MASTER_SITES= http://www.mikekohn.com/nakenchat/ +MASTER_SITES= http://downloads.mikekohn.net/nakenchat/ -MAINTAINER= mike@mikekohn.net +MAINTAINER= oleg.ginzburg@nevosoft.ru COMMENT= Small (under 50k) chat server with many features +HAS_CONFIGURE= yes +USE_RC_SUBR= nakenchat + +OPTIONS= KEEPALIVEOFF "Disable socket keepalive option" off \ + USERCHANLISTOFF "Disable userlist based on channel" off \ + DEBUG "Compile in debug code" off \ + HIDDENCAVES "Enable hidden caves feature" off \ + DOTQ "compile in .Q option" off \ + FUSERLIST "support to save current userlist to a file" off \ + ELITEFILTER "Enable the 3li73 filter" off + .include -.if ${OSVERSION} >= 502102 -IGNORE= Does not respect PTHREAD_{CFLAGS,LIBS} (or CFLAGS or CC, ...) +.if defined(WITH_KEEPALIVEOFF) +CONFIGURE_ARGS+= --disable-keepalive .endif +.if defined(WITH_USERCHANLISTOFF) +CONFIGURE_ARGS+= --disable-userchanlist +.endif + +.if defined(WITH_DEBUG) +CONFIGURE_ARGS+= --enable-debug +.endif + +.if defined(WITH_HIDDENCAVES) +CONFIGURE_ARGS+= --enable-hidden-caves +.endif + +.if defined(WITH_DOTQ) +CONFIGURE_ARGS+= --enable-dotQ +.endif + +.if defined(WITH_FUSERLIST) +CONFIGURE_ARGS+= --enable-whofile +.endif + +.if defined(WITH_ELITEFILTER) +CONFIGURE_ARGS+= --enable-elite +.endif + +post-install: + @if [ ! -f ${PREFIX}/etc/nakenchat.conf ]; then \ + ${CP} -p ${PREFIX}/etc/nakenchat.conf.sample ${PREFIX}/etc/nakenchat.conf ; \ + fi + .include diff --git a/net/nakenchat/distinfo b/net/nakenchat/distinfo index 34483f8a1050..30b02ae1a7f8 100644 --- a/net/nakenchat/distinfo +++ b/net/nakenchat/distinfo @@ -1,3 +1,3 @@ -MD5 (nakenchat-2.00.tar.gz) = 054a05c64686cd781b47cffe449db9fd -SHA256 (nakenchat-2.00.tar.gz) = f3403ef98d985c0f87861f8b886355ef64e38056174f1835b20b37f81fc8ada4 -SIZE (nakenchat-2.00.tar.gz) = 22693 +MD5 (nakenchat-2.12.tar.gz) = de31d1bf7ed4d1e48d6ab34556f26f0a +SHA256 (nakenchat-2.12.tar.gz) = 1597d7759b3849f9b53ada323fa72f7cfc238d4e0c741dccafab3fae66bd900b +SIZE (nakenchat-2.12.tar.gz) = 41839 diff --git a/net/nakenchat/files/nakenchat.in b/net/nakenchat/files/nakenchat.in new file mode 100644 index 000000000000..05d5562ce3c1 --- /dev/null +++ b/net/nakenchat/files/nakenchat.in @@ -0,0 +1,26 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: nakenchat +# REQUIRE: DAEMON +# +# Add the following lines to /etc/rc.conf to enable nakenchat: +# +# nakenchat_enable (bool): Set it to "YES" to enable nakenchat. +# Default is "NO". +# + +. /etc/rc.subr + +name="nakenchat" +rcvar=${name}_enable + +load_rc_config $name + +: ${nakenchat_enable="NO"} + +command=/usr/local/bin/nakenchat +command_args="&" + +run_rc_command "$1" diff --git a/net/nakenchat/files/patch-Makefile b/net/nakenchat/files/patch-Makefile index 55c122221cff..e6e689795cd1 100644 --- a/net/nakenchat/files/patch-Makefile +++ b/net/nakenchat/files/patch-Makefile @@ -1,11 +1,16 @@ ---- Makefile.orig Tue Oct 7 22:01:27 2003 -+++ Makefile Tue Oct 7 22:01:41 2003 -@@ -1,6 +1,6 @@ +--- ./Makefile.orig 2007-06-27 22:06:34.000000000 -0400 ++++ ./Makefile 2008-11-23 14:24:11.028905510 -0500 +@@ -30,12 +30,7 @@ + @if [ ! -d $(PREFIX)/etc ]; then mkdir $(PREFIX)/etc; fi; + cp nakenchat $(PREFIX)/bin + cp nakenpasswd $(PREFIX)/bin +- @echo "cp nakenchat.conf $(PREFIX)/etc" +- @if [ -f $(PREFIX)/etc/nakenchat.conf ]; then \ +- echo "$(PREFIX)/etc/nakenchat.conf exists."; \ +- else \ +- cp nakenchat.conf $(PREFIX)/etc; \ +- fi ++ cp nakenchat.conf $(PREFIX)/etc/nakenchat.conf.sample; --CC=gcc --BASEDIR=/usr/local -+CC?=gcc -+BASEDIR=${PREFIX} - - all: - cd src && make + clean: + cd src && make clean diff --git a/net/nakenchat/files/patch-configure b/net/nakenchat/files/patch-configure new file mode 100644 index 000000000000..848a7f42eed6 --- /dev/null +++ b/net/nakenchat/files/patch-configure @@ -0,0 +1,40 @@ +--- ./configure.orig 2007-06-27 22:06:34.000000000 -0400 ++++ ./configure 2008-11-23 14:23:54.364898213 -0500 +@@ -2,11 +2,11 @@ + + # Based on FFMPEG's configure (http://ffmpeg.sourceforge.net/) + +-PREFIX=/usr/local +-CC=gcc ++PREFIX=${PREFIX:=/usr/local} ++CC=${CC:=gcc} + COMPILER_PREFIX= + FLAGS="" +-CFLAGS="-Wall" ++CFLAGS="${CFLAGS}" + LDFLAGS="" + LANGUAGE="english" + CONFIG_USER_CHAN_LIST="-DUSER_LIST_CHAN" +@@ -134,7 +134,7 @@ + case "$option" in + --help) show_help + ;; +- --cflags=*) CFLAGS="${CFLAGS} $optval" ++ --cflags=*) CFLAGS="$optval" + ;; + --compiler-prefix=*) COMPILER_PREFIX="$optval" + ;; +@@ -158,12 +158,9 @@ + + done + +-if test_compiler "gcc" ++if ! test_compiler $CC + then + CC="gcc" +-elif test_compiler "cc" +-then +- CC="cc" + fi + + if test_lib "-lpthread"; then LDFLAGS="${LDFLAGS} -lpthread"; fi diff --git a/net/nakenchat/pkg-plist b/net/nakenchat/pkg-plist index 8d2a43446e9d..316918caa51e 100644 --- a/net/nakenchat/pkg-plist +++ b/net/nakenchat/pkg-plist @@ -1,3 +1,5 @@ bin/nakenchat bin/nakenpasswd -etc/nakenchat.conf +@unexec if cmp -s %D/etc/nakenchat.conf.sample %D/etc/nakenchat.conf; then rm -f %D/etc/nakenchat.conf; fi +etc/nakenchat.conf.sample +@exec if [ ! -f %D/etc/nakenchat.conf ] ; then cp -p %D/%F %B/nakenchat.conf; fi