aboutsummaryrefslogtreecommitdiffstats
path: root/net/avahi-app
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2009-07-09 11:08:06 +0800
committermarcus <marcus@FreeBSD.org>2009-07-09 11:08:06 +0800
commit3714e9a3adb54cc282b92318e37e3f9a1fd0166b (patch)
treebcf4e30da3390dab0857d1b71cbac8ff4bb6323a /net/avahi-app
parentc6ddbc15e18382826f0821ae535a327d467da589 (diff)
downloadfreebsd-ports-gnome-3714e9a3adb54cc282b92318e37e3f9a1fd0166b.tar.gz
freebsd-ports-gnome-3714e9a3adb54cc282b92318e37e3f9a1fd0166b.tar.zst
freebsd-ports-gnome-3714e9a3adb54cc282b92318e37e3f9a1fd0166b.zip
Do not remove configuration files if they have been modified.
PR: 136301
Diffstat (limited to 'net/avahi-app')
-rw-r--r--net/avahi-app/Makefile13
-rw-r--r--net/avahi-app/files/patch-avahi-daemon_Makefile.in38
-rw-r--r--net/avahi-app/pkg-plist6
3 files changed, 52 insertions, 5 deletions
diff --git a/net/avahi-app/Makefile b/net/avahi-app/Makefile
index 9354a57d1db4..dde18df64e64 100644
--- a/net/avahi-app/Makefile
+++ b/net/avahi-app/Makefile
@@ -8,7 +8,7 @@
PORTNAME= avahi
PORTVERSION= 0.6.25
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES?= net dns
MASTER_SITES= http://www.avahi.org/download/
PKGNAMESUFFIX?= -app
@@ -52,6 +52,8 @@ MLINKS= avahi-browse.1 avahi-browse-domains.1 \
avahi-publish.1 avahi-publish-service.1 \
avahi-resolve.1 avahi-resolve-address.1 \
avahi-resolve.1 avahi-resolve-host-name.1
+
+DAEMON_CONFIG_FILES= hosts avahi-daemon.conf
.endif
USE_RC_SUBR=yes
@@ -146,6 +148,15 @@ avahi-post-install:
.for f in ${AVAHI_PKGCONFIG}
${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/libdata/pkgconfig
.endfor
+ ${MKDIR} ${PREFIX}/avahi
+.for f in ${DAEMON_CONFIG_FILES}
+ ${INSTALL_DATA} ${WKRSRC}/avahi-daemon/${f} \
+ ${PREFIX}/etc/avahi/${f}.dist
+ if [ ! -f ${PREFIX}/etc/avahi/${f} ]; then \
+ ${INSTALL_DATA} ${WKRSRC}/avahi-daemon/${f} \
+ ${PREFIX}/etc/avahi; \
+ fi
+.endfor
.if !defined(PACKAGE_BUILDING) && (${AVAHI_SLAVE}=="no" || ${AVAHI_SLAVE}=="autoipd")
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.endif
diff --git a/net/avahi-app/files/patch-avahi-daemon_Makefile.in b/net/avahi-app/files/patch-avahi-daemon_Makefile.in
index 4bf12250c436..8dcf912f394e 100644
--- a/net/avahi-app/files/patch-avahi-daemon_Makefile.in
+++ b/net/avahi-app/files/patch-avahi-daemon_Makefile.in
@@ -1,6 +1,15 @@
---- avahi-daemon/Makefile.in.orig 2008-07-03 14:32:45.000000000 -0500
-+++ avahi-daemon/Makefile.in 2008-07-03 14:33:25.000000000 -0500
-@@ -622,7 +622,7 @@
+--- avahi-daemon/Makefile.in.orig 2009-07-08 22:53:37.000000000 -0400
++++ avahi-daemon/Makefile.in 2009-07-08 22:55:59.000000000 -0400
+@@ -69,7 +69,7 @@ host_triplet = @host@
+ @ENABLE_CHROOT_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@ caps.c caps.h
+
+ @ENABLE_CHROOT_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_3 = -lcap
+-@HAVE_DLOPEN_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_4 = -ldl
++@HAVE_DLOPEN_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_4 =
+ @HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_5 = \
+ @HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@ dbus-protocol.c dbus-protocol.h \
+ @HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@ dbus-util.c dbus-util.h \
+@@ -599,7 +599,7 @@ clean-sbinPROGRAMS:
done
avahi-daemon$(EXEEXT): $(avahi_daemon_OBJECTS) $(avahi_daemon_DEPENDENCIES)
@rm -f avahi-daemon$(EXEEXT)
@@ -9,3 +18,26 @@
ini-file-parser-test$(EXEEXT): $(ini_file_parser_test_OBJECTS) $(ini_file_parser_test_DEPENDENCIES)
@rm -f ini-file-parser-test$(EXEEXT)
$(ini_file_parser_test_LINK) $(ini_file_parser_test_OBJECTS) $(ini_file_parser_test_LDADD) $(LIBS)
+@@ -1079,14 +1079,14 @@ uninstall-pkgdataDATA:
+ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
+ done
+ install-pkgsysconfDATA: $(pkgsysconf_DATA)
+- @$(NORMAL_INSTALL)
+- test -z "$(pkgsysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgsysconfdir)"
+- @list='$(pkgsysconf_DATA)'; for p in $$list; do \
+- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- f=$(am__strip_dir) \
+- echo " $(pkgsysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgsysconfdir)/$$f'"; \
+- $(pkgsysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgsysconfdir)/$$f"; \
+- done
++# @$(NORMAL_INSTALL)
++# test -z "$(pkgsysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgsysconfdir)"
++# @list='$(pkgsysconf_DATA)'; for p in $$list; do \
++# if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
++# f=$(am__strip_dir) \
++# echo " $(pkgsysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgsysconfdir)/$$f'"; \
++# $(pkgsysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgsysconfdir)/$$f"; \
++# done
+
+ uninstall-pkgsysconfDATA:
+ @$(NORMAL_UNINSTALL)
diff --git a/net/avahi-app/pkg-plist b/net/avahi-app/pkg-plist
index cca894f1937f..f07b2a7825cc 100644
--- a/net/avahi-app/pkg-plist
+++ b/net/avahi-app/pkg-plist
@@ -7,9 +7,13 @@ bin/avahi-resolve
bin/avahi-resolve-address
bin/avahi-resolve-host-name
bin/avahi-set-host-name
-etc/avahi/avahi-daemon.conf
+@unexec if cmp -s %D/etc/avahi/avahi-daemon.conf %D/etc/avahi/avahi-daemon.conf.dist; then rm -f %D/etc/avahi/avahi-daemon.conf; fi
+etc/avahi/avahi-daemon.conf.dist
+@exec [ -f %B/avahi-daemon.conf ] || cp %B/%f %B/avahi-daemon.conf
etc/avahi/avahi-dnsconfd.action
+@unexec if cmp -s %D/etc/avahi/hosts %D/etc/avahi/hosts.dist; then rm -f %D/etc/avahi/hosts; fi
etc/avahi/hosts
+@exec [ -f %B/hosts ] || cp %B/%f %B/hosts
etc/avahi/services/sftp-ssh.service
etc/avahi/services/ssh.service
etc/dbus-1/system.d/avahi-dbus.conf