File: rules

package info (click to toggle)
xotcl 0.85.3-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,832 kB
  • ctags: 2,734
  • sloc: ansic: 18,065; tcl: 1,256; makefile: 653; sh: 430
file content (133 lines) | stat: -rwxr-xr-x 5,369 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
#!/usr/bin/make -f

export DH_COMPAT=2

configure: configure-stamp
configure-stamp:
	dh_testdir
	autoconf
	./configure --prefix=/usr --exec-prefix=/usr --without-gdbm --with-tcl=/usr/include/tcl8.3,/usr/lib/tcl8.3 --with-tk=/usr/include/tcl8.3,/usr/lib/tk8.3

	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	chmod u+x lib/system/make.xotcl
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f doc/JufGdbmStorage-xotcl.html doc/MemStorage-xotcl.html \
	  doc/Persistence-test.html doc/Persistence-xotcl.html \
	  doc/Script-xotcl.html doc/Serializer-xotcl.html \
	  doc/Storage-xotcl.html doc/TclGdbmStorage-xotcl.html \
	  doc/TextFileStorage-xotcl.html doc/TraceStorage-xotcl.html \
	  doc/UNIVERSAL-xotcl.html doc/adapter-xotcl.html \
	  doc/adapterExample-xotcl.html doc/composite-xotcl.html \
	  doc/compositeExample-xotcl.html doc/ftp-xotcl.html \
	  doc/htmllib-xotcl.html doc/index.html doc/langRef-xotcl.html \
	  doc/link-checker-xotcl.html doc/makeDoc-xotcl.html \
	  doc/metadataAnalyzer-xotcl.html doc/mixinStrategy-xotcl.html \
	  doc/observer-xotcl.html doc/package-xotcl.html \
	  doc/persistenceExample-xotcl.html doc/pinger-xotcl.html \
	  doc/secure-webclient-xotcl.html doc/secure-webserver-xotcl.html \
	  doc/simpleFilters-xotcl.html doc/soccerClub-xotcl.html \
	  doc/speedtest-xotcl.html doc/staticMetadata-xotcl.html \
	  doc/testo-xotcl.html doc/testx-xotcl.html doc/trace-xotcl.html \
	  doc/webclient-xotcl.html doc/webserver-xotcl.html \
	  doc/xocomm-test.html doc/xodoc-xotcl.html \
	  doc/make-xotcl.html doc/xo-daemon.html doc/xo-whichPkg.html \
	  doc/parameter-xotcl.html
	rm -f lib/xml/libtclexpat.so
	rm -f xotcl.spec
	rm -f build-stamp configure-stamp

	-$(MAKE) clean

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) install prefix=`pwd`/debian/xotcl/usr exec_prefix=`pwd`/debian/xotcl/usr MAN_INSTALL_DIR=`pwd`/debian/xotcl/usr/share/man
	# Fix pkgIndex
	(cd debian/xotcl/usr/lib/xotcl-0.85 ; echo "pkg_mkIndex -verbose ." | ../../bin/xotclsh)
	# Clean up junk after xotcl build
	-rm debian/xotcl/usr/lib/xotcl/system/make.xotcl
	-rm debian/xotcl/usr/lib/xotcl/system/pkgIndex-package.add \
	  debian/xotcl/usr/lib/xotcl/store/pkgIndex-gdbm.add debian/xotcl/usr/lib/xotcl/store/pkgIndex-sdbm.add
	rm -r debian/xotcl/usr/lib/xotcl-0.85/xml/TclExpat-1.1
	rm debian/xotcl/usr/lib/xotcl-0.85/xml/libtclexpat.so
	# fix shebang invocations
	(find debian/ -name \*.xotcl -type f -print | xargs grep -nH \
	  '^\#\!\(/usr/local/bin/\|\(\.\./\)\+src/\)xotclsh' | \
	  grep '.*:1:.*' | cut -d: -f1 | while read i ; do sed -e \
	  '1s@\#\!\(/usr/local/bin/\|\(\.\./\)\+src/\)xotclsh@\#\!/usr/bin/xotclsh@' \
	  $$i > $${i}.tmp && mv $${i}.tmp $$i ; chmod u+x $$i ; done )
	(for j in \
	  debian/xotcl/usr/bin/xo-whichPkg \
	  debian/xotcl/usr/bin/xo-daemon ; \
	  do sed -e '1s@\#\!.*/xotclsh@\#\!/usr/bin/xotclsh@' \
	  $$j > $${j}.tmp && mv $${j}.tmp $$j ; done)
	(mv debian/xotcl/usr/bin/xo-daemon \
	  debian/xotcl/usr/bin/xo-daemon.old && sed -e \
	  's@(set ::xotclsh )/usr/local/bin/xotclsh@$1 /usr/bin/xotclsh@' \
	  < debian/xotcl/usr/bin/xo-daemon.old \
	  > debian/xotcl/usr/bin/xo-daemon && \
	  rm debian/xotcl/usr/bin/xo-daemon.old)
	# do not install files as executable if they are not
	chmod 644 debian/xotcl/usr/lib/xotcl-0.85/apps/comm/webclient.xotcl
	chmod 644 debian/xotcl/usr/lib/xotcl-0.85/system/testo.xotcl
	# install executable scripts as executable
	chmod 755 debian/xotcl/usr/bin/xo-daemon
	chmod 755 debian/xotcl/usr/bin/xo-whichPkg
	# Install files for xotcl-dev
	#install -m 0644 -o root -g root doc/*.html doc/*.gif doc/*.jpg debian/xotcl-dev/usr/share/doc/xotcl-dev/
	install -m 0644 -o root -g root debian/xotcl/usr/lib/xotcl-0.85/doc/*.html debian/xotcl-dev/usr/share/doc/xotcl-dev/
	install -m 0644 -o root -g root debian/xotcl/usr/lib/xotcl-0.85/doc/*.jpg debian/xotcl-dev/usr/share/doc/xotcl-dev/
	install -m 0644 -o root -g root debian/xotcl/usr/lib/xotcl-0.85/doc/*.gif debian/xotcl-dev/usr/share/doc/xotcl-dev/
	install -m 0755 -d -o root -g root debian/xotcl-dev/usr/lib/xotcl-0.85
	install -m 0644 -o root -g root debian/xotcl/usr/lib/xotcl-0.85/libxotcl.a debian/xotcl-dev/usr/lib/xotcl-0.85/
	install -m 0755 -d -o root -g root debian/xotcl-dev/usr/include/xotcl
	install -m 0644 -o root -g root debian/xotcl/usr/include/xotcl*.h debian/xotcl-dev/usr/include/xotcl/
	rm -r debian/xotcl/usr/lib/xotcl-0.85/doc/
	rm debian/xotcl/usr/lib/xotcl-0.85/libxotcl.a
	-rm debian/xotcl/usr/include/xotcl*.h
	rmdir debian/xotcl/usr/include
	# remove symlinks and fix executable names
	rm debian/xotcl/usr/bin/xotclsh debian/xotcl/usr/bin/xowish
	mv debian/xotcl/usr/bin/xotclsh-0.85 debian/xotcl/usr/bin/xotclsh
	mv debian/xotcl/usr/bin/xowish-0.85 debian/xotcl/usr/bin/xowish


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_undocumented xo-daemon.1 xo-whichPkg.1
	dh_installchangelogs ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure