File: rules

package info (click to toggle)
apmd 3.2.2-14
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 432 kB
  • ctags: 674
  • sloc: ansic: 2,884; makefile: 590; sh: 192
file content (79 lines) | stat: -rwxr-xr-x 1,933 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
#!/usr/bin/make -f
# 							-*- makefile -*-
# debian.rules file for the Debian/GNU Linux apmd package
# Copyright 1996-98 by Dirk Eddelbuettel <edd@debian.org>

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

package	= apmd
DESTDIR := $(shell pwd)/debian/$(package)

INSTALL := install --preserve-timestamps
INSTALL_SCRIPT := $(INSTALL) --mode=0755
INSTALL_DATA := $(INSTALL) --mode=0644

MAKE_FLAGS=PREFIX=/usr MANDIR=/usr/share/man PROXY_DIR=/etc/apm

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

build: build-stamp
build-stamp:
	dh_testdir
	$(MAKE) $(MAKE_FLAGS) CFLAGS="$(CFLAGS)" LDFLAGS=
	touch build-stamp

clean:
	dh_testdir
	#dh_testroot
	rm -f build-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) $(MAKE_FLAGS) DESTDIR=$(DESTDIR) install
	# We will use on_ac_power from the powermgmt-base package.
	rm -f $(DESTDIR)/usr/bin/on_ac_power
	$(INSTALL_SCRIPT) debian/apmd_proxy $(DESTDIR)/etc/apm/.
	$(INSTALL_DATA) debian/apmd_proxy.conf $(DESTDIR)/usr/share/apmd
	dh_movefiles --sourcedir=debian/apmd
	-rmdir $(DESTDIR)/usr/include
	-rmdir $(DESTDIR)/usr/lib

binary-indep: build

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdebconf
	dh_installdocs			README apmsleep.README
	dh_installdocs -A		AUTHORS
	dh_installinit -- start 10 2 3 4 5 . stop 21 1 .
	dh_installlogcheck
	dh_installman
	dh_installchangelogs		ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs			-V"libapm1 (>= 3.2.0-7)"
	dh_installdeb
	dh_shlibdeps			-ldebian/libapm1/usr/lib
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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

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