~ubuntu-branches/ubuntu/jaunty/mpdscribble/jaunty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2008-09-22 15:16:12 UTC
  • Revision ID: james.westby@ubuntu.com-20080922151612-m8yhggpg0eqfej1n
Tags: 0.2.12-13
* Add README.source.
* Update to standards 3.8.0.
* Integrate some patches from upstream BTS:
  - Switch to libsoup-2.4.
  - Fix crash, when Ctrl+C is pressed.
  - Fix typo in help.
  - Fix memory corruption in some cases.
  - Fix some compilation warnings and code errors.
* Switch to debhelper 7.
* Add debug package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
include /usr/share/dpatch/dpatch.make
6
6
 
7
 
# These are used for cross-compiling and for saving the configure script
8
 
# from having to guess our platform (since we know it already)
9
 
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10
 
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
11
 
 
12
 
# libmpd-dev pkg-config brokeness
13
 
CFLAGS = -Wall -g -I/usr/include/libmpd/
14
 
 
15
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
16
 
        CFLAGS += -O0
17
 
else
18
 
        CFLAGS += -O2
19
 
endif
20
 
 
21
 
config.status: configure patch-stamp
22
 
        dh_testdir
23
 
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
24
 
        cp -f /usr/share/misc/config.sub config.sub
25
 
endif
26
 
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
27
 
        cp -f /usr/share/misc/config.guess config.guess
28
 
endif
29
 
        LDFLAGS="-Wl,--as-needed" CFLAGS="$(CFLAGS)" ./configure \
30
 
                        --host=$(DEB_HOST_GNU_TYPE) \
31
 
                        --build=$(DEB_BUILD_GNU_TYPE) \
32
 
                        --prefix=/usr \
33
 
                        --mandir=\$${prefix}/share/man \
34
 
                        --infodir=\$${prefix}/share/info
35
 
 
36
7
build: build-stamp
37
8
 
38
 
build-stamp:  config.status
39
 
        dh_testdir
40
 
        $(MAKE)
41
 
        touch build-stamp
 
9
build-stamp: patch-stamp
 
10
        dh build
 
11
        touch $@
42
12
 
43
13
clean: unpatch
44
 
        dh_testdir
45
 
        dh_testroot
 
14
        dh clean --before clean
 
15
        dh_clean  --exclude ./libmpdclient/Makefile.orig
 
16
        dh clean --after clean
46
17
        debconf-updatepo
47
18
        rm -f build-stamp
48
19
 
49
 
        # Add here commands to clean up after the build process.
50
 
        [ ! -f Makefile ] || $(MAKE) distclean
51
 
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
52
 
        rm -f config.sub
53
 
endif
54
 
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
55
 
        rm -f config.guess
56
 
endif
57
 
        dh_clean  --exclude ./libmpdclient/Makefile.orig
58
20
 
59
21
install: build
60
 
        dh_testdir
61
 
        dh_testroot
62
 
        dh_clean -k  --exclude ./libmpdclient/Makefile.orig
63
 
        dh_installdirs
64
 
 
65
 
        # install package
66
 
        $(MAKE) install DESTDIR=$(CURDIR)/debian/mpdscribble
67
 
 
68
 
        # cache
69
 
        install -d $(CURDIR)/debian/mpdscribble/var/cache/mpdscribble
70
 
 
71
 
        # config
72
 
        install -m 755 -d $(CURDIR)/debian/mpdscribble/etc
73
 
        install -m 640 debian/mpdscribble.conf $(CURDIR)/debian/mpdscribble/etc
 
22
        dh install --before installinit
 
23
        # Needs to stop before mpd and start after it
 
24
        dh_installinit -n -- start 31 2 3 4 5 . stop 14 0 1 6 .
 
25
        dh install --after installinit
74
26
 
75
27
# Build architecture-independent files here.
76
28
binary-indep: build install
77
 
# We have nothing to do by default.
 
29
# We have nothing to do here.
78
30
 
79
31
# Build architecture-dependent files here.
80
32
binary-arch: build install
81
 
        dh_testdir
82
 
        dh_testroot
83
 
        dh_installchangelogs ChangeLog
84
 
        dh_installdocs
85
 
        dh_installexamples
86
 
        dh_installdebconf
87
 
        dh_installlogrotate
88
 
        # Needs to stop before mpd and start after it
89
 
        dh_installinit -n -- start 31 2 3 4 5 . stop 14 0 1 6 .
90
 
        dh_installman
91
 
        dh_link
92
 
        dh_strip
93
 
        dh_compress
94
 
        dh_fixperms
95
 
        dh_installdeb
96
 
        dh_shlibdeps
97
 
        dh_gencontrol
98
 
        dh_md5sums
99
 
        dh_builddeb
 
33
        dh binary-arch --before strip
 
34
        dh_strip --dbg-package=mpdscribble-dbg
 
35
        dh binary-arch --after strip
100
36
 
101
37
binary: binary-indep binary-arch
102
38
.PHONY: build clean binary-indep binary-arch binary install