~ubuntu-branches/ubuntu/precise/newt/precise

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Muharem Hrnjadovic
  • Date: 2009-05-13 19:10:04 UTC
  • Revision ID: james.westby@ubuntu.com-20090513191004-sxfisdrw1nha62ho
Tags: 0.52.10-3ubuntu1
* Merge from debian unstable, remaining changes:
  - 029_crash_fix.patch:fix crash in SetText (LP: #352679)
    (Forwarded to debian as #531724)
  - Build for python2.6, include symlinks in the python-newt package.
  - python-newt-dbg: Build the extension for the python debug interpreter
    (Forwarded to debian as #531725)

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
# Uncomment this to turn on verbose mode.
10
10
# export DH_VERBOSE=1
11
11
 
12
 
DEB_BUILD_GNU_SYSTEM = $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
13
 
DEB_BUILD_GNU_CPU = $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
 
12
 
 
13
DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
14
DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
15
ifneq ($(DEB_HOST_GNU_TYPE), $(DEB_BUILD_GNU_TYPE))
 
16
CROSS=--build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 
17
CROSSCC=$(DEB_HOST_GNU_TYPE)-gcc
 
18
else
 
19
CROSS=
 
20
CROSSCC=gcc
 
21
endif
14
22
 
15
23
VERSION=0.52.10
16
24
SONAME=0.52
28
36
TAR_DIR=newt-$(VERSION)
29
37
include /usr/share/dbs/dbs-build.mk
30
38
 
31
 
ifeq (,$(DEB_BUILD_GNU_TYPE))
 
39
ifeq (,$(DEB_HOST_ARCH_OS))
32
40
 include /usr/share/dbs/dpkg-arch.mk
33
41
endif
34
 
ARCH=$(shell dpkg --print-architecture)
 
42
 
 
43
DEB_HOST_ARCH_OS  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
44
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
35
45
 
36
46
# get the items created here.
37
47
binarytarget=binary-devel binary-shared binary-runtime binary-tcl \
41
51
LIBCDEV=libc-dev
42
52
GPMSUPPORT=
43
53
 
44
 
ifneq (,$(findstring linux,$(DEB_BUILD_GNU_SYSTEM)))
 
54
ifneq ($(DEB_HOST_ARCH_OS),linux)
45
55
GPMSUPPORT= --with-gpm-support
46
56
LIBCDEV=libc6-dev
47
 
ifeq ($(DEB_BUILD_GNU_CPU),alpha)
 
57
ifeq ($(DEB_HOST_ARCH_CPU),alpha)
48
58
LIBCDEV=libc6.1-dev
49
59
endif
50
 
ifeq ($(DEB_BUILD_GNU_CPU),ia64)
 
60
ifeq ($(DEB_HOST_ARCH_CPU),ia64)
51
61
LIBCDEV=libc6.1-dev
52
62
endif
53
63
endif
54
64
 
55
 
ifeq ($(DEB_BUILD_GNU_SYSTEM),gnu)
 
65
ifeq ($(DEB_HOST_ARCH_OS),hurd)
56
66
LIBCDEV=libc0.3-dev
57
67
endif
58
68
 
 
69
ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
 
70
LIBCDEV=libc0.1-dev
 
71
endif
 
72
 
59
73
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
60
74
NOSTRIP=--with-nostrip=no
61
75
else
70
84
        cp newt.spec $(BUILD_TREE)
71
85
        rm -f $(BUILD_TREE)/.depend
72
86
        ( cd $(BUILD_TREE) && autoconf --force -i )
73
 
        ( cd $(BUILD_TREE) && ./configure --prefix=/usr  $(GPMSUPPORT) $(NOSTRIP)  )
 
87
        ( cd $(BUILD_TREE) && ./configure --prefix=/usr  $(GPMSUPPORT) $(NOSTRIP) $(CROSS) )
74
88
        touch $@
75
89
 
76
90
build: $(build-stamp)
77
91
$(build-stamp): $(configure-stamp)
78
92
        dh_testdir
79
93
        ( cd $(BUILD_TREE) && sgmltools --backend html tutorial.sgml )
80
 
        $(MAKE) -C $(BUILD_TREE)
 
94
        CC=$(CROSSCC) $(MAKE) -C $(BUILD_TREE)
81
95
        ( cd $(BUILD_TREE) && ar cqv libnewt_pic.a shared/*.o )
82
96
        # build POT file for translators
83
97
        make -C $(BUILD_TREE)/po newt.pot
103
117
        dh_installdirs -p $@ 
104
118
        dh_install -p $@ --sourcedir=$(BUILD_TREE)
105
119
        # chmod +x $(BUILD_TREE)/mkinstalldirs
106
 
        $(MAKE) -C $(BUILD_TREE)/po datadir=../../../debian/$(LIB_PKG)/usr/share HAVE_XGETTEXT=yes install
 
120
        CC=$(CROSSCC) $(MAKE) -C $(BUILD_TREE)/po datadir=../../../debian/$(LIB_PKG)/usr/share HAVE_XGETTEXT=yes install
107
121
        dh_strip -p $@
108
122
        dh_makeshlibs -p $@
109
123
        dh_shlibdeps -L $(LIB_PKG) -l debian/$@/usr/lib
110
 
        #dh_installdocs -p $@  -p $@ $(BUILD_TREE)/newt.spec
111
124
        dh_installdocs -p $@  
112
125
        dh_link -p $@  /usr/lib/libnewt.so.$(VERSION) /usr/lib/libnewt.so.$(SONAME)
113
126
        rm debian/$@/usr/lib/libnewt.so