diff options
author | mandree <mandree@FreeBSD.org> | 2012-08-08 06:22:11 +0800 |
---|---|---|
committer | mandree <mandree@FreeBSD.org> | 2012-08-08 06:22:11 +0800 |
commit | 0bcb3560624f4c7a886db03e420b8d1f53613626 (patch) | |
tree | 163c3610aee5b5a6d04b20eb11aef5fc46f42216 /dns | |
parent | 11320a572b31c698ded85d050b9927c0616f3f71 (diff) | |
download | freebsd-ports-gnome-0bcb3560624f4c7a886db03e420b8d1f53613626.tar.gz freebsd-ports-gnome-0bcb3560624f4c7a886db03e420b8d1f53613626.tar.zst freebsd-ports-gnome-0bcb3560624f4c7a886db03e420b8d1f53613626.zip |
Add new dnsmasq-devel version, for development/test/release candidate versions.
This port is based on dns/dnsmasq 2.62_1,1 and has been updated to 2.63rc2.
Description (by Simon Kelley, the upstream maintainer):
Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server.
It is designed to provide DNS and, optionally, DHCP, to a small network. It
can serve the names of local machines which are not in the global DNS. The
DHCP server integrates with the DNS server and allows machines with
DHCP-allocated addresses to appear in the DNS with names configured either
in each host or in a central configuration file. Dnsmasq supports static and
dynamic DHCP leases and BOOTP/TFTP/PXE for network booting of diskless
machines.
Diffstat (limited to 'dns')
-rw-r--r-- | dns/Makefile | 1 | ||||
-rw-r--r-- | dns/dnsmasq-devel/Makefile | 120 | ||||
-rw-r--r-- | dns/dnsmasq-devel/distinfo | 2 | ||||
-rw-r--r-- | dns/dnsmasq-devel/files/dnsmasq.in | 99 | ||||
-rw-r--r-- | dns/dnsmasq-devel/files/pkg-message.in | 7 | ||||
-rw-r--r-- | dns/dnsmasq-devel/pkg-descr | 14 | ||||
-rw-r--r-- | dns/dnsmasq-devel/pkg-plist | 21 | ||||
-rw-r--r-- | dns/dnsmasq/Makefile | 2 |
8 files changed, 266 insertions, 0 deletions
diff --git a/dns/Makefile b/dns/Makefile index c2daf83d4a0a..256b444f8dbd 100644 --- a/dns/Makefile +++ b/dns/Makefile @@ -36,6 +36,7 @@ SUBDIR += dnshijacker SUBDIR += dnsjava SUBDIR += dnsmasq + SUBDIR += dnsmasq-devel SUBDIR += dnsmax-perl SUBDIR += dnsperf SUBDIR += dnsproxy diff --git a/dns/dnsmasq-devel/Makefile b/dns/dnsmasq-devel/Makefile new file mode 100644 index 000000000000..cd4a00a0cd87 --- /dev/null +++ b/dns/dnsmasq-devel/Makefile @@ -0,0 +1,120 @@ +# New ports collection makefile for: dnsmasq +# Date created: 2012-08-07 +# Whom: Matthias Andree +# +# $FreeBSD$ +# + +PORTNAME= dnsmasq +DISTVERSION= 2.63rc2 +CATEGORIES= dns ipv6 +MASTER_SITES= http://www.thekelleys.org.uk/dnsmasq/release-candidates/ +PKGNAMESUFFIX= -devel +EXTRACT_SUFX= .tar.lzma + +MAINTAINER= mandree@FreeBSD.org +COMMENT= Lightweight DNS forwarder, DHCP, and TFTP server + +LICENSE= GPLv2 + +NO_PACKAGE= Package stable version instead + +CONFLICTS_INSTALL=dnsmasq-2* + +MAN8= dnsmasq.8 + +PORTDOCS= CHANGELOG CHANGELOG.archive FAQ doc.html setup.html + +SUB_FILES= pkg-message + +USE_XZ= yes +MAKE_JOBS_SAFE= yes +CFLAGS+= -Wall -Wno-unused-value +MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" PREFIX="${PREFIX}" COPTS="${CFLAGS}" LIBS="${LDFLAGS}" RPM_OPT_FLAGS="${CPPFLAGS}" + +OPTIONS_DEFINE= IPV6 DBUS NLS IDN LUA +OPTIONS_DEFAULT= IPV6 NLS +OPTIONS_EXCLUDE+= EXAMPLES +NLS_DESC= National Language Support (NLS, enables IDN) +IDN_DESC= International Domain Names (IDN) WITHOUT NLS +LUA_DESC= Support lease-change scripts in LUA + +.include <bsd.port.options.mk> + +.if empty(PORT_OPTIONS:MIPV6) +CFLAGS+= -DNO_IPV6 +.endif + +.if ${PORT_OPTIONS:MNLS} +USE_PKGCONFIG= yes +LIB_DEPENDS+= idn:${PORTSDIR}/dns/libidn +PLIST_SUB+= NLS="" +ALL_TARGET= all-i18n +USE_GETTEXT= yes +USE_GMAKE= yes +.else +PLIST_SUB+= NLS="@comment " +.if ${PORT_OPTIONS:MIDN} +CFLAGS+= -DHAVE_IDN +LIB_DEPENDS+= idn:${PORTSDIR}/dns/libidn +.endif +.endif + +.if ${PORT_OPTIONS:MDBUS} +LIB_DEPENDS+= dbus-1:${PORTSDIR}/devel/dbus +USE_PKGCONFIG= yes +CFLAGS+= -DHAVE_DBUS +.endif + +.if ${PORT_OPTIONS:MLUA} +CFLAGS+= -DHAVE_LUASCRIPT +USE_LUA= 5.1 +.endif + +USE_RC_SUBR= dnsmasq + +.include <bsd.port.pre.mk> + +post-patch: + ${REINPLACE_CMD} -e "s/lua5\.1/lua-5.1/" ${WRKSRC}/Makefile + +pre-configure: + @: +.if ${PORT_OPTIONS:MIDN} +.if empty(PORT_OPTIONS:MNLS) + @if ${OBJDUMP} -p ${LOCALBASE}/lib/libidn.so \ + | ${EGREP} -q "NEEDED[[:space:]]+lib(intl|iconv)\.so" ; \ + then ${ECHO} ; ${ECHO} 'WARNING: dns/libidn was compiled with NLS support!' ; \ + ${ECHO} 'Recompile libidn WITHOUT_NLS to get rid of NLS dependencies.' ; ${ECHO} ; \ + fi +.else + @${ECHO} 'WARNING: IDN and NLS enabled, building IDN WITH NLS.' +.endif +.endif + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/dnsmasq ${PREFIX}/sbin + ${INSTALL_DATA} ${WRKSRC}/dnsmasq.conf.example ${PREFIX}/etc + ${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.8 ${PREFIX}/man/man8 +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} +.endif +.if ${PORT_OPTIONS:MNLS} +.for i in de es fi fr id it no pl pt_BR ro + ${MKDIR} ${PREFIX}/share/locale/${i}/LC_MESSAGES + ${INSTALL_DATA} ${WRKSRC}/src/${i}.mo \ + ${PREFIX}/share/locale/${i}/LC_MESSAGES/${PORTNAME}.mo +.endfor +.endif + ${MKDIR} ${EXAMPLESDIR}/dynamic-dnsmasq ${EXAMPLESDIR}/dnslist + ${INSTALL_SCRIPT} ${WRKSRC}/contrib/dynamic-dnsmasq/dynamic-dnsmasq.pl ${EXAMPLESDIR}/dynamic-dnsmasq/ + ${INSTALL_SCRIPT} ${WRKSRC}/contrib/dnslist/dnslist.pl ${EXAMPLESDIR}/dnslist/ + ${INSTALL_DATA} ${WRKSRC}/contrib/dnslist/dhcp.css ${EXAMPLESDIR}/dnslist/ + ${INSTALL_DATA} ${WRKSRC}/contrib/dnslist/dnslist.tt2 ${EXAMPLESDIR}/dnslist/ + if [ ! -f ${PREFIX}/etc/dnsmasq.conf ]; then \ + ${CP} -p ${PREFIX}/etc/dnsmasq.conf.example ${PREFIX}/etc/dnsmasq.conf; \ + fi + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/dns/dnsmasq-devel/distinfo b/dns/dnsmasq-devel/distinfo new file mode 100644 index 000000000000..ab62726a44d1 --- /dev/null +++ b/dns/dnsmasq-devel/distinfo @@ -0,0 +1,2 @@ +SHA256 (dnsmasq-2.63rc2.tar.lzma) = 2902af6dae6a3a40ae32ddce267f4a5703e68a81d6b62f6339e3430ec6089fb5 +SIZE (dnsmasq-2.63rc2.tar.lzma) = 390770 diff --git a/dns/dnsmasq-devel/files/dnsmasq.in b/dns/dnsmasq-devel/files/dnsmasq.in new file mode 100644 index 000000000000..ae752c379bae --- /dev/null +++ b/dns/dnsmasq-devel/files/dnsmasq.in @@ -0,0 +1,99 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: dnsmasq +# REQUIRE: SERVERS +# BEFORE: DAEMON named +# KEYWORD: shutdown +# +# Start before named so as not to break named_wait if named is +# enabled and /etc/resolv.conf points to ourselves (dnsmasq). +# +# +# Please add the following line to /etc/rc.conf.local or /etc/rc.conf to +# enable the dnsmasq service(s): +# +# dnsmasq_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable dnsmasq at boot. +# +# Further settings you can change in /etc/rc.conf if desired: +# +# dnsmasq_conf (path): Set to %%PREFIX%%/etc/dnsmasq.conf by default. +# Set it to another configuration file if you want. +# +# dnsmasq_flags (string): Empty by default. Set it to additional command +# line arguments if desired. +# +# dnsmasq_restart (bool): Set to "YES" by default. +# If "YES", a "reload" action will trigger a "restart" +# if the configuration file has changed, to work +# around a dnsmasq(8) limitation. +# +# +# Additional actions supported by this script: +# +# reload Reload database files by sending SIGHUP and SIGUSR2. +# However, if dnsmasq_restart is true (see above) and the +# configuration file has changed since this rc script has +# started dnsmasq, restart it instead. +# +# logstats Dump statistics information to where dnsmasq is configured to +# log (syslog by default). This sends SIGUSR1 to dnsmasq. +# + +. /etc/rc.subr + +name=dnsmasq +rcvar=dnsmasq_enable + +command="%%PREFIX%%/sbin/${name}" +pidfile="/var/run/${name}.pid" +# timestamp (below) is used to check if "reload" should be a "restart" instead +timestamp="/var/run/${name}.stamp" + +load_rc_config "${name}" + +: ${dnsmasq_enable="NO"} +: ${dnsmasq_conf="%%PREFIX%%/etc/${name}.conf"} +: ${dnsmasq_restart="YES"} + +command_args="-x $pidfile -C $dnsmasq_conf" + +required_files="${dnsmasq_conf}" +extra_commands="reload logstats" + +reload_precmd="reload_pre" +reload_postcmd="reload_post" +start_postcmd="timestampconf" +stop_precmd="rmtimestamp" +logstats_cmd="logstats" + +reload_pre() { + if [ "$dnsmasq_conf" -nt "${timestamp}" ] ; then + if checkyesno dnsmasq_restart ; then + info "restart: $dnsmasq_conf changed" + exec "$0" restart + else + warn "restart required, $dnsmasq_conf changed" + fi + fi +} + +reload_post() { + kill -USR2 ${rc_pid} +} + +logstats() { + kill -USR1 ${rc_pid} +} + +timestampconf() { + touch -r "${dnsmasq_conf}" "${timestamp}" +} + +rmtimestamp() { + rm -f "${timestamp}" +} + +run_rc_command "$1" diff --git a/dns/dnsmasq-devel/files/pkg-message.in b/dns/dnsmasq-devel/files/pkg-message.in new file mode 100644 index 000000000000..4ec9add459b7 --- /dev/null +++ b/dns/dnsmasq-devel/files/pkg-message.in @@ -0,0 +1,7 @@ + +*** To enable dnsmasq, edit %%PREFIX%%/etc/dnsmasq.conf and +*** set dnsmasq_enable="YES" in /etc/rc.conf[.local] +*** +*** Further options and actions are documented inside +*** %%PREFIX%%/etc/rc.d/dnsmasq + diff --git a/dns/dnsmasq-devel/pkg-descr b/dns/dnsmasq-devel/pkg-descr new file mode 100644 index 000000000000..ad791e101ed9 --- /dev/null +++ b/dns/dnsmasq-devel/pkg-descr @@ -0,0 +1,14 @@ +Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server. It +is designed to provide DNS and, optionally, DHCP, to a small network. It can +serve the names of local machines which are not in the global DNS. The DHCP +server integrates with the DNS server and allows machines with DHCP-allocated +addresses to appear in the DNS with names configured either in each host or in +a central configuration file. Dnsmasq supports static and dynamic DHCP leases +and BOOTP/TFTP/PXE for network booting of diskless machines. + +Dnsmasq is targeted at home networks using NAT and connected to the internet +via a modem, cable-modem or ADSL connection but would be a good choice for any +smallish network (up to 1000 clients is known to work) where low resource use +and ease of configuration are important. -- Simon Kelley + +WWW: http://www.thekelleys.org.uk/dnsmasq/doc.html diff --git a/dns/dnsmasq-devel/pkg-plist b/dns/dnsmasq-devel/pkg-plist new file mode 100644 index 000000000000..a6881d038e9d --- /dev/null +++ b/dns/dnsmasq-devel/pkg-plist @@ -0,0 +1,21 @@ +sbin/dnsmasq +@exec if [ ! -f %D/etc/dnsmasq.conf ]; then cp -p %D/%F %B/dnsmasq.conf; fi +@unexec if cmp -s %D/etc/dnsmasq.conf %D/etc/dnsmasq.conf.example ; then rm -f %D/etc/dnsmasq.conf ; fi +etc/dnsmasq.conf.example +%%EXAMPLESDIR%%/dnslist/dhcp.css +%%EXAMPLESDIR%%/dnslist/dnslist.pl +%%EXAMPLESDIR%%/dnslist/dnslist.tt2 +%%EXAMPLESDIR%%/dynamic-dnsmasq/dynamic-dnsmasq.pl +@dirrm %%EXAMPLESDIR%%/dnslist +@dirrm %%EXAMPLESDIR%%/dynamic-dnsmasq +@dirrm %%EXAMPLESDIR%% +%%NLS%%share/locale/de/LC_MESSAGES/dnsmasq.mo +%%NLS%%share/locale/es/LC_MESSAGES/dnsmasq.mo +%%NLS%%share/locale/fi/LC_MESSAGES/dnsmasq.mo +%%NLS%%share/locale/fr/LC_MESSAGES/dnsmasq.mo +%%NLS%%share/locale/id/LC_MESSAGES/dnsmasq.mo +%%NLS%%share/locale/it/LC_MESSAGES/dnsmasq.mo +%%NLS%%share/locale/no/LC_MESSAGES/dnsmasq.mo +%%NLS%%share/locale/pl/LC_MESSAGES/dnsmasq.mo +%%NLS%%share/locale/pt_BR/LC_MESSAGES/dnsmasq.mo +%%NLS%%share/locale/ro/LC_MESSAGES/dnsmasq.mo diff --git a/dns/dnsmasq/Makefile b/dns/dnsmasq/Makefile index 9c61e28991c0..7b0bc09be60e 100644 --- a/dns/dnsmasq/Makefile +++ b/dns/dnsmasq/Makefile @@ -21,6 +21,8 @@ COMMENT= Lightweight DNS forwarder, DHCP, and TFTP server LICENSE= GPLv2 +CONFLICTS_INSTALL=dnsmasq-devel-* + MAN8= dnsmasq.8 PORTDOCS= CHANGELOG CHANGELOG.archive FAQ doc.html setup.html |