Magellan Linux

Annotation of /trunk/mdnsresponder/patches/mdnsresponder-107.6-magellan.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (hide annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years, 1 month ago) by niro
File size: 5977 byte(s)
-import

1 niro 153 diff -Naur mDNSResponder-107.6/Clients/Makefile mDNSResponder-107.6-magellan/Clients/Makefile
2     --- mDNSResponder-107.6/Clients/Makefile 2006-08-15 01:23:55.000000000 +0200
3     +++ mDNSResponder-107.6-magellan/Clients/Makefile 2007-03-31 11:45:50.000000000 +0200
4     @@ -49,12 +49,16 @@
5    
6     #############################################################################
7    
8     -# On OS X the dns_sd library functions are included in libSystem, which is implicitly linked with every executable
9     -# If /usr/lib/libSystem.dylib exists, then we're on OS X, so we don't need also to link the "dns_sd" shared library
10     -ifneq "$(wildcard /usr/lib/libSystem.dylib)" ""
11     -LIBS =
12     -else
13     -LIBS = -L../mDNSPosix/build/prod/ -ldns_sd
14     +ifneq "$(wildcard ../mDNSPosix/build/prod/libdns_sd.*)" ""
15     + LIBS ?= -L../mDNSPosix/build/prod/ -ldns_sd
16     +endif
17     +
18     +ifneq "$(wildcard ../mDNSPosix/build/debug/libdns_sd.*)" ""
19     + LIBS ?= -L../mDNSPosix/build/debug/ -ldns_sd
20     +endif
21     +
22     +ifneq "$(wildcard /usr/lib/libdns_sd.*)" ""
23     + LIBS ?= -ldns_sd
24     endif
25    
26     targets: build/dns-sd
27     @@ -66,4 +70,4 @@
28     mkdir build
29    
30     build/dns-sd: build dns-sd.c
31     - cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -o $@
32     + $(CC) $(CFLAGS_OPT) $(LDFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -o $@
33     diff -Naur mDNSResponder-107.6/mDNSPosix/Makefile mDNSResponder-107.6-magellan/mDNSPosix/Makefile
34     --- mDNSResponder-107.6/mDNSPosix/Makefile 2006-06-21 01:07:04.000000000 +0200
35     +++ mDNSResponder-107.6-magellan/mDNSPosix/Makefile 2007-03-31 12:00:02.000000000 +0200
36     @@ -431,13 +431,13 @@
37     endif
38     endif
39    
40     -CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG)
41     +CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG) $(OPT_CFLAGS)
42    
43     #############################################################################
44    
45     all: setup Daemon libdns_sd Clients SAClient SAResponder SAProxyResponder Identify NetMonitor dnsextd $(OPTIONALTARG)
46    
47     -install: setup InstalledDaemon InstalledStartup InstalledLib InstalledManPages InstalledClients $(OPTINSTALL)
48     +install: setup InstalledDaemon InstalledLib InstalledManPages InstalledClients $(OPTINSTALL)
49    
50     # 'setup' sets up the build directory structure the way we want
51     setup:
52     @@ -493,43 +493,39 @@
53     #############################################################################
54    
55     # The Install targets place built stuff in their proper places
56     -InstalledDaemon: $(INSTBASE)/sbin/mdnsd
57     +InstalledDaemon: $(DESTDIR)$(INSTBASE)/sbin/mdnsd
58     @echo $+ " installed"
59    
60     -InstalledLib: $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(INSTBASE)/include/dns_sd.h
61     +InstalledLib: $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/include/dns_sd.h
62     @echo $+ " installed"
63    
64     -InstalledStartup: $(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME)
65     +InstalledStartup: $(DESTDIR)$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME)
66     @echo $+ " installed"
67    
68     -InstalledManPages: $(MANPATH)/man8/mdnsd.8
69     +InstalledManPages: $(DESTDIR)$(MANPATH)/man8/mdnsd.8
70     @echo $+ " installed"
71    
72     -InstalledClients: $(INSTBASE)/bin/dns-sd
73     +InstalledClients: $(DESTDIR)$(INSTBASE)/bin/dns-sd
74     @echo $+ " installed"
75    
76     -InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8
77     +InstalledNSS: $(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME) $(DESTDIR)/etc/nss_mdns.conf $(DESTDIR)$(MANPATH)/man5/nss_mdns.conf.5 $(DESTDIR)$(MANPATH)/man8/libnss_mdns.8
78     @echo $+ " installed"
79    
80     # Note: If daemon already installed, we make sure it's stopped before overwriting it
81     -$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd
82     +$(DESTDIR)$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd
83     @if test -x $@; then $(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME) stop; fi
84     $(CP) $< $@
85    
86     -$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
87     +$(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
88     $(CP) $< $@
89     - $(LN) $@ $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX)
90     -ifdef LDCONFIG
91     - # -m means 'merge into existing database', -R means 'rescan directories'
92     - $(LDCONFIG) -mR
93     -endif
94     + $(LN) libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX)
95    
96     -$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h
97     +$(DESTDIR)$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h
98     $(CP) $< $@
99    
100     # We make this target dependent on $(INSTBASE)/sbin/mdnsd because we need to ensure
101     # that the daemon is installed *before* we try to execute the command to start it.
102     -$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR) $(INSTBASE)/sbin/mdnsd
103     +$(DESTDIR)$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR)
104     $(CP) $< $@
105     chmod ugo+x $@
106     $@ start
107     @@ -546,36 +542,32 @@
108     endif
109     endif
110    
111     -$(MANPATH)/man5/%.5: %.5
112     +$(DESTDIR)$(MANPATH)/man5/%.5: %.5
113     cp $< $@
114     chmod 444 $@
115    
116     -$(MANPATH)/man8/%.8: %.8
117     +$(DESTDIR)$(MANPATH)/man8/%.8: %.8
118     cp $< $@
119     chmod 444 $@
120    
121     -$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8
122     +$(DESTDIR)$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8
123     cp $< $@
124     chmod 444 $@
125    
126     -$(INSTBASE)/bin/dns-sd: ../Clients/build/dns-sd
127     +$(DESTDIR)$(INSTBASE)/bin/dns-sd: ../Clients/build/dns-sd
128     + mkdir $(DESTDIR)$(INSTBASE)/bin
129     $(CP) $< $@
130    
131     -$(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE)
132     - $(LN) $< $@
133     - ldconfig
134     +$(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME): $(DESTDIR)$(NSSINSTPATH)/$(NSSLIBFILE)
135     + $(LN) $(NSSLIBFILE) $@
136    
137     -$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE)
138     +$(DESTDIR)$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE)
139     $(CP) $< $@
140     chmod 444 $@
141    
142     -/etc/nss_mdns.conf: nss_mdns.conf
143     +$(DESTDIR)/etc/nss_mdns.conf: nss_mdns.conf
144     $(CP) $< $@
145     chmod 444 $@
146     - # Check the nsswitch.conf file.
147     - # If 'mdns' does not already appear on the "hosts:" line, then add it right before 'dns'
148     - cp -f /etc/nsswitch.conf /etc/nsswitch.conf.pre-mdns
149     - sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' /etc/nsswitch.conf.pre-mdns > /etc/nsswitch.conf
150    
151     #############################################################################
152