Magellan Linux

Contents of /trunk/mdnsresponder/patches/mdnsresponder-108.6-magellan.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 489 - (show annotations) (download)
Thu Feb 14 17:50:33 2008 UTC (16 years, 3 months ago) by niro
File size: 4981 byte(s)
-re-diffed against 108.6

1 diff -Naur mDNSResponder-108.6/Clients/Makefile mDNSResponder-108.6-magellan/Clients/Makefile
2 --- mDNSResponder-108.6/Clients/Makefile 2004-09-24 23:15:26.000000000 +0200
3 +++ mDNSResponder-108.6-magellan/Clients/Makefile 2008-02-14 18:34:45.000000000 +0100
4 @@ -49,11 +49,16 @@
5 #############################################################################
6
7
8 -# If library /usr/lib/libdns_sd.* exists, then link it
9 +ifneq "$(wildcard ../mDNSPosix/build/prod/libdns_sd.*)" ""
10 + LIBS ?= -L../mDNSPosix/build/prod/ -ldns_sd
11 +endif
12 +
13 +ifneq "$(wildcard ../mDNSPosix/build/debug/libdns_sd.*)" ""
14 + LIBS ?= -L../mDNSPosix/build/debug/ -ldns_sd
15 +endif
16 +
17 ifneq "$(wildcard /usr/lib/libdns_sd.*)" ""
18 -LIBS = -ldns_sd
19 -else
20 -LIBS =
21 + LIBS ?= -ldns_sd
22 endif
23
24 targets: build/dns-sd
25 @@ -65,4 +70,4 @@
26 mkdir build
27
28 build/dns-sd: build dns-sd.c
29 - cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -o $@
30 + $(CC) $(CFLAGS_OPT) $(LDFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -o $@
31 diff -Naur mDNSResponder-108.6/mDNSPosix/Makefile mDNSResponder-108.6-magellan/mDNSPosix/Makefile
32 --- mDNSResponder-108.6/mDNSPosix/Makefile 2005-10-26 01:55:47.000000000 +0200
33 +++ mDNSResponder-108.6-magellan/mDNSPosix/Makefile 2008-02-14 18:51:53.000000000 +0100
34 @@ -395,13 +395,13 @@
35 endif
36 endif
37
38 -CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG)
39 +CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG) $(OPT_CFLAGS)
40
41 #############################################################################
42
43 all: setup Daemon libdns_sd Client Responder ProxyResponder Identify NetMonitor dnsextd $(OPTIONALTARG)
44
45 -install: setup InstalledDaemon InstalledLib InstalledStartup InstalledManPages $(OPTINSTALL)
46 +install: setup InstalledDaemon InstalledLib InstalledManPages $(OPTINSTALL)
47
48 # 'setup' sets up the build directory structure the way we want
49 setup:
50 @@ -450,36 +450,32 @@
51 #############################################################################
52
53 # The Install targets place built stuff in their proper places
54 -InstalledDaemon: $(INSTBASE)/sbin/mdnsd
55 +InstalledDaemon: $(DESTDIR)$(INSTBASE)/sbin/mdnsd
56 @echo $+ " installed"
57
58 -InstalledLib: $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(INSTBASE)/include/dns_sd.h
59 +InstalledLib: $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/include/dns_sd.h
60 @echo $+ " installed"
61
62 -InstalledStartup: $(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME)
63 +InstalledStartup: $(DESTDIR)$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME)
64 @echo $+ " installed"
65
66 -InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8
67 +InstalledNSS: $(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME) $(DESTDIR)/etc/nss_mdns.conf $(DESTDIR)$(MANPATH)/man5/nss_mdns.conf.5 $(DESTDIR)$(MANPATH)/man8/libnss_mdns.8
68 @echo $+ " installed"
69
70 -InstalledManPages: $(MANPATH)/man8/mdnsd.8
71 +InstalledManPages: $(DESTDIR)$(MANPATH)/man8/mdnsd.8
72 @echo $+ " installed"
73
74 -$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd
75 +$(DESTDIR)$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd
76 $(CP) $< $@
77
78 -$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
79 +$(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
80 $(CP) $< $@
81 - $(LN) $@ $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX)
82 -ifdef LDCONFIG
83 - # -m means 'merge into existing database', -R means 'rescan directories'
84 - $(LDCONFIG) -mR
85 -endif
86 + $(LN) libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX)
87
88 -$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h
89 +$(DESTDIR)$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h
90 $(CP) $< $@
91
92 -$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR)
93 +$(DESTDIR)$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR)
94 $(CP) $< $@
95 chmod ugo+x $@
96 ifdef RUNLEVELSCRIPTSDIR
97 @@ -495,31 +491,26 @@
98 endif
99 endif
100
101 -$(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE)
102 - $(LN) $< $@
103 - ldconfig
104 +$(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME): $(DESTDIR)$(NSSINSTPATH)/$(NSSLIBFILE)
105 + $(LN) $(NSSLIBFILE) $@
106
107 -$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE)
108 +$(DESTDIR)$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE)
109 $(CP) $< $@
110 chmod 444 $@
111
112 -/etc/nss_mdns.conf: nss_mdns.conf
113 +$(DESTDIR)/etc/nss_mdns.conf: nss_mdns.conf
114 $(CP) $< $@
115 chmod 444 $@
116 - # Check the nsswitch.conf file.
117 - # If 'mdns' does not already appear on the "hosts:" line, then add it right before 'dns'
118 - cp -f /etc/nsswitch.conf /etc/nsswitch.conf.pre-mdns
119 - sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' /etc/nsswitch.conf.pre-mdns > /etc/nsswitch.conf
120
121 -$(MANPATH)/man5/%.5: %.5
122 +$(DESTDIR)$(MANPATH)/man5/%.5: %.5
123 cp $< $@
124 chmod 444 $@
125
126 -$(MANPATH)/man8/%.8: %.8
127 +$(DESTDIR)$(MANPATH)/man8/%.8: %.8
128 cp $< $@
129 chmod 444 $@
130
131 -$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8
132 +$(DESTDIR)$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8
133 cp $< $@
134 chmod 444 $@
135