aboutsummaryrefslogtreecommitdiff
path: root/misc/yaunc
diff options
context:
space:
mode:
authorThomas Abthorpe <tabthorpe@FreeBSD.org>2007-10-16 03:15:28 +0000
committerThomas Abthorpe <tabthorpe@FreeBSD.org>2007-10-16 03:15:28 +0000
commitae68e4cb1d1ee7020c0fa06c624e99b5fe216718 (patch)
treeb4c7b461de58edbb784f6a6a4e2b6c11daa2193e /misc/yaunc
parent15c82a922d92030138be04d5c58ae32ab8ccd063 (diff)
downloadports-ae68e4cb1d1ee7020c0fa06c624e99b5fe216718.tar.gz
ports-ae68e4cb1d1ee7020c0fa06c624e99b5fe216718.zip
Notes
Diffstat (limited to 'misc/yaunc')
-rw-r--r--misc/yaunc/Makefile15
-rw-r--r--misc/yaunc/distinfo6
-rw-r--r--misc/yaunc/files/patch-Makefile17
-rw-r--r--misc/yaunc/files/patch-ad11
-rw-r--r--misc/yaunc/files/patch-send_data.c11
-rw-r--r--misc/yaunc/files/patch-usage.c (renamed from misc/yaunc/files/patch-ac)5
-rw-r--r--misc/yaunc/files/startup2
-rw-r--r--misc/yaunc/files/yaunc.sh.in28
-rw-r--r--misc/yaunc/pkg-plist3
9 files changed, 58 insertions, 40 deletions
diff --git a/misc/yaunc/Makefile b/misc/yaunc/Makefile
index 476037f6654c..9ab891dce158 100644
--- a/misc/yaunc/Makefile
+++ b/misc/yaunc/Makefile
@@ -6,28 +6,29 @@
#
PORTNAME= yaunc
-PORTVERSION= 1.00
+PORTVERSION= 1.02
CATEGORIES= misc
MASTER_SITES= http://www.redterror.net/code/yaunc/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= jadawin@tuxaco.net
COMMENT= Yet another uptimes.net client
ALL_TARGET= bsd
CFLAGS+= -DCONFFILE=\\\"${PREFIX}/etc/yaunc.conf\\\"
+PLIST_FILES= bin/yaunc \
+ etc/yaunc.conf.sample
+
+USE_RC_SUBR= yaunc.sh
+
MAN1= yaunc.1
post-patch:
- @${CP} -f ${FILESDIR}/startup ${WRKSRC}/yaunc.sh
-.for file in yaunc.1 yaunc.sh
- @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/${file}
-.endfor
+ @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/yaunc.1
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/yaunc ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/yaunc.1 ${MANPREFIX}/man/man1
${INSTALL_DATA} -m 600 ${WRKSRC}/yaunc.conf ${PREFIX}/etc/yaunc.conf.sample
- ${INSTALL_SCRIPT} -m 755 ${WRKSRC}/yaunc.sh ${PREFIX}/etc/rc.d
.include <bsd.port.mk>
diff --git a/misc/yaunc/distinfo b/misc/yaunc/distinfo
index 8ac3d6b602d7..8eef921036cc 100644
--- a/misc/yaunc/distinfo
+++ b/misc/yaunc/distinfo
@@ -1,3 +1,3 @@
-MD5 (yaunc-1.00.tar.gz) = 9495b42fa70d6b6031b4dbf30be9720b
-SHA256 (yaunc-1.00.tar.gz) = 90e612ea54396d071300fa273f6393429f2d7785145917c70129ad98eca36069
-SIZE (yaunc-1.00.tar.gz) = 17718
+MD5 (yaunc-1.02.tar.gz) = eec7724e68e1e680f88a57c6d3a6ef6c
+SHA256 (yaunc-1.02.tar.gz) = c901ac6a1eaa39385e2dcf9bb65d754fe5bb496ef95c5c818ab4a484fa417285
+SIZE (yaunc-1.02.tar.gz) = 13909
diff --git a/misc/yaunc/files/patch-Makefile b/misc/yaunc/files/patch-Makefile
index 2ac182383546..da8304f8299b 100644
--- a/misc/yaunc/files/patch-Makefile
+++ b/misc/yaunc/files/patch-Makefile
@@ -1,8 +1,5 @@
-
-$FreeBSD$
-
---- Makefile.orig Sun Apr 27 19:23:16 2003
-+++ Makefile Sun Apr 27 19:23:38 2003
+--- Makefile.orig Thu May 8 17:25:31 2003
++++ Makefile Fri Oct 12 15:31:56 2007
@@ -1,7 +1,7 @@
# Compiler, flags, etc...
-CC = cc
@@ -10,15 +7,15 @@ $FreeBSD$
#CFLAGS = -Wall -g -DDEBUG2 -DDEBUG1
-CFLAGS=-Wall -O2
+#CFLAGS=-Wall -O2
+ LDFLAGS=-ll
# program variables
- FILENAME = yaunc
-@@ -12,7 +12,7 @@
+@@ -13,7 +13,7 @@
# platform dependant stuff has the appropriate suffix :)
OBJ1 = read_conf.o usage.o unp_error.o encode.o unp_sock_wrappers.o \
- unp_inet_pton.o unp_inet_ntop.o unp_wraplib.o send_data.o \
-+ unp_wraplib.o send_data.o \
- resolv.o daemon_init.o sigfuncs.o inlines.o
- OBJ_LIN = $(OBJ1) linux_funcs.o
++ unp_inet_pton.o send_data.o \
+ resolv.o daemon_init.o sigfuncs.o inlines.o main.o
+ OBJ_LIN = $(OBJ1) get_ut_linux.o
OBJ_SUN = $(OBJ1) get_ut_proc.o
diff --git a/misc/yaunc/files/patch-ad b/misc/yaunc/files/patch-ad
deleted file mode 100644
index cee954cf092b..000000000000
--- a/misc/yaunc/files/patch-ad
+++ /dev/null
@@ -1,11 +0,0 @@
---- yaunc.1.origt Fri Mar 17 17:38:45 2000
-+++ yaunc.1 Sat Dec 16 16:40:02 2000
-@@ -25,7 +25,7 @@
- \fIYauc\fP accepts the following options:
- .TP 8
- .B \-f conf_file
--Specify an alternate configuration file. Default is /etc/yaunc.conf.
-+Specify an alternate configuration file. Default is %%PREFIX%%/etc/yaunc.conf.
- .B \-h
- Display usage information.
- .
diff --git a/misc/yaunc/files/patch-send_data.c b/misc/yaunc/files/patch-send_data.c
new file mode 100644
index 000000000000..aab08db7bd55
--- /dev/null
+++ b/misc/yaunc/files/patch-send_data.c
@@ -0,0 +1,11 @@
+--- send_data.c.orig Fri Oct 12 15:36:52 2007
++++ send_data.c Fri Oct 12 15:36:58 2007
+@@ -30,7 +30,7 @@
+ memset(&servaddr, '0', sizeof(servaddr));
+ servaddr.sin_family = AF_INET;
+ servaddr.sin_port = htons(UPPORT);
+- Inet_pton(AF_INET, ip, &servaddr.sin_addr);
++ inet_pton(AF_INET, ip, &servaddr.sin_addr);
+ free(ip);
+
+ /* communicate via the socket, with the server */
diff --git a/misc/yaunc/files/patch-ac b/misc/yaunc/files/patch-usage.c
index 7176a089aa3c..495f5ecb5b62 100644
--- a/misc/yaunc/files/patch-ac
+++ b/misc/yaunc/files/patch-usage.c
@@ -1,6 +1,3 @@
-
-$FreeBSD$
-
--- usage.c.orig Sun Apr 27 19:11:03 2003
+++ usage.c Sun Apr 27 19:11:26 2003
@@ -10,7 +10,7 @@
@@ -8,7 +5,7 @@ $FreeBSD$
fprintf(stderr, "Options:\n");
fprintf(stderr, "\t-f <config file> - use the specified config file instead of \n");
- fprintf(stderr, "\t of /etc/yaunc.conf\n");
-+ fprintf(stderr, "\t of " CONFFILE "\n");
++ fprintf(stderr, "\t of ${PREFIX}/CONFFILE \n");
fprintf(stderr, "\t-h - display this help\n");
fprintf(stderr, "\n");
exit(0);
diff --git a/misc/yaunc/files/startup b/misc/yaunc/files/startup
deleted file mode 100644
index 55e847af6f9d..000000000000
--- a/misc/yaunc/files/startup
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh
-[ -x %%PREFIX%%/bin/yaunc -a -f %%PREFIX%%/etc/yaunc.conf ] && %%PREFIX%%/bin/yaunc & && echo -n ' yaunc'
diff --git a/misc/yaunc/files/yaunc.sh.in b/misc/yaunc/files/yaunc.sh.in
new file mode 100644
index 000000000000..78ea4f14b922
--- /dev/null
+++ b/misc/yaunc/files/yaunc.sh.in
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+#PROVIDE: yaunc
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# yaunc_enable (bool): Set to NO by default.
+# Set it to YES to enable yaunc.
+# yaunc_config (path): Set to %%PREFIX%%/etc/yaunc.conf
+# by default.
+#
+
+. %%RC_SUBR%%
+
+name="yaunc"
+rcvar=${name}_enable
+
+command=%%PREFIX%%/bin/${name}
+
+load_rc_config $name
+
+: ${yaunc_enable="NO"}
+: ${yaunc_config="%%PREFIX%%/etc/yaunc.conf"}
+
+command_args="-f $yaunc_config"
+
+run_rc_command "$1"
diff --git a/misc/yaunc/pkg-plist b/misc/yaunc/pkg-plist
deleted file mode 100644
index 9eff03fc48c3..000000000000
--- a/misc/yaunc/pkg-plist
+++ /dev/null
@@ -1,3 +0,0 @@
-bin/yaunc
-etc/rc.d/yaunc.sh
-etc/yaunc.conf.sample