File: oldrules

package info (click to toggle)
orbit 0.5.0-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,604 kB
  • ctags: 4,626
  • sloc: ansic: 37,930; sh: 7,508; yacc: 1,750; makefile: 877; lex: 366
file content (224 lines) | stat: -rw-r--r-- 6,117 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
#!/usr/bin/make -f

i=$(shell pwd)/debian/tmp
b=$(shell pwd)/debian/build

debian/rules: debian/*.in debian/debconfigure
	@echo "--- Running debconfigure"
	cd debian ; chmod +x debconfigure ; ./debconfigure

configure: patched-stamp configure.in
	@echo "--- Making configure script and configuring"
	chmod +x autogen.sh
	./autogen.sh --prefix=/usr --with-gtk-prefix=/usr \
	  --sysconfdir=/etc/orbit

Makefile: configure
	@echo "--- Configuring"
	./configure --prefix=/usr --with-gtk-prefix=/usr \
	  --sysconfdir=/etc/orbit

build: configure Makefile build-debstamp
build-debstamp:
	@echo "--- Compiling"
	dh_testdir
ifneq (,snap-)
	sed < libtool > libtool-2 \
	  -e 's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/' \
	  -e '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
	mv libtool-2 libtool
endif
	$(MAKE) all
	touch build-debstamp

clean: configure Makefile
	@echo "--- Cleaning"
	dh_testdir
	dh_clean
	-rm -rf static shared
	-rm -f build-debstamp install-debstamp
	(cd popt; make)
	(cd libIDL; make)
	(cd src/idl-compiler; make)
	$(MAKE) -f debian/rules reverse-patches
	-$(MAKE) distclean
	find . -type l | xargs rm -f
	find . -name 'Makefile.in' | xargs rm -f
	rm -f aclocal.m4 config.guess config.h.in config.sub configure ltconfig ltmain.sh
	cd libIDL; rm -f aclocal.m4 config.guess config.sub configure lexer.c libIDL.info \
			ltconfig ltmain.sh parser.c parser.h libIDLConf.sh stamp-parser
	cd popt; rm -f aclocal.m4 config.guess config.sub configure \
			ltconfig ltmain.sh libtool Makefile Makefile.in \
			config.h.in
	cd src/daemons/interface_repository; \
		rm -f *-common.c *-skels.c *-stubs.c *.h
	cd src/services/event; \
		rm -f *-common.c *-skels.c *-stubs.c *.h
	cd src/services/name; \
		rm -f *-common.c *-skels.c *-stubs.c \
			CosNaming.h
	cd src/services/time; \
		rm -f Makefile
	cd src/orb; \
		rm -f *-common.c *-skels.c *-stubs.c \
			interface_repository*.h
	cd test; \
		rm -f *-common.c *-skels.c *-stubs.c \
			echo.h test*.h
	-rm -f `find . -name "*~"`
	-rm -rf `find . -name "\.deps"`
	-rm -rf `find . -name "\.libs"`
	-rm -rf `find . -name "*\.rej"`
	-rm -rf debian/tmp `find debian/* -type d ! -name CVS ! -name patches` debian/files* core
	-rm -rf libIDL/y.output test/echo-impl.c 
	-rm -f debian/*substvars
	-find . -user root | xargs -r chown $(LOGNAME)

install: build install-debstamp
install-debstamp:
	@echo "--- Installing"
	dh_testdir
	dh_testroot
	dh_clean
	rm -rf $(b)
	$(MAKE) install prefix=$(i)/usr exec_prefix=$(i)/usr \
	  sysconfdir=$(i)/etc/orbit
	touch install-debstamp

install-save: install
	rm -rf $(i).saved
	cp -a $(i) $(i).saved

install-saved:
	rm -rf $(i)
	cp -a $(i).saved $(i)
	rm -rf $(b)
	touch install-debstamp

binary-indep: build install

binary-arch: build install \
		liborbit0 \
		liborbit-dev \
		orbit 

#
# liborbit0
#


liborbit0: install
	@echo "--- Building: $@"
	dh_installdocs       -p$@ -P$(b)/$@ README NEWS AUTHORS TODO
	dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog
	dh_movefiles         -p$@ -P$(b)/$@
	dh_strip             -p$@ -P$(b)/$@ 
	dh_compress          -p$@ -P$(b)/$@ 
	dh_fixperms          -p$@ -P$(b)/$@ 
	dh_installdeb        -p$@ -P$(b)/$@
	LD_LIBRARY_PATH=$(b)/liborbit0/usr/lib \
	dh_shlibdeps         -p$@ -P$(b)/$@
	dh_gencontrol        -p$@ -P$(b)/$@
	dh_makeshlibs        -p$@ -P$(b)/$@ -V
	dh_md5sums           -p$@ -P$(b)/$@
	dh_builddeb          -p$@ -P$(b)/$@
 
#
# liborbit-dev
#

liborbit-dev: install
	@echo "--- Building: $@"
	mkdir -p $(b)/$@/usr/doc
	cd $(b)/$@/usr/doc; ln -s liborbit0 $@	
	dh_movefiles         -p$@ -P$(b)/$@
	dh_strip             -p$@ -P$(b)/$@ 
	dh_compress          -p$@ -P$(b)/$@ 
	dh_fixperms          -p$@ -P$(b)/$@ 
	dh_installdeb        -p$@ -P$(b)/$@
	dh_shlibdeps         -p$@ -P$(b)/$@
	dh_gencontrol        -p$@ -P$(b)/$@
	dh_makeshlibs        -p$@ -P$(b)/$@
	dh_md5sums           -p$@ -P$(b)/$@
	dh_builddeb          -p$@ -P$(b)/$@

#
# orbit
#

orbit: install
	@echo "--- Building: $@"
	mkdir -p $(b)/$@/usr/doc
	cd $(b)/$@/usr/doc; ln -s liborbit0 $@	
	dh_movefiles         -p$@ -P$(b)/$@
	dh_strip             -p$@ -P$(b)/$@ 
	dh_compress          -p$@ -P$(b)/$@ 
	dh_fixperms          -p$@ -P$(b)/$@ 
	dh_installdeb        -p$@ -P$(b)/$@
	LD_LIBRARY_PATH=$(b)/liborbit0/usr/lib \
	dh_shlibdeps         -p$@ -P$(b)/$@
	dh_gencontrol        -p$@ -P$(b)/$@
ifneq (,snap-)
	dh_undocumented      -p$@ -P$(b)/$@ \
				orbit-idl.1 \
				orbit-ird.1 \
				orbit-config.1 \
				name-client.1 \
				orbit-name-server.1 \
				old-name-server.1 \
				orbit-event-server.1
endif
	dh_md5sums           -p$@ -P$(b)/$@
	dh_builddeb          -p$@ -P$(b)/$@

binary: binary-indep binary-arch
.PHONY: binary clean binary-indep binary-arch build install install-save install-saved

# ---------------------------------------------------------------------------
# various rules to unpack addons and (un)apply patches.
# borrowed from egcs package

patch_dir	= debian/patches

# which patches should be applied?
ifneq (,snap-)
	debian_patches = autogen
endif

apply-patches: patched-stamp
reverse-patches:
	for stamp in none patched-*; do \
	  case "$$stamp" in none|patched-stamp|patched-\*) continue; esac; \
	  patch=`echo $$stamp | sed -e 's/patched-//'`; \
	  echo "trying to revert patch $$patch ..."; \
	  if [ -x $(patch_dir)/$$patch.dpatch ]; then true; else \
	    chmod +x $(patch_dir)/$$patch.dpatch; fi; \
	  if $(patch_dir)/$$patch.dpatch -unpatch; then \
	    echo "reverted $$patch patch."; \
	    rm -f $$stamp; \
	  else \
	    echo "error in reverting $$patch patch."; \
	    exit 1; \
	  fi; \
	done
	rm -f patched-stamp

patched-%: $(patch_dir)/%.dpatch
	if [ -x $< ]; then true; else chmod +x $<; fi
	if [ -f $@ ]; then \
	  echo "$* patches already applied."; exit 1; \
	fi
	$< -patch
	echo "$* patches applied." > $@

patched-stamp: $(foreach p,$(debian_patches),patched-$(p))
	echo -e "\nPatches applied:" >> pxxx
	for i in $(debian_patches) none; do \
	  if [ $$i != none ]; then \
	    echo -e "\n$$i:" >> pxxx; \
	    sed -n 's/^# *DP: */  /p' debian/patches/$$i.dpatch >> pxxx; \
	  fi \
	done
	mv -f pxxx patched-stamp