2007-10-24 23:37:25 +00:00
|
|
|
# New ports collection makefile for: avahi
|
|
|
|
# Date created: 18 November 2005
|
|
|
|
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
2011-03-14 16:05:37 +00:00
|
|
|
# $MCom: ports/net/avahi-app/Makefile,v 1.17 2011/03/13 17:23:19 kwm Exp $
|
2007-10-24 23:37:25 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= avahi
|
2011-03-14 16:05:37 +00:00
|
|
|
PORTVERSION= 0.6.29
|
2012-04-03 20:37:39 +00:00
|
|
|
PORTREVISION?= 3
|
2007-10-24 23:37:25 +00:00
|
|
|
CATEGORIES?= net dns
|
|
|
|
MASTER_SITES= http://www.avahi.org/download/
|
|
|
|
PKGNAMESUFFIX?= -app
|
|
|
|
|
|
|
|
MAINTAINER?= gnome@FreeBSD.org
|
|
|
|
COMMENT?= Service discovery on a local network
|
|
|
|
|
2010-07-25 00:16:17 +00:00
|
|
|
BUILD_DEPENDS?= g-ir-scanner:${PORTSDIR}/devel/gobject-introspection
|
2007-10-24 23:37:25 +00:00
|
|
|
LIB_DEPENDS?= expat.6:${PORTSDIR}/textproc/expat2 \
|
|
|
|
daemon.0:${PORTSDIR}/devel/libdaemon \
|
|
|
|
dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \
|
2011-09-12 23:17:32 +00:00
|
|
|
gdbm.4:${PORTSDIR}/databases/gdbm
|
2010-07-25 00:16:17 +00:00
|
|
|
RUN_DEPENDS?= g-ir-scanner:${PORTSDIR}/devel/gobject-introspection
|
2007-10-24 23:37:25 +00:00
|
|
|
|
2012-05-20 16:47:37 +00:00
|
|
|
USERS?= ${PORTNAME}
|
|
|
|
GROUPS?= ${USERS}
|
|
|
|
|
2007-12-21 15:14:46 +00:00
|
|
|
USE_GNOME?= gnomehack ltverhack glib20 intltool
|
2013-04-24 18:10:30 +00:00
|
|
|
USES= gettext
|
2007-10-24 23:37:25 +00:00
|
|
|
USE_GNOME_SUBR= yes
|
|
|
|
USE_GMAKE= yes
|
2010-12-04 07:34:27 +00:00
|
|
|
USE_AUTOTOOLS= libtool
|
2007-10-24 23:37:25 +00:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
AVAHI_SLAVE?= no
|
|
|
|
CONFIGURE_ARGS?=--with-distro=freebsd \
|
2008-07-03 21:53:55 +00:00
|
|
|
--with-dbus-system-socket=unix:path=/var/run/dbus/system_bus_socket \
|
2007-10-24 23:37:25 +00:00
|
|
|
--disable-monodoc \
|
|
|
|
--disable-doxygen-doc \
|
|
|
|
--disable-doxygen-dot \
|
|
|
|
--localstatedir=/var \
|
2010-11-20 15:37:08 +00:00
|
|
|
--enable-compat-howl
|
2011-09-23 22:26:39 +00:00
|
|
|
CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
|
2007-10-24 23:37:25 +00:00
|
|
|
PTHREAD_LIBS="${PTHREAD_LIBS}"
|
2011-09-23 22:26:39 +00:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include -DHAVE_KQUEUE
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2007-10-24 23:37:25 +00:00
|
|
|
|
|
|
|
.if ${AVAHI_SLAVE}=="no"
|
|
|
|
CONFLICTS= howl-[0-9]*
|
|
|
|
|
|
|
|
MAN1= avahi-browse.1 avahi-publish.1 avahi-resolve.1 avahi-set-host-name.1
|
|
|
|
MAN5= avahi-daemon.conf.5 avahi.service.5 avahi.hosts.5
|
|
|
|
MAN8= avahi-daemon.8 avahi-dnsconfd.8 avahi-dnsconfd.action.8
|
|
|
|
|
|
|
|
MLINKS= avahi-browse.1 avahi-browse-domains.1 \
|
|
|
|
avahi-publish.1 avahi-publish-address.1 \
|
|
|
|
avahi-publish.1 avahi-publish-service.1 \
|
|
|
|
avahi-resolve.1 avahi-resolve-address.1 \
|
|
|
|
avahi-resolve.1 avahi-resolve-host-name.1
|
2009-07-09 03:08:06 +00:00
|
|
|
|
|
|
|
DAEMON_CONFIG_FILES= hosts avahi-daemon.conf
|
2007-10-24 23:37:25 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
USE_RC_SUBR=yes
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${AVAHI_SLAVE}=="autoipd"
|
|
|
|
CONFIGURE_ARGS+=--enable-autoipd
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-autoipd
|
|
|
|
.endif
|
|
|
|
.if ${AVAHI_SLAVE}=="gtk"
|
|
|
|
CONFIGURE_ARGS+=--enable-gtk
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-gtk
|
|
|
|
.endif
|
2010-11-20 15:37:08 +00:00
|
|
|
.if ${AVAHI_SLAVE}=="gtk3"
|
|
|
|
CONFIGURE_ARGS+=--enable-gtk3
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-gtk3
|
|
|
|
.endif
|
2007-10-24 23:37:25 +00:00
|
|
|
.if ${AVAHI_SLAVE}=="libdns"
|
|
|
|
CONFIGURE_ARGS+=--enable-compat-libdns_sd
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-compat-libdns_sd
|
|
|
|
.endif
|
|
|
|
.if ${AVAHI_SLAVE}=="python"
|
|
|
|
CONFIGURE_ARGS+=--enable-python
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-python
|
|
|
|
.endif
|
|
|
|
.if ${AVAHI_SLAVE}=="qt3"
|
|
|
|
CONFIGURE_ARGS+=--enable-qt3
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-qt3
|
|
|
|
.endif
|
|
|
|
.if ${AVAHI_SLAVE}=="qt4"
|
2007-10-26 19:57:08 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-qt4 \
|
|
|
|
--disable-expat \
|
|
|
|
--disable-gdbm
|
2007-10-24 23:37:25 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-qt4
|
|
|
|
.endif
|
|
|
|
.if ${AVAHI_SLAVE}=="sharp"
|
|
|
|
CONFIGURE_ARGS+=--enable-mono
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-mono
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch: avahi-post-patch
|
|
|
|
|
|
|
|
avahi-post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' \
|
|
|
|
${WRKSRC}/man/*.*
|
|
|
|
@${RM} -f ${WRKSRC}/man/*.bak
|
|
|
|
@${REINPLACE_CMD} -e 's|-ldl||g ; s|netdev|network|g' \
|
|
|
|
${WRKSRC}/configure \
|
|
|
|
${WRKSRC}/avahi-client/Makefile.in \
|
|
|
|
${WRKSRC}/avahi-daemon/Makefile.in
|
2012-01-19 17:13:12 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|have_inotify=yes|have_inotify=no|' \
|
|
|
|
${WRKSRC}/configure
|
2009-03-08 16:58:35 +00:00
|
|
|
@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} \
|
2009-05-06 07:13:56 +00:00
|
|
|
${REINPLACE_CMD} -e 's|(LIBINTL)|(INTLLIBS)|g ; \
|
2009-03-08 16:58:35 +00:00
|
|
|
s|(LIBICONV)|(LTLIBICONV)|g'
|
2010-03-28 18:23:20 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|%%RC_SUBR%%|/etc/rc.subr| ; \
|
2007-10-24 23:37:25 +00:00
|
|
|
s|%%GNOME_SUBR%%|${GNOME_SUBR}|' \
|
|
|
|
${WRKSRC}/initscript/freebsd/avahi-dnsconfd.sh.in \
|
|
|
|
${WRKSRC}/initscript/freebsd/avahi-daemon.sh.in
|
2008-03-24 03:52:36 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|dbus_connection_disconnect|dbus_connection_close|g' \
|
|
|
|
${WRKSRC}/avahi-client/client.c \
|
|
|
|
${WRKSRC}/avahi-daemon/dbus-protocol.c
|
2008-07-03 21:53:55 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|^_||g' \
|
2008-12-16 04:02:03 +00:00
|
|
|
${WRKSRC}/avahi-ui/*.desktop.in.in
|
2007-10-24 23:37:25 +00:00
|
|
|
|
|
|
|
post-build: avahi-post-build
|
|
|
|
|
|
|
|
avahi-post-build:
|
|
|
|
.for f in ${AVAHI_PKGCONFIG}
|
|
|
|
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} \
|
|
|
|
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${f}
|
|
|
|
.endfor
|
|
|
|
|
2007-12-24 18:38:00 +00:00
|
|
|
pre-su-install: avahi-pre-su-install
|
2007-12-20 18:23:33 +00:00
|
|
|
|
2007-12-24 18:38:00 +00:00
|
|
|
avahi-pre-su-install:
|
2007-12-20 18:23:33 +00:00
|
|
|
.if ${AVAHI_SLAVE}=="no"
|
|
|
|
@${MKDIR} ${PREFIX}/lib/avahi
|
|
|
|
@${TOUCH} -f ${PREFIX}/lib/avahi/.keep
|
|
|
|
.endif
|
|
|
|
|
2007-10-24 23:37:25 +00:00
|
|
|
post-install: avahi-post-install
|
|
|
|
|
|
|
|
avahi-post-install:
|
|
|
|
.if ${AVAHI_SLAVE}!="no"
|
|
|
|
.for f in ${MAN1} ${MAN2} ${MAN3} ${MAN4} ${MAN5} ${MAN6} ${MAN7} ${MAN8} ${MAN9}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/man/${f} ${PREFIX}/man/man${f:E}/${f}
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
.for f in ${AVAHI_PKGCONFIG}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/libdata/pkgconfig
|
2009-07-09 03:08:06 +00:00
|
|
|
.endfor
|
2009-07-09 04:34:50 +00:00
|
|
|
${MKDIR} ${PREFIX}/etc/avahi
|
2009-07-09 03:08:06 +00:00
|
|
|
.for f in ${DAEMON_CONFIG_FILES}
|
2009-07-09 03:49:40 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/avahi-daemon/${f} \
|
2009-07-09 03:08:06 +00:00
|
|
|
${PREFIX}/etc/avahi/${f}.dist
|
|
|
|
if [ ! -f ${PREFIX}/etc/avahi/${f} ]; then \
|
2009-07-09 03:49:40 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/avahi-daemon/${f} \
|
2009-07-09 03:08:06 +00:00
|
|
|
${PREFIX}/etc/avahi; \
|
|
|
|
fi
|
2007-10-24 23:37:25 +00:00
|
|
|
.endfor
|
2011-03-14 16:05:37 +00:00
|
|
|
.if ${AVAHI_SLAVE}=="no"
|
2010-07-31 08:16:15 +00:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/org.freedesktop.Avahi.service \
|
2010-11-20 15:37:08 +00:00
|
|
|
${LOCALBASE}/share/dbus-1/system-services
|
2011-03-14 16:05:37 +00:00
|
|
|
.endif
|
2007-10-24 23:37:25 +00:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|