File: rules.old

package info (click to toggle)
tulip 3.7.0dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 39,428 kB
  • sloc: cpp: 231,403; php: 11,023; python: 1,128; sh: 671; yacc: 522; makefile: 315; xml: 63; lex: 55
file content (163 lines) | stat: -rwxr-xr-x 4,346 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# GPL'd, copyright 2002 to 2006 by Yann Dirson.
# GNU copyright 1997 to 1999 by Joey Hess.

debdir=$(CURDIR)/debian
tmpdir=${debdir}/tmp

STAMP_DIR=$(CURDIR)/stamps
BUILD_TREE=$(CURDIR)/BUILD

TULIP_VERSION = $(shell grep ^PACKAGE_VERSION= configure | cut -d= -f2)
LIBTULIP_SOVERSION=$(shell echo $(TULIP_VERSION) | cut -d. -f1-2)

ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)

# This has to be exported to make some magic below work.
export DH_OPTIONS

$(STAMP_DIR)/configure:
	dh_testdir

	mkdir -p ${BUILD_TREE}
	cd ${BUILD_TREE} && ../configure \
		--enable-tlprender --enable-stats-gui \
		--with-qt-dir=/usr/share/qt4 --prefix=/usr \
		--with-gle-includes=-I/usr/include/GL --with-gle-lib=-lgle \
		--disable-static --with-pic

		--with-ftgl-includes=-I/usr/include/FTGL --with-ftgl-lib=-lftgl_pic

#	./configure --with-qt-includes=/usr/include/qt3 \
#			--prefix=/usr --disable-static
 # Be sure MOC files are rebuilt fo current Qt version
	find -name 'moc*.cpp' | xargs rm -f

	mkdir -p $(STAMP_DIR)
	touch $(STAMP_DIR)/configure

build: $(STAMP_DIR)/build
$(STAMP_DIR)/build: $(STAMP_DIR)/configure
	dh_testdir

	$(MAKE) -C $(BUILD_TREE)
	docbook-to-man debian/tulip.sgml > debian/tulip.1

	touch $(STAMP_DIR)/build

build-doc: $(STAMP_DIR)/doc
$(STAMP_DIR)/doc: $(STAMP_DIR)/configure
	dh_testdir
	make -C $(BUILD_TREE) html
	mkdir -p $(STAMP_DIR)
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -rf $(STAMP_DIR) $(BUILD_TREE) 
	#rm -rf docs/developerHandbook/html docs/userHandbook/html

	rm -f debian/tulip.1

	dh_clean

install: DH_OPTIONS=
install: SHELL=/bin/bash
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	make install -C $(BUILD_TREE) DESTDIR=$(tmpdir)

  # handle docs if we built them
    # uncompress so dh_compress can recompress with max compression
	if test -d $(tmpdir)/usr/share/tulip/man; then \
	  ( cd $(tmpdir) && mv usr/share/tulip/man usr/share/ ); \
	  gunzip $(tmpdir)/usr/share/man/*/*gz; \
	  mv $(tmpdir)/usr/share/man/man3tulip $(tmpdir)/usr/share/man/man3 ; \
	  ( cd $(tmpdir)/usr/share/man/man3 && echo *.3tulip | while read f;\
	      do mv $$f $${f}tlp; done ); \
	  mkdir -p $(tmpdir)/usr/share/doc; \
	  ( cd $(tmpdir) && mv usr/share/tulip usr/share/doc/tulip-doc ); \
	fi

	cd $(tmpdir)/usr/lib/tlp/bitmaps && \
		ln -sf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf font.ttf && \
		ln -sf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf fontb.ttf

	dh_movefiles

  # disregard headers coming from plugins - upstream bug ?
	rm -v $(tmpdir)/usr/include/*.h
  # dispatch header files into proper -dev package
	set -e; (cd $(tmpdir)/usr/include && find . -type f) | cut -c3- | while read file; do \
	  lib=$$(cd $(BUILD_TREE) && find library -path */$$file | cut -d/ -f2); \
	  test -n "$$lib" || lib=$$(find library -path */$$file | cut -d/ -f2); \
	  if [ "$$lib" = "tulip-qt" ]; then lib=tulip-qt4; fi; \
	  pkg=lib$$lib-dev; \
	  mkdir -p $$(dirname debian/$$pkg/usr/include/$$file); \
	  mv $(tmpdir)/usr/include/$$file debian/$$pkg/usr/include/$$file; \
	done

	test -z "$$(find ${tmpdir} ! -type d | tee >(cat >&2))"

# Build architecture-independent files here.
binary-indep: DH_OPTIONS=-i
binary-indep: build-doc install
	dh_testdir
	dh_testroot

	dh_installdocs

	dh_installchangelogs 
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
	dh_testdir
	dh_testroot
#	dh_installdebconf	
	dh_installdocs README
	dh_buildinfo
#	dh_installexamples samples/[^M]*

	dh_installmenu
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
#	dh_installcron
	dh_installman debian/tulip.1
#	dh_installinfo
#	dh_undocumented
	dh_installchangelogs 
#	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
#	dh_perl
	dh_shlibdeps \
		-L libtulip-${LIBTULIP_SOVERSION} \
		-L libtulip-ogl-${LIBTULIP_SOVERSION} \
		-L libtulip-qt-${LIBTULIP_SOVERSION} \
		-l debian/libtulip-${LIBTULIP_SOVERSION}/usr/lib \
		-l debian/libtulip-ogl-${LIBTULIP_SOVERSION}/usr/lib \
		-l debian/libtulip-qt-${LIBTULIP_SOVERSION}/usr/lib
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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