File: rules

package info (click to toggle)
xpcd 2.04-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 624 kB
  • ctags: 556
  • sloc: ansic: 6,313; makefile: 217; sh: 200; perl: 12
file content (147 lines) | stat: -rwxr-xr-x 3,333 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
#!/usr/bin/make -f
#
# debian/rules file for xpcd.
#
# Copyright 1997 Stephan Alexander Suerken <absurd@debian.org>.
#

#
# CONFIGURATION
#
export DH_VERBOSE=1

#
# PACKAGE PART
#
xpcd_confdir=etc/X11/

#
# GENERIC PART
#
# build should always be the default target
default: build
build: build-stamp

binary:	binary-clean binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

.PHONY: binary binary-arch binary-indep clean binary-clean

#
# PACKAGE PART
#

build-stamp:
	dh_testdir
#
# Note: Don't recreate ./configure -- or if needed, use "make autoconf" rather
# than autoconf itself (strange gimp recognition problem).
#

#
# "Unusual Source Dependencies" (afaik):
# -libgtk and the gimp libraries (for the gimp-gate)
# -svgalib (for gimp-svga)
# -libtiff and libjpeg (optional, adds functionality to the internal viewer)

	./configure --prefix=usr/X11R6
# this should build everything
# 
# HACK:
# For reasons unknown to me, libgtk-dev puts the needed glibconfig.h
# into "/usr/lib/glib/include/" (only relevant for the gimp plugin); I
# change this here by expanding the env rather than changing the upstream.

	export C_INCLUDE_PATH="${C_INCLUDE_PATH}:/usr/lib/glib/include/" && make
	touch $@

binary-indep: build
#	dh_testdir
#	dh_testroot
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: build
	dh_testdir
	dh_testroot

# Installing xpcd (Makefile is NOT a standard GNU automake makefile)
# BUILD_ROOT must not be relative!
	make install BUILD_ROOT=`pwd`/debian/tmp/

#
# Add a Icon for the Debian Menu System xpcd.xpm
#
	cp debian/xpcd-menu.xpm debian/tmp/usr/X11R6/include/X11/pixmaps/

#
# Fixing wrongly placed binaries (from /usr/X11R6/bin to /usr/bin/)
#
	install -d debian/tmp/usr/bin
	mv debian/tmp/usr/X11R6/bin/pcdtoppm debian/tmp/usr/bin/
	mv debian/tmp/usr/X11R6/bin/pcdview debian/tmp/usr/bin/

#
# Fixing wrongly placed sysrc (from usr/X11R6/lib/X11/xpcd/system.xpcdrc /usr/X11R6/bin to /usr/bin/)
#
	install -d debian/tmp/${xpcd_confdir}
	mv debian/tmp/usr/X11R6/lib/X11/xpcd debian/tmp/${xpcd_confdir}

#
# Add Debian pcdview wrapper
#
	cp debian/pcdview_photocd debian/tmp/usr/bin/

#
# Debhelper processing
#

# auto: debian/copyright debian/README.Debian debian/TODO
	dh_installdocs README xpcd.lsm linux/

# auto: %
	dh_installexamples
# auto: %; menu menu-method --or-- package.menu package.menu-method
	dh_installmenu
#	dh_installcron
# auto: all found man pages; exclude args
	dh_installmanpages -pxpcd pcdview.1 pcdview_photocd.1
	dh_installmanpages -pxpcd-svga xpcd.1x pcdtoppm.1

# auto: debian/changelog
	dh_installchangelogs

	dh_movefiles
#
# Removing left-over usr/lib/gimp/* (maybe dh_movefiles should remove empty dirs?)
#
	rm -rf debian/tmp/usr/lib/gimp

	dh_strip
	dh_compress
	dh_fixperms

# register xpcd-svga
	dh_suidregister

	dh_installdeb
# dependencies for binaries (Xaw3d doesn't work; added manually to control until fix)
	dh_shlibdeps
	dh_gencontrol
#	dh_makeshlibs
	dh_md5sums
	dh_builddeb

binary-clean:
	dh_testdir
	dh_clean
	-rm -rf debian/tmp debian/xpcd-svga debian/xpcd-gimp debian/files*

clean: binary-clean
	dh_testdir
# xpcd calls distclean realclean ... 
	-make realclean
	-rm -f build-stamp `find . -name "*~"`