~ubuntu-branches/ubuntu/utopic/newt/utopic

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-07-01 23:06:29 UTC
  • mfrom: (2.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20130701230629-vn7p5llzt03j09mv
Tags: 0.52.15-2ubuntu1
* Merge with Debian; remaining changes:
  - Fix python-* package descriptions.
  - Install/remove alternatives for the ubuntu palette.
  - Don't install python-newt example files.
  - Install whiptail in /bin instead of /usr/bin.
* Still build with tcl8.5 (8.6 is in universe).

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
# version is marked as being modified.
8
8
 
9
9
# Uncomment this to turn on verbose mode.
10
 
export DH_VERBOSE=1
 
10
# export DH_VERBOSE=1
11
11
 
12
12
# Magic debhelper rule.
13
13
%:
14
 
        dh $@ --with python2,python3
 
14
        dh $@ --with python2,python3,autoreconf
15
15
 
16
16
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
17
17
LIBDIR:=/lib/$(DEB_HOST_MULTIARCH)
20
20
PYVERS:=$(shell pyversions --supported)
21
21
PY3VERS:=$(shell py3versions --supported)
22
22
 
23
 
PYTHON2=$(shell pyversions -r debian/control)
24
 
PYTHON3=$(shell py3versions -r debian/control)
25
 
 
26
23
ifeq ($(DEB_HOST_ARCH_OS),hurd)
27
24
GPMSUPPORT=
28
25
else
41
38
        dh_auto_clean
42
39
        # remove autogenerated files
43
40
        rm -rf Makefile config.h* config.log config.status .depend libnewt.pc \
44
 
           configure install-sh po/*.mo python* tutorial libnewt_pic.a
 
41
           configure install-sh po/*.mo python* tutorial libnewt_pic.a po/newt.pot
45
42
        rm -f debian/shlibs.local
46
43
        rm -f debian/python*-newt*.examples 
47
44
 
48
45
override_dh_auto_configure:
49
 
        dh_autoreconf 
50
46
        # Nasty hack. why is it necessary?
51
 
        cp /usr/share/automake-1.11/install-sh ./install-sh
 
47
        cp /usr/share/automake-1.*/install-sh ./install-sh
52
48
        dh_auto_configure  -- $(GPMSUPPORT) $(NOSTRIP) $(COLORSFILE) CFLAGS="-I/usr/include/tcl8.5 $(CFLAGS)"  \
53
49
                CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" FFLAGS="$(FFLAGS)" 
54
50
 
56
52
        dh_auto_build
57
53
        sgmltools --backend html tutorial.sgml
58
54
        ar cqv libnewt_pic.a shared/*.o
59
 
 
60
 
 
 
55
        
 
56
        
61
57
override_dh_auto_install:
62
58
        dh_auto_install 
63
59
        mkdir -p debian/tmp/$(LIBDIR)/.
69
65
                pylib=usr/lib/$$v/dist-packages ; \
70
66
                mkdir -p debian/python-newt/$$pylib ; \
71
67
                mkdir -p debian/python-newt-dbg/$$pylib ;\
72
 
                mv $$v/_snack_d.* debian/python-newt-dbg/$$pylib; \
 
68
                mv $$v-dbg/_snackmodule.so debian/python-newt-dbg/$$pylib/_snackmodule_d.so; \
73
69
                cp snack.py $$v/* debian/python-newt/$$pylib; \
74
70
        done
75
71
        for v in $(PY3VERS); do \
76
 
                pylib=usr/lib/python3/dist-packages ; \
77
 
                abitag=.$$($$v-dbg -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"); \
78
 
                mkdir -p debian/python3-newt/$$pylib ; \
79
 
                mkdir -p debian/python3-newt-dbg/$$pylib ;\
80
 
                mv $$v/_snack$$abitag.so debian/python3-newt-dbg/$$pylib/; \
81
 
                cp snack.py $$v/* debian/python3-newt/$$pylib; \
82
 
        done
 
72
               pylib=usr/lib/python3/dist-packages ; \
 
73
               abitag=.$$($$v -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"); \
 
74
               abitagdbg=.$$($$v-dbg -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"); \
 
75
               mkdir -p debian/python3-newt/$$pylib ; \
 
76
               mkdir -p debian/python3-newt-dbg/$$pylib ;\
 
77
               mv $$v/_snackmodule.so $$v/_snack$$abitag.so; \
 
78
               mv $$v-dbg/_snackmodule.so debian/python3-newt-dbg/$$pylib/_snack$$abitagdbg.so; \
 
79
               cp snack.py $$v/* debian/python3-newt/$$pylib; \
 
80
        done
83
81
        -find debian/python-* debian/python3-* -name '*.o' | xargs rm -f
84
 
 
85
82
        dh_install -p libnewt-dev libnewt.a $(USRLIBDIR)
86
83
        mkdir -p debian/libnewt-pic/$(USRLIBDIR)
87
84
        cp newt*.ver debian/libnewt-pic/$(USRLIBDIR)/libnewt_pic.map