~ubuntu-branches/ubuntu/trusty/sysprof/trusty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Ritesh Raj Sarraf
  • Date: 2011-06-13 23:05:39 UTC
  • mfrom: (8.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110613230539-426qhsc3k996edou
Tags: 1.1.6-2
Upload to unstable 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Uncomment this to turn on verbose mode.
3
3
export DH_VERBOSE=1
4
4
 
5
 
# DKMS package
6
 
pdkms=sysprof-module-dkms
7
 
PACKAGE=sysprof-module
8
 
 
9
5
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
10
6
 
11
7
# This has to be exported to make some magic below work.
12
 
export DH_OPTIONS
13
 
export KSRC
14
 
export KVERS
15
 
export KDREV
16
8
 
17
9
DESTDIR = $(CURDIR)/debian/tmp
18
10
SYSPROFDIR = $(CURDIR)/debian/sysprof
29
21
endif
30
22
 
31
23
CFLAGS = -Wall -g
 
24
LDFLAGS = -Wl,--as-needed
32
25
 
33
26
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
34
27
        CFLAGS += -O0
38
31
 
39
32
%:
40
33
        dh  $@
41
 
 
42
 
override_dh_install:
43
 
        dh_testdir
44
 
        dh_testroot
45
 
        dh_prep
46
 
        dh_installdirs
47
 
 
48
 
        # Install sysprof.
49
 
        make install DESTDIR=$(SYSPROFDIR)
50
 
        cp debian/sysprof.xpm $(SYSPROFDIR)/usr/share/pixmaps
51
 
        mkdir -p $(SYSPROFDIR)/usr/share/applications
52
 
        cp debian/sysprof.desktop $(SYSPROFDIR)/usr/share/applications
53
 
 
54
 
        dh_installman debian/sysprof.1
55
 
 
56
 
        # Install the sources of the kernel module.
57
 
        install -D -m 0755 debian/rules.modules debian/tmp/modules/sysprof-module/debian/rules
58
 
        for f in debian/*.modules.in debian/control debian/compat debian/copyright debian/changelog; do \
59
 
                install -m 0644 $$f debian/tmp/modules/sysprof-module/debian/; \
60
 
        done
61
 
        cp module/* debian/tmp/modules/sysprof-module/
62
 
 
63
 
        # For DKMS
64
 
        # Create the directories to install the source into
65
 
        dh_installdirs -p$(pdkms)  usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)
66
 
        dh_installdirs -p$(pdkms)  usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/debian
67
 
        install -D -m 0755 debian/rules.modules debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/debian/rules
68
 
        for f in debian/*.modules.in debian/control debian/compat debian/copyright debian/changelog; do \
69
 
                install -m 0644 $$f debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/debian/; \
70
 
        done
71
 
        cp module/* debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/
72
 
 
73
 
        # Prepare dkms.conf from the dkms.conf.in template
74
 
        sed "s/__VERSION__/$(DEB_UPSTREAM_VERSION)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/dkms.conf
75
 
 
76
 
 
77
 
 
78
 
        cd debian/tmp/; tar jcvf ../sysprof-module-source/usr/src/sysprof-module.tar.bz2 modules; cd ../../
79
 
        rm -rf debian/tmp/modules
80
 
        
81
 
        # Install the override
82
 
        mkdir -p debian/sysprof-module-source/usr/share/lintian/overrides
83
 
        cp debian/sysprof-module-source.overrides \
84
 
                debian/sysprof-module-source/usr/share/lintian/overrides/sysprof-module-source
85
 
 
86
 
# .PHONY: build clean binary-indep binary-arch binary install