the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: noip
Version: 2.1.1
Revision: 11
###
BuildDepends: fink (>= 0.24.12)
Depends: daemonic
###
Source: http://www.no-ip.com/client/linux/%n-%v.tar.gz
Source-MD5: 2855ba62a8b5742a7e9d26f4e7c80b25
###
PatchFile: %n.patch
PatchFile-MD5: 80bacba7bbf579e4888ebe7c748500dc
PatchScript: <<
sed -e s,@FINKPREFIX@,%p, %{PatchFile} | patch -p1
<<
###
DocFiles: COPYING README.FIRST
ConfFiles: %p/etc/no-ip2.conf
###
CompileScript: make
InstallScript: <<
install -d -m 755 %i/bin
install -m 755 noip2 %i/bin
install -d -m 755 %i/etc
touch %i/etc/no-ip2.conf
<<
###
PostInstScript: <<
# update init script if necessary
daemonic update %n
ANSWER=foo
echo "Greetings!"
echo
echo "The no-ip dynamic DNS system requires a configuration file."
echo "The answers to the next five questions will build one."
echo
while [ "$ANSWER" = "foo" ]
do
echo "Would you like to create it now? [Y/N]"
/bin/echo "> \c"
read ANSWER
case $ANSWER in
Y*) ANSWER=Y;;
y*) ANSWER=Y;;
N*) ANSWER=N;;
n*) ANSWER=N;;
*) ANSWER=foo
echo "===> Try again!";;
esac
done
if [ "$ANSWER" = "Y" ]
then
%p/bin/noip2 -C -c /tmp/no-ip2.conf
mv /tmp/no-ip2.conf %p/etc/no-ip2.conf
fi
echo
echo "To change or create a config file for noip see options by"
echo " typing '%p/bin/noip2 -h'."
echo
echo "This script uses these options to create the config file:"
echo " %p/bin/noip2 -C -c /tmp/no-ip2.conf"
echo " mv /tmp/no-ip2.conf %p/etc/no-ip2.conf"
echo
echo "Since this script runs as root make sure to be root, su - or use sudo"
echo
<<
###
PreRmScript: <<
# clean up
[ -f %p/var/run/%n.pid ] && kill `cat %p/var/run/%n.pid`
if [ $1 != "upgrade" ]; then
daemonic remove %n
fi
<<
DaemonicName: noip
DaemonicFile: <<
<<
###
Description: Client for the no-ip.com dynamic DNS service
DescDetail: <<
Client for the no-ip.com dynamic DNS service
<<
DescUsage: <<
Run %p/share/noip/no-ip.sh to configure noip and then enable it into the
OSX startuplist "sudo daemonic enable noip".
<<
###
License: GPL
Maintainer: Justin F. Hallett
Homepage: http://www.no-ip.com/
diff -ruN noip-2.0.12.orig/Makefile noip-2.0.12/Makefile
--- noip-2.0.12.orig/Makefile Thu May 8 15:13:28 2003
+++ noip-2.0.12/Makefile Sun Jun 1 23:07:00 2003
@@ -1,13 +1,13 @@
TGT=noip2
CC=gcc
-PREFIX=/usr/local
+PREFIX=@FINKPREFIX@
CONFDIR=${PREFIX}/etc
BINDIR=${PREFIX}/bin
# these defines are for Linux
LIBS=
-ARCH=linux
+#ARCH=linux
# for BSD systems that have getifaddr(), uncomment the next line
#ARCH=bsd_with_getifaddrs
@@ -15,6 +15,8 @@
# for early BSD systems without getifaddrs(), uncomment the next line
#ARCH=bsd
+# for Darwin/OS X
+ARCH=darwin
# for solaris, uncomment the next two lines
# LIBS=-lsocket -lnsl
diff -ruN noip-2.0.12.orig/noip2.c noip-2.0.12/noip2.c
--- noip-2.0.12.orig/noip2.c Fri May 23 16:55:14 2003
+++ noip-2.0.12/noip2.c Sun Jun 1 23:11:39 2003
@@ -109,6 +109,10 @@
#include
#endif
+#ifdef darwin
+#define bsd
+#endif
+
#ifdef bsd
#include
#include
@@ -494,6 +498,7 @@
if (handle_config_error(parse_config()) != SUCCESS)
return -1;
+#ifndef darwin
/* drop root privileges after reading config */
if (geteuid() == 0) {
if ((nobody = getpwnam("nobody")) != NULL) { // if "nobody" exists
@@ -503,6 +508,7 @@
seteuid(nobody->pw_uid);
}
}
+#endif /* Darwin's nobody doesn't have shm access */
if (*IPaddress != 0) {
if (background) {