File: rules

package info (click to toggle)
9menu 1.7-2.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 80 kB
  • ctags: 62
  • sloc: ansic: 611; sh: 107; makefile: 40
file content (53 lines) | stat: -rwxr-xr-x 919 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
#! /usr/bin/make -f

include /usr/share/dpatch/dpatch.make

CC = gcc
CFLAGS = -g -Wall

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

SHELL = /bin/sh

build: build-stamp

build-stamp: patch-stamp
	dh_testdir
	xmkmf
	make CC="$(CC)" CFLAGS="$(CFLAGS)" 9menu
	touch stamp-build

clean: unpatch
	dh_testroot
	dh_testdir
	-make clean
	rm -f Makefile changelog
	rm -f stamp-build
	-chmod -R g-s . # setgid bit in tarball can cause build problems
	dh_clean

binary-indep:
# Nothing to be done

binary-arch: build
	dh_testroot
	dh_testdir
	dh_install
	dh_installman 9menu.1
	dh_installdocs README
	sed -n '1,/\*\// {s/^.*\*[ /]\?//; s/9menu.c/Taken from &/; p}' 9menu.c > changelog
	dh_installchangelogs changelog
	dh_strip
	dh_compress
	dh_shlibdeps
	dh_md5sums
	dh_gencontrol
	dh_builddeb

binary: binary-indep binary-arch

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