File: rules

package info (click to toggle)
aplus-fsf 4.22.1-9
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 23,288 kB
  • sloc: cpp: 176,661; ansic: 27,023; sh: 6,313; makefile: 2,603; lisp: 2,151; perl: 704
file content (217 lines) | stat: -rwxr-xr-x 4,962 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#!/usr/bin/make -f

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

default: build

autoinit:
	./bootstrap.sh

clean-stamp:
	rm -f configure-stamp build-stamp install-stamp \
	xfonts-kapl-stamp aplus-fsf-el-stamp aplus-fsf-doc-stamp \
	aplus-fsf-stamp aplus-fsf-dev-stamp

clean: clean-stamp
	dh_testdir
	rm -f debian/buildinfo
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f print.ps
	dh_clean
# See /usr/share/doc/autotools-dev/README.Debian.gz
	-test -r /usr/share/misc/config.sub && \
		cp -f /usr/share/misc/config.sub config/config.sub
	-test -r /usr/share/misc/config.guess && \
		cp -f /usr/share/misc/config.guess config/config.guess

# Build with gcc/g++ 6
export CC = gcc-6
export CXX = g++-6

confflags = --prefix=/usr --libdir=/usr/lib/aplus-fsf --x-includes=/usr/include --x-libraries=/usr/lib

export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

# see /usr/share/doc/autotools-dev/README.Debian
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
	confflags += --build $(DEB_HOST_GNU_TYPE)
else
	confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif


configure: configure-stamp
configure-stamp:
	dh_testdir
	dh_buildinfo generate cat
# Add here commands to configure the package.
	./configure $(confflags)
	touch $@

CFLAGS := -g -pipe -std=gnu++98
CXXFLAGS := -g -pipe -std=gnu++98
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -O0
  CXXFLAGS += -O0
else
  CFLAGS += -O2
  CXXFLAGS += -O2
endif
export CFLAGS
export CXXFLAGS
export LDFLAGS

build-stamp: configure
	dh_testdir
	$(MAKE)
	touch $@

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

# CURDIR is set by make
DESTDIR = $(CURDIR)/debian/tmp
export DESTDIR # so it gets passed to sub-makes

install_	:= install -o root -g root -p
install_data	:= install -o root -g root -m 644 -p
install_script	:= install -o root -g root -m 755 -p
install_program	:= install -o root -g root -m 755 -p
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  install_program += --strip
endif
inst_flags := INSTALL='$(install_)'
inst_flags += INSTALL_DATA='$(install_data)'
inst_flags += INSTALL_SCRIPT='$(install_script)'
inst_flags += INSTALL_PROGRAM='$(install_program)'

# The install step can take quite a while, so use a stamp file for that to
# avoid redoing it unless necessary.
install: build install-stamp
install-stamp:
	dh_testdir
	dh_testroot
	dh_prep
# Install into DESTDIR with upstream's directory structure
	$(MAKE) install $(inst_flags)
	touch $@

binary: binary-indep binary-arch

# Architecture-independent
binary-indep: xfonts-kapl aplus-fsf-el aplus-fsf-doc

# Architecture-dependent
binary-arch: aplus-fsf aplus-fsf-dev

xfonts-kapl: install xfonts-kapl-stamp
aplus-fsf-el: install aplus-fsf-el-stamp
aplus-fsf-doc: install aplus-fsf-doc-stamp
aplus-fsf: install aplus-fsf-stamp
aplus-fsf-dev: install aplus-fsf-dev-stamp

export DH_OPTIONS

%-stamp: DH_OPTIONS=-p$(@:%-stamp=%)

xfonts-kapl-stamp:
	dh_testdir
	dh_testroot
	rm -fr debian/xfonts-kapl/ debian/xfonts-kapl.*.debhelper
	dh_installdirs
# Alias file must be <package>.alias; dh_install cannot rename
	cd $(DESTDIR)/usr/fonts/X11/pcf && cp -p Kapl.alias xfonts-kapl.alias
	dh_install
	dh_installdocs
	dh_installchangelogs ChangeLog
	dh_installxfonts
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb
	touch $@

aplus-fsf-el-stamp:
	dh_testdir
	dh_testroot
	rm -fr debian/aplus-fsf-el/ debian/aplus-fsf-el.*.debhelper
	#dh_installdirs
	#dh_install
	dh_installdocs
	#dh_installemacsen --flavor=xemacs21
	dh_installchangelogs ChangeLog
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb
	touch $@

aplus-fsf-doc-stamp:
	dh_testdir
	dh_testroot
	rm -fr debian/aplus-fsf-doc/ debian/aplus-fsf-doc.*.debhelper
	dh_installdirs
	dh_install
	dh_installdocs
	dh_installchangelogs ChangeLog
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb
	touch $@

aplus-fsf-stamp:
	dh_testdir
	dh_testroot
	rm -fr debian/aplus-fsf/ debian/aplus-fsf.*.debhelper
	dh_installdirs
	dh_install
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installman
	dh_installchangelogs ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps -- -v debian/aplus-fsf/usr/bin/a+
	dh_gencontrol
	dh_md5sums
	dh_builddeb
	touch $@

aplus-fsf-dev-stamp:
	dh_testdir
	dh_testroot
	rm -fr debian/aplus-fsf-dev/ debian/aplus-fsf-dev.*.debhelper
	dh_installdirs
	dh_install
	dh_installdocs
	dh_installchangelogs ChangeLog
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb
	touch $@

.PHONY: configure build install binary-indep binary-arch binary clean \
xfonts-kapl aplus-fsf-el aplus-fsf-doc aplus-fsf aplus-fsf-dev

# Local Variables:
# compile-command: "cd .. && dpkg-buildpackage -uc -us"
# End: