aboutsummaryrefslogtreecommitdiff
path: root/irc/sirc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'irc/sirc/Makefile')
-rw-r--r--irc/sirc/Makefile124
1 files changed, 70 insertions, 54 deletions
diff --git a/irc/sirc/Makefile b/irc/sirc/Makefile
index 2ac6ad1df3dc..3c57db9ea502 100644
--- a/irc/sirc/Makefile
+++ b/irc/sirc/Makefile
@@ -1,87 +1,103 @@
# New ports collection makefile for: sirc
-# Date created: 4 May 1998
-# Whom: Doug Barton <Doug@gorean.org>
+# Date created: 4 May 1998
+# Whom: Doug Barton <dougb@FreeBSD.org>
#
# $FreeBSD$
-#
-# If you need SOCKS support, define SOCKS_SERVER with
-# the name of your SOCKS proxy and remove the '#'.
-# You should also check the default port and DNS
-# setting in ${PREFIX}/bin/sirc after installation.
-#
-# SOCKS_SERVER= your.socks.proxy
PORTNAME= sirc
PORTVERSION= 2.211
-CATEGORIES= irc
+PORTREVISION= 1
+CATEGORIES= irc ipv6
MASTER_SITES= http://www.iagora.com/~espel/sirc/ \
- http://dougbarton.us/Downloads/
+ http://dougbarton.us/Downloads/sirc/ \
+ http://www.iagora.com/~espel/sirc/scripts/:s \
+ http://dougbarton.us/Downloads/sirc/scripts/:s
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
+DIST_SUBDIR= sirc
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= DougB@FreeBSD.org
COMMENT= Small (150k), fast, perl-based IRC client
USE_PERL5= yes
-.if exists(/usr/bin/perl5)
-SHORT_PERL5=/usr/bin/perl5
+OPTIONS= IPV6 "Support for IPv6 transport" on \
+ SIRC_SCRIPTS "Additional scripts for the client" on \
+ SOCKS "Support for IRC'ing through a SOCKS proxy" off
+
+SUB_FILES= sirc
+
+MAN1= ssfe.1 sirc.1
+
+PORTDOCS= ChangeLog PROGRAMMING README
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_IPV6)
+RUN_DEPENDS= ${SITE_PERL}/IO/Socket/INET6.pm:${PORTSDIR}/net/p5-IO-INET6
+EXTRA_PATCHES= ${PATCHDIR}/dsirc-ipv6
.else
-SHORT_PERL5=${PREFIX}/bin/perl5
+EXTRA_PATCHES= ${PATCHDIR}/dsirc-minimal
.endif
-post-extract:
-.if !defined(SOCKS_SERVER)
- @${ECHO_MSG} ''
- @${ECHO_MSG} "SOCKS proxy support is available with this client."
- @${ECHO_MSG} "If you need SOCKS support edit the Makefile in this"
- @${ECHO_MSG} "directory according to the instructions at the top of it."
- @${ECHO_MSG} "Then do 'make clean', 'make deinstall' (if needed)"
- @${ECHO_MSG} "then 'make install'."
- @${ECHO_MSG} ''
+.if !defined(WITHOUT_SIRC_SCRIPTS)
+DISTFILES+= adcc.pl:s akickban.pl:s avoice.pl:s country.pl:s finger.pl:s \
+ ftp.pl:s howl.pl:s lastlog.pl:s nocolor.pl:s patattack.pl:s \
+ prefix.pl:s quiet.pl:s quit.pl:s thx.pl:s www.pl:s yiff.pl:s
+PLIST_SUB+= SCRIPTS=""
+.else
+PLIST_SUB+= SCRIPTS="@comment "
.endif
-pre-patch:
- @${CP} ${SCRIPTDIR}/sirc-proto ${WRKSRC}
-
-do-patch:
-.if defined(SOCKS_SERVER)
- @${PATCH} ${PATCH_DIST_ARGS} < ${PATCHDIR}/patch-aa
- @${SED} 's:SOCKS_SERVER\=:SOCKS_SERVER\=${SOCKS_SERVER}:' \
- ${WRKSRC}/sirc-proto > ${WRKSRC}/sirc-proto.1
- @${SED} 's:PREFIX.SED:${PREFIX}:' ${WRKSRC}/sirc-proto.1 \
- > ${WRKSRC}/sirc-proto.2
- @${SED} 's:PERL5.SED:${SHORT_PERL5}:' ${WRKSRC}/sirc-proto.2 \
- > ${WRKSRC}/sirc
+.if defined(WITH_SOCKS)
+PKGMESSAGE= ${FILESDIR}/pkg-message-socks
+PLIST_SUB+= SOCKS=""
.else
- @${SED} 's:PREFIX.SED:${PREFIX}:' ${WRKSRC}/sirc-proto \
- > ${WRKSRC}/sirc-proto.1
- @${SED} 's:PERL5.SED:${SHORT_PERL5}:' ${WRKSRC}/sirc-proto.1 \
- > ${WRKSRC}/sirc
+PLIST_SUB+= SOCKS="@comment "
.endif
+pre-patch:
+ @${CP} ${WRKSRC}/dsirc ${WRKSRC}/dsirc.prepatch
+ @${SED} -e "1s|^#!/usr/local/bin/perl|#!${PREFIX}/bin/perl|" \
+ -e "s#irc.primenet.com#irc.efnet.org#" \
+ ${WRKSRC}/dsirc.prepatch > ${WRKSRC}/dsirc
+
do-build:
${CC} ${CFLAGS} ${WRKSRC}/ssfe.c -o ${WRKSRC}/ssfe -ltermcap
+SIRCLIBDIR= ${PREFIX}/libexec/sirc
do-install:
- ${MKDIR} ${PREFIX}/libexec/sirc
- ${INSTALL_DATA} ${WRKSRC}/n0thing.pl ${PREFIX}/libexec/sirc
- ${INSTALL_DATA} ${WRKSRC}/sirc.help.gz ${PREFIX}/libexec/sirc
- ${INSTALL_DATA} ${WRKSRC}/socks.pl ${PREFIX}/libexec/sirc
- ${INSTALL_SCRIPT} ${WRKSRC}/dsirc ${PREFIX}/libexec/sirc
+ @${MKDIR} ${SIRCLIBDIR}
+ ${INSTALL_DATA} ${WRKSRC}/n0thing.pl ${SIRCLIBDIR}
+ ${INSTALL_DATA} ${WRKSRC}/sirc.help.gz ${SIRCLIBDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/dsirc ${SIRCLIBDIR}
${INSTALL_PROGRAM} ${WRKSRC}/ssfe ${PREFIX}/bin
- ${INSTALL_SCRIPT} ${WRKSRC}/sirc ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKDIR}/sirc ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/ssfe.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/sirc.1 ${PREFIX}/man/man1
-.if defined(SOCKS_SERVER)
- ${ECHO_CMD} '&load("socks.pl");' >> ${PREFIX}/libexec/sirc/sircrc.pl
+.if !defined(WITHOUT_SIRC_SCRIPTS)
+.for file in adcc.pl akickban.pl avoice.pl country.pl finger.pl ftp.pl \
+ howl.pl lastlog.pl nocolor.pl patattack.pl prefix.pl quiet.pl \
+ quit.pl thx.pl www.pl yiff.pl
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${file} ${SIRCLIBDIR}
+.endfor
+.endif
+.if defined(WITH_SOCKS)
+ ${INSTALL_DATA} ${WRKSRC}/socks.pl ${SIRCLIBDIR}
.endif
.if !defined(NOPORTDOCS)
- ${INSTALL_DATA} ${WRKSRC}/ChangeLog ${PREFIX}/libexec/sirc
- ${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/libexec/sirc
- ${INSTALL_DATA} ${WRKSRC}/PROGRAMMING ${PREFIX}/libexec/sirc
- ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/libexec/sirc
- ${INSTALL_DATA} ${WRKSRC}/README.socks ${PREFIX}/libexec/sirc
+ ${MKDIR} ${DOCSDIR}
+.for file in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+.endfor
+.if defined(WITH_SOCKS)
+ ${INSTALL_DATA} ${WRKSRC}/README.socks ${DOCSDIR}
+.endif
.endif
-MAN1= sirc.1 ssfe.1
+post-install:
+.if defined(WITH_SOCKS)
+ @${CAT} ${PKGMESSAGE}
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>