~ubuntu-branches/ubuntu/precise/pexec/precise

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Milan Zamazal
  • Date: 2010-02-28 19:00:36 UTC
  • Revision ID: james.westby@ubuntu.com-20100228190036-hcw794gzz9erfy17
Tags: 1.0~rc8-1
Initial release; closes: #569822.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# -*- makefile -*-
 
3
# Sample debian/rules that uses debhelper.
 
4
# This file was originally written by Joey Hess and Craig Small.
 
5
# As a special exception, when this file is copied by dh-make into a
 
6
# dh-make output file, you may use that output file without restriction.
 
7
# This special exception was added by Craig Small in version 0.37 of dh-make.
 
8
 
 
9
package=pexec
 
10
 
 
11
# Uncomment this to turn on verbose mode.
 
12
#export DH_VERBOSE=1
 
13
 
 
14
.NOTPARALLEL:
 
15
 
 
16
# These are used for cross-compiling and for saving the configure script
 
17
# from having to guess our platform (since we know it already)
 
18
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
19
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
20
 
 
21
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
 
22
  CROSS= --build $(DEB_HOST_GNU_TYPE)
 
23
else
 
24
  CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 
25
endif
 
26
 
 
27
CFLAGS = -Wall -g
 
28
INSTALL = install
 
29
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
 
30
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
 
31
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
 
32
INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755
 
33
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
 
34
    CFLAGS += -O0
 
35
else
 
36
    CFLAGS += -O2
 
37
endif
 
38
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
 
39
    INSTALL_PROGRAM += -s
 
40
endif
 
41
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
42
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
43
    MAKEFLAGS += -j$(NUMJOBS)
 
44
endif
 
45
 
 
46
config.status: configure
 
47
        dh_testdir
 
48
        ./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
 
49
 
 
50
build: build-stamp
 
51
 
 
52
build-stamp: config.status 
 
53
        dh_testdir
 
54
        $(MAKE)
 
55
        touch $@
 
56
 
 
57
clean: 
 
58
        dh_testdir
 
59
        dh_testroot
 
60
        rm -f build-stamp 
 
61
        [ ! -f Makefile ] || $(MAKE) distclean
 
62
        rm -f config.sub config.guess
 
63
        dh_clean 
 
64
 
 
65
install: build
 
66
        dh_testdir
 
67
        dh_testroot
 
68
        dh_prep
 
69
        dh_installdirs
 
70
        $(MAKE) prefix=$(CURDIR)/debian/$(package)/usr install
 
71
 
 
72
# Build architecture-independent files here.
 
73
binary-indep: build install
 
74
# We have nothing to do by default.
 
75
 
 
76
# Build architecture-dependent files here.
 
77
binary-arch: build install
 
78
        dh_testdir
 
79
        dh_testroot
 
80
        dh_installchangelogs 
 
81
        dh_installdocs
 
82
        dh_installexamples
 
83
        dh_installinfo
 
84
        dh_installman
 
85
        dh_link
 
86
        dh_strip
 
87
        dh_compress
 
88
        dh_fixperms
 
89
        dh_installdeb
 
90
        dh_shlibdeps
 
91
        dh_gencontrol
 
92
        dh_md5sums
 
93
        dh_builddeb
 
94
 
 
95
binary: binary-indep binary-arch
 
96
.PHONY: build clean binary-indep binary-arch binary install