File: rules

package info (click to toggle)
lsmbox 2.0.0-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,796 kB
  • ctags: 1,327
  • sloc: ansic: 11,006; sh: 4,279; makefile: 494; yacc: 288; sed: 16
file content (78 lines) | stat: -rwxr-xr-x 1,696 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# debian/rules for lsmbox using debhelper.
# Copyright (C) 2002-2004 David Weinehall <tao@debian.org>

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

package = lsmbox
pkgdir = $(CURDIR)/debian/$(package)
mandir = /usr/share/man

CC = gcc
CFLAGS = -g -Wall

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

# For Autoconf 2.52 and newer only
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

# enable optimization unless noopt is specified
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O2
endif

.PHONY: clean
clean:
	dh_testdir
	dh_testroot
	dh_clean build-stamp config.cache config.log
	rm -rf autom4te.cache
	-$(MAKE) -i distclean
	-test -r /usr/share/misc/config.sub && \
	   cp -f /usr/share/misc/config.sub config.sub
	-test -r /usr/share/misc/config.guess && \
	   cp -f /usr/share/misc/config.guess config.guess

.PHONY: build-stamp
build-stamp:
	dh_testdir

	./configure --prefix=/usr --mandir=$(mandir)
	$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"

	touch build-stamp

.PHONY: build
build: build-stamp

.PHONY: binary-indep
binary-indep:
# There is nothing to see here. Move along.

.PHONY: binary-arch
binary-arch:
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_installchangelogs ChangeLog
	$(MAKE) install DESTDIR="$(pkgdir)"
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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