diff -Nur mDNSResponder-107.1.orig/Clients/Makefile mDNSResponder-107.1/Clients/Makefile --- mDNSResponder-107.1.orig/Clients/Makefile 2004-09-24 23:15:26.000000000 +0200 +++ mDNSResponder-107.1/Clients/Makefile 2006-02-22 20:49:14.000000000 +0100 @@ -49,11 +49,14 @@ ############################################################################# -# If library /usr/lib/libdns_sd.* exists, then link it +ifneq "$(wildcard ../mDNSPosix/build/prod/libdns_sd.*)" "" +LIBS ?= -L../mDNSPosix/build/prod/ -ldns_sd +endif +ifneq "$(wildcard ../mDNSPosix/build/debug/libdns_sd.*)" "" +LIBS ?= -L../mDNSPosix/build/debug/ -ldns_sd +endif ifneq "$(wildcard /usr/lib/libdns_sd.*)" "" -LIBS = -ldns_sd -else -LIBS = +LIBS ?= -ldns_sd endif targets: build/dns-sd diff -Nur mDNSResponder-107.1.orig/mDNSPosix/Makefile mDNSResponder-107.1/mDNSPosix/Makefile --- mDNSResponder-107.1.orig/mDNSPosix/Makefile 2005-04-14 23:07:10.000000000 +0200 +++ mDNSResponder-107.1/mDNSPosix/Makefile 2006-02-22 21:25:42.000000000 +0100 @@ -224,7 +224,7 @@ COREDIR = ../mDNSCore SHAREDDIR = ../mDNSShared -JDK = /usr/jdk +JDK = `java-config -O` CC = @cc LD = ld -shared @@ -384,7 +384,7 @@ all: setup Daemon libdns_sd Client Responder ProxyResponder Identify NetMonitor dnsextd $(OPTIONALTARG) -install: setup InstalledDaemon InstalledLib InstalledStartup InstalledManPages $(OPTINSTALL) +install: setup InstalledDaemon InstalledLib InstalledManPages $(OPTINSTALL) # 'setup' sets up the build directory structure the way we want setup: @@ -419,7 +419,7 @@ CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS) - @$(LD) $(LIBFLAGS) -o $@ $+ + @$(LD) $(LIBFLAGS) -soname=libdns_sd.$(LDSUFFIX).$(LIBVERS) -o $@ $+ @$(STRIP) $@ # nss_mdns target builds the Name Service Switch module @@ -427,42 +427,38 @@ @echo "Name Service Switch module done" $(BUILDDIR)/$(NSSLIBFILE): $(CLIENTLIBOBJS) $(OBJDIR)/nss_mdns.c.so.o - @$(LD) $(LIBFLAGS) -o $@ $+ + @$(LD) $(LIBFLAGS) -soname=$(NSSLINKNAME) -o $@ $+ @$(STRIP) $@ ############################################################################# # The Install targets place built stuff in their proper places -InstalledDaemon: $(INSTBASE)/sbin/mdnsd +InstalledDaemon: $(DESTDIR)$(INSTBASE)/sbin/mdnsd @echo $+ " installed" -InstalledLib: $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(INSTBASE)/include/dns_sd.h +InstalledLib: $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/include/dns_sd.h @echo $+ " installed" -InstalledStartup: $(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME) +InstalledStartup: $(DESTDIR)$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME) @echo $+ " installed" -InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8 +InstalledNSS: $(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME) $(DESTDIR)etc/nss_mdns.conf $(DESTDIR)$(MANPATH)/man5/nss_mdns.conf.5 $(DESTDIR)$(MANPATH)/man8/libnss_mdns.8 @echo $+ " installed" -InstalledManPages: $(MANPATH)/man8/mdnsd.8 +InstalledManPages: $(DESTDIR)$(MANPATH)/man8/mdnsd.8 @echo $+ " installed" -$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd +$(DESTDIR)$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd $(CP) $< $@ -$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX) +$(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX) $(CP) $< $@ - $(LN) $@ $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX) -ifdef LDCONFIG - # -m means 'merge into existing database', -R means 'rescan directories' - $(LDCONFIG) -mR -endif + $(LN) libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX) -$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h +$(DESTDIR)$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h $(CP) $< $@ -$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR) +$(DESTDIR)$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR) $(CP) $< $@ chmod ugo+x $@ ifdef RUNLEVELSCRIPTSDIR @@ -478,31 +474,26 @@ endif endif -$(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE) - $(LN) $< $@ - ldconfig +$(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME): $(DESTDIR)$(NSSINSTPATH)/$(NSSLIBFILE) + $(LN) $(NSSLIBFILE) $@ -$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE) +$(DESTDIR)$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE) $(CP) $< $@ chmod 444 $@ -/etc/nss_mdns.conf: nss_mdns.conf +$(DESTDIR)etc/nss_mdns.conf: nss_mdns.conf $(CP) $< $@ chmod 444 $@ - # Check the nsswitch.conf file. - # If 'mdns' does not already appear on the "hosts:" line, then add it right before 'dns' - cp -f /etc/nsswitch.conf /etc/nsswitch.conf.pre-mdns - sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' /etc/nsswitch.conf.pre-mdns > /etc/nsswitch.conf -$(MANPATH)/man5/%.5: %.5 +$(DESTDIR)$(MANPATH)/man5/%.5: %.5 cp $< $@ chmod 444 $@ -$(MANPATH)/man8/%.8: %.8 +$(DESTDIR)$(MANPATH)/man8/%.8: %.8 cp $< $@ chmod 444 $@ -$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8 +$(DESTDIR)$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8 cp $< $@ chmod 444 $@ @@ -537,7 +528,7 @@ $(JAR) -cf $@ -C $(OBJDIR) com $(BUILDDIR)/libjdns_sd.$(LDSUFFIX): $(JAVASRC)/JNISupport.c $(OBJDIR)/DNSSD.java.h - $(CC) -o $@ $< $(JAVACFLAGS) -I$(OBJDIR) + $(CC) -o $@ $< $(JAVACFLAGS) -I$(OBJDIR) -L$(BUILDDIR) $(OBJDIR)/com/apple/dnssd/%.class: $(JAVASRC)/%.java $(JAVAC) -d $(OBJDIR) -classpath $(OBJDIR) $<