File: rules

package info (click to toggle)
crossvc 1.5.0-1%2Betch1
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 8,116 kB
  • ctags: 4,451
  • sloc: cpp: 37,016; ansic: 328; sh: 216; makefile: 92; xml: 19
file content (99 lines) | stat: -rwxr-xr-x 2,659 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpatch/dpatch.make

CXXFLAGS = -Wall -g -pipe -W -DUSE_FAM -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED
INSTALL = install
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CXXFLAGS += -O0
else
CXXFLAGS += -O2
endif

export QTDIR=/usr/share/qt3

manpage: debian/crossvc.1
debian/crossvc.1: CrossVC/crossvc.bin
	help2man -n "A graphical CVS frontend" --no-info $< > $@

configure: configure-stamp
configure-stamp: patch-stamp
	dh_testdir
	qmake -o Makefile lincvs.pro
	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	$(MAKE) "CXXFLAGS=$(CXXFLAGS)"
	touch build-stamp

clean-patched:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp 
	dh_clean
	-test -f Makefile && $(MAKE) distclean

	# clean up files not handled by distclean
	rm -rf .moc .obj .ui
	rm -f Makefile
	rm -f CrossVC/crossvc.bin
	rm -rf CrossVC/Tools CrossVC/Help
	find CrossVC/Messages -name '*.qm' -a ! -name 'dummy.qm' -print0 \
		| xargs -r0 rm -f
	rm -f debian/crossvc.1

	# clean up rshwrapper
	cd contrib/rshwrapper && make clean

	# clean up ssh-askpass
	-cd contrib/ssh-askpass && ( test -f Makefile && $(MAKE) distclean ; \
	                             rm -rf .moc .obj .ui Makefile ssh-askpass.bin )

clean: clean-patched unpatch

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) install
	$(INSTALL_FILE) CrossVC/Messages/*.qm $(CURDIR)/debian/crossvc/usr/lib/crossvc
	$(INSTALL_PROGRAM) CrossVC/crossvc.bin $(CURDIR)/debian/crossvc/usr/bin/crossvc
	$(INSTALL_PROGRAM) CrossVC/Tools/rshwrapper $(CURDIR)/debian/crossvc/usr/lib/crossvc/rshwrapper
	$(INSTALL_PROGRAM) CrossVC/Tools/ssh-askpass.bin $(CURDIR)/debian/crossvc/usr/lib/crossvc/ssh-askpass
	$(INSTALL_SCRIPT) CrossVC/Tools/start-ssh-agent.sh $(CURDIR)/debian/crossvc/usr/lib/crossvc/start-ssh-agent.sh
	rm -f CrossVC/Tools/start-ssh-agent.sh
	$(INSTALL_FILE) CrossVC/AppIcon.xpm $(CURDIR)/debian/crossvc/usr/share/pixmaps/lincvs-16.xpm

binary-indep: build install

binary-arch: build install manpage
	dh_testdir
	dh_testroot

	dh_installdocs
	dh_installexamples CrossVC/Tools/*.sh
	dh_installmenu
	dh_installman
	dh_installchangelogs ChangeLog
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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