~ubuntu-branches/debian/sid/x11-apps/sid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Julien Cristau
  • Date: 2013-12-25 18:39:25 UTC
  • Revision ID: package-import@ubuntu.com-20131225183925-kh1rc0smebkuyxf7
Tags: 7.7+2
* xclipboard 1.1.3
* xclock 1.0.7
* xman 1.1.3
* Use dh.
* Disable silent build rules.
* Remove Cyril from Uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
# Uncomment this to turn on verbose mode.
8
8
#export DH_VERBOSE=1
9
9
 
10
 
# set this to the name of the main shlib's binary package
11
 
PACKAGE = x11-apps
12
 
 
13
 
include debian/xsfbs/xsfbs.mk
 
10
STAMP_DIR = stampdir
14
11
 
15
12
# This package contains multiple modules as shipped by upstream. Each module is # contained in a subdirectory in the root dir of the package. You must list each
16
13
# subdirectory explicitly so that the build system knows what to build
17
14
DEF_SUBDIRS=bitmap ico oclock rendercheck transset x11perf xbiff xcalc xclipboard xclock xconsole xcursorgen xditview xedit xeyes xgc xload xlogo xmag xman xmore xwd xwud
18
15
SUBDIRS=$(DEF_SUBDIRS)
 
16
CONFIG_STAMPS = $(addprefix $(STAMP_DIR)/configure-, $(SUBDIRS))
19
17
BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS))
20
18
 
21
 
CFLAGS = -Wall -g
22
 
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
23
 
        CFLAGS += -O0
24
 
else
25
 
        CFLAGS += -O2
26
 
endif
27
 
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
28
 
        NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
29
 
        MAKEFLAGS += -j$(NUMJOBS)
30
 
endif
31
 
 
32
 
DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
33
 
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
34
 
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
35
 
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
36
 
        confflags += --build=$(DEB_HOST_GNU_TYPE)
37
 
else
38
 
        confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
39
 
endif
40
 
 
41
 
build: build-stamp
42
 
build-stamp: $(BUILD_STAMPS)
43
 
        >$@
44
 
 
45
 
$(STAMP_DIR)/build-%: $(STAMP_DIR)/genscripts $(STAMP_DIR)/patch
46
 
        mkdir -p $*-build
47
 
 
48
 
        cd $*-build && \
49
 
        ../$*/configure --prefix=/usr --mandir=\$${prefix}/share/man \
50
 
          --infodir=\$${prefix}/share/info $(confflags) \
51
 
          CFLAGS="$(CFLAGS)" \
52
 
          MANCONF="/etc/manpath.config"
53
 
        cd $*-build && $(MAKE)
54
 
        >$@
55
 
 
56
 
clean: xsfclean
57
 
        dh_testdir
58
 
        rm -f build-stamp
59
 
        rm -f config.cache config.log config.status
60
 
        rm -f */config.cache */config.log */config.status
61
 
        rm -f conftest* */conftest*
62
 
        rm -rf autom4te.cache */autom4te.cache
63
 
        rm -rf *-build
64
 
        dh_clean
65
 
 
66
 
install: build
67
 
        dh_testdir
68
 
        dh_testroot
69
 
        dh_clean -k
70
 
        dh_installdirs
71
 
 
 
19
%:
 
20
        dh $@ --with autotools-dev,quilt --parallel
 
21
 
 
22
override_dh_auto_configure: $(CONFIG_STAMPS)
 
23
 
 
24
$(STAMP_DIR)/configure-%:
 
25
        mkdir -p $(STAMP_DIR)
 
26
        dh_auto_configure -D$* -B$*-build -- \
 
27
                --disable-silent-rules \
 
28
                MANCONF="/etc/manpath.config"
 
29
        >$@
 
30
 
 
31
override_dh_auto_build: $(BUILD_STAMPS)
 
32
 
 
33
$(STAMP_DIR)/build-%:
 
34
        mkdir -p $(STAMP_DIR)
 
35
        dh_auto_build -D$* -B$*-build
 
36
        >$@
 
37
 
 
38
override_dh_auto_clean: $(addprefix clean-, $(SUBDIRS))
 
39
        rm -rf stampdir
 
40
 
 
41
clean-%:
 
42
        dh_auto_clean -D$* -B$*-build
 
43
 
 
44
override_dh_auto_install:
72
45
        for FILE in $(SUBDIRS); do \
73
46
                cd "$$FILE"-build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install ; \
74
47
                cd ..; \
75
48
        done
76
49
 
77
 
# Build architecture-dependent files here.
78
 
binary-arch: build install
79
 
        dh_testdir
80
 
        dh_testroot
81
 
 
82
 
        dh_installdocs
83
 
        dh_install --sourcedir=debian/tmp --list-missing
84
 
        dh_installmenu
85
 
        dh_installchangelogs
86
 
        dh_link
87
 
        dh_strip
88
 
        dh_compress
89
 
        dh_fixperms
90
 
        dh_installdeb
91
 
        dh_shlibdeps
92
 
        dh_gencontrol
93
 
        dh_md5sums
94
 
        dh_builddeb
95
 
 
96
 
# Build architecture-independent files here.
97
 
binary-indep: build install
98
 
# Nothing to do
99
 
 
100
 
binary: binary-indep binary-arch
101
 
.PHONY: build clean binary-indep binary-arch binary install
 
50
override_dh_install:
 
51
        dh_install --list-missing
102
52
 
103
53
.PHONY: get-tarballs
104
54
get-tarballs: $(addprefix get-tarball-,$(SUBDIRS))