File: rules

package info (click to toggle)
pcb 20110918-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 22,304 kB
  • sloc: ansic: 121,422; sh: 7,232; yacc: 5,088; pascal: 4,136; makefile: 1,535; perl: 564; lex: 438; awk: 158; lisp: 86; tcl: 63; xml: 20
file content (73 lines) | stat: -rwxr-xr-x 2,807 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
#!/usr/bin/make -f
#                                          -*- makefile -*-
# debian/rules file for the Debian/GNU Linux pcb package
# Copyright 1997-99 by Hartmut Koptein <koptein@debian.org>

package = pcb

CONFIGURE_OPTS=--disable-rpath --enable-dbus --disable-update-desktop-database --disable-update-mime-database --enable-dependency-tracking --enable-coord64 LDFLAGS="$(LDFLAGS) -Wl,--as-needed"

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure --builddirectory build_gtk -- $(CONFIGURE_OPTS) --with-gui=gtk
	dh_auto_configure --builddirectory build_lesstif -- $(CONFIGURE_OPTS) --with-gui=lesstif

override_dh_auto_build:
	dh_auto_build --builddirectory build_gtk
	dh_auto_build --builddirectory build_lesstif

override_dh_auto_test:
	dh_auto_test --builddirectory build_gtk
	dh_auto_test --builddirectory build_lesstif

override_dh_auto_install:
	dh_auto_install --builddirectory build_gtk

override_dh_auto_clean:
	dh_auto_clean --builddirectory build_gtk
	dh_auto_clean --builddirectory build_lesstif

override_dh_install:
	# Remove needlessly installed static library and header file before
	# installing common files:
	rm -rf $(CURDIR)/debian/tmp/usr/lib
	rm -rf $(CURDIR)/debian/tmp/usr/include
	dh_install -Xusr/bin -Xusr/share/pcb- -Xusr/share/doc -Xexamples -Xtutorial -Xusr/share/info

	# Install pcb-gtk binary:
	install build_gtk/src/pcb debian/$(package)-gtk/usr/bin/pcb-gtk

	# Install pcb-lesstif binary:
	install build_lesstif/src/pcb debian/$(package)-lesstif/usr/bin/pcb-lesstif

	# Set executable bit for pcb tools:
	[ ! -d debian/$(package)-common ] || chmod a+x debian/$(package)-common/usr/share/pcb/tools/MergePCBPS
	[ ! -d debian/$(package)-common ] || chmod a+x debian/$(package)-common/usr/share/pcb/tools/Merge_dimPCBPS
	[ ! -d debian/$(package)-common ] || chmod a+x debian/$(package)-common/usr/share/pcb/tools/tgo2pcb.tcl
	[ ! -d debian/$(package)-common ] || chmod a+x debian/$(package)-common/usr/share/pcb/tools/PCB2HPGL

	# Remove empty dirs:
	[ ! -d debian/$(package)-common ] || find debian/$(package)-common -type d -empty -delete

override_dh_fixperms:
	dh_fixperms
	# Fix permissions of a couple of example files:
	[ ! -d debian/$(package)-common ] || chmod -x debian/$(package)-common/usr/share/doc/$(package)-common/examples/LED.pcb
	[ ! -d debian/$(package)-common ] || chmod -x debian/$(package)-common/usr/share/doc/$(package)-common/examples/LED.net

override_dh_installexamples:
	dh_installexamples -XMakefile

override_dh_installchangelogs:
	dh_installchangelogs -p$(package)-common

override_dh_installdocs:
	# Only install docs in $(package)-common & link other packages' docs to
	# $(package)-common:
	dh_installdocs --link-doc=$(package)-common

override_dh_compress:
	# exclude example files from compression
	dh_compress -X.pcb -XLED