File: rules

package info (click to toggle)
hello-dbs 1.3-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 128 kB
  • ctags: 13
  • sloc: makefile: 58
file content (91 lines) | stat: -rwxr-xr-x 1,830 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
#! /usr/bin/make -f

# Debhelper options

#export DH_VERBOSE=1
export DH_COMPAT=2

# DBS options

package	        := hello-dbs
PWD             := $(shell pwd)
CFLAGS          := -O2 -Wall
INSTALL = install
INSTALL_DATA    := $(INSTALL) -m644
INSTALL_DIR     := $(INSTALL) -p -d -o root -g root  -m  755
INSTALL_FILE    := $(INSTALL) -p    -o root -g root  -m  644
INSTALL_PROGRAM := $(INSTALL) -m755
INSTALL_SCRIPT  := $(INSTALL) -p    -o root -g root  -m  755
SCRIPT_DIR     = /usr/share/dbs

# the dbs rules
TAR_DIR	:= hello-1.3.orig
include $(SCRIPT_DIR)/dbs-build.mk

# dpkg-arch rules
ifeq (,$(DEB_BUILD_GNU_TYPE))
  include $(SCRIPT_DIR)/dpkg-arch.mk
endif

# Some vars needed for clean building the package

DEBIAN_ROOT := $(PWD)/debian/$(package)

# Make rules

configure: $(STAMP_DIR)/stamp-configure
$(STAMP_DIR)/stamp-configure: $(patched)
	dh_testdir

	cd $(BUILD_TREE) && ./configure --prefix=/usr

	touch $(STAMP_DIR)/stamp-configure

build: $(STAMP_DIR)/stamp-build

$(STAMP_DIR)/stamp-build: $(patched) $(STAMP_DIR)/stamp-configure
	dh_testdir
	cd $(BUILD_TREE) && $(MAKE)

	touch $(STAMP_DIR)/stamp-build

clean:
	dh_testdir
	rm -rf $(STAMP_DIR) $(SOURCE_DIR)
	perl $(SCRIPT_DIR)/dbs_split clean
	dh_clean

install: 
# Nothing to do -- this is an arch independent package
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	cd $(BUILD_TREE) && $(MAKE) install prefix=$(DEBIAN_ROOT)/usr \
		infodir=$(DEBIAN_ROOT)/usr/share/info


binary-indep: 
# Do nothing, this is arch-dependent.

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installcron
	dh_installmanpages
	dh_installdebconf
	dh_installchangelogs $(BUILD_TREE)/ChangeLog

	dh_strip
	dh_installinfo
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch