- Update to 2.12

- Pass maintainer to submitter
- Switch to new MASTER_SITES
- Add RC script
- Switch to OPTIONS
- Properly handle the configuration file
- Respect CC and CFLAGS

PR:		ports/128894
Submitted by:	Oleg Ginzburg <oleg.ginzburg@nevosoft.ru>
Approved by:	mike@mikekohn.net (maintainer)
This commit is contained in:
Wesley Shields 2008-11-23 19:25:12 +00:00
parent 7be05569c8
commit 5ee1c05748
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=223296
6 changed files with 132 additions and 19 deletions

View file

@ -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 <bsd.port.pre.mk>
.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 <bsd.port.post.mk>

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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