~ubuntu-branches/ubuntu/precise/ceph/precise

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2011-02-25 15:17:26 UTC
  • mfrom: (0.1.3 sid) (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110225151726-i4fh9xvh88ufvaux
Tags: 0.24.3-2
* Make Ceph Linux only and build on all Linux archs (closes: #614890).
* Support parallel building via DEB_BUILD_OPTIONS .
* Add watch file, thanks to Clint Byrum (closes: #615021).
* Tune packaging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
# -*- makefile -*-
3
3
export DH_VERBOSE=1
 
4
export DESTDIR=$(CURDIR)/debian/tmp
 
5
 
 
6
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
7
  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
8
  MAKEFLAGS += -j$(NUMJOBS)
 
9
endif
 
10
 
 
11
 
4
12
configure: configure-stamp
5
13
configure-stamp:
6
14
        dh_testdir
7
 
        touch configure-stamp
 
15
        touch $@
 
16
 
8
17
build: build-stamp
9
18
build-stamp: configure-stamp  
10
19
        dh_testdir
11
20
 
12
21
        ./autogen.sh
13
 
        ./configure --prefix=/usr
 
22
        ./configure --prefix=/usr --sbindir=/sbin --localstatedir=/var --sysconfdir=/etc
14
23
        $(MAKE)
15
24
        cp src/init-ceph debian/ceph.init
 
25
        cp src/logrotate.conf debian/ceph.logrotate
16
26
 
17
27
        touch $@
18
 
clean: 
 
28
 
 
29
clean:
19
30
        dh_testdir
20
31
        dh_testroot
21
32
        rm -f build-stamp configure-stamp
22
33
 
23
 
        test ! -f Makefile || $(MAKE) clean
24
 
 
25
 
        dh_clean 
 
34
        [ ! -f Makefile ] || $(MAKE) distclean
 
35
        rm -f aclocal.m4 compile config.sub config.guess config.log depcomp \
 
36
          install-sh ltmain.sh missing
 
37
        rm -f configure Makefile.in man/Makefile.in src/Makefile.in
 
38
        rm -f src/acconfig.h.in
 
39
        rm -f debian/ceph.init debian/ceph.logrotate
 
40
 
 
41
        dh_clean
 
42
 
26
43
install: build
27
44
        dh_testdir
28
45
        dh_testroot
29
46
        dh_clean -k 
30
47
        dh_installdirs
31
48
 
32
 
        $(MAKE) DESTDIR=$(CURDIR) install
33
 
 
 
49
        $(MAKE) DESTDIR=$(DESTDIR) install
34
50
 
35
51
# Add here commands to install the package into debian/testpack.
36
52
# Build architecture-independent files here.
37
53
binary-indep: build install
 
54
 
38
55
# We have nothing to do by default.
39
56
# Build architecture-dependent files here.
40
57
binary-arch: build install
41
58
        dh_testdir
42
59
        dh_testroot
43
60
        dh_installchangelogs 
44
 
        dh_installdocs
 
61
        dh_installdocs --all ChangeLog
45
62
        dh_installexamples
46
 
        dh_install
 
63
        dh_install --sourcedir=$(DESTDIR) --list-missing
47
64
        dh_installlogrotate
48
65
        dh_installinit
49
66
        dh_installman
50
67
        dh_lintian
51
68
        dh_link
52
69
 
53
 
        dh_strip -k --exclude=libcls_
54
 
        chmod +x debian/move_dbg_files.sh && debian/move_dbg_files.sh
 
70
        dh_strip -pceph --dbg-package=ceph-dbg -k --exclude=libcls_
 
71
        dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg
 
72
        dh_strip -pceph-client-tools --dbg-package=ceph-client-tools-dbg
 
73
        dh_strip -plibcrush1 --dbg-package=libcrush1-dbg
 
74
        dh_strip -plibrados1 --dbg-package=librados1-dbg
 
75
        dh_strip -plibceph1 --dbg-package=libceph1-dbg
 
76
        dh_strip -pradosgw --dbg-package=radosgw-dbg
55
77
 
56
78
        dh_compress
57
79
        dh_fixperms
61
83
        dh_gencontrol
62
84
        dh_md5sums
63
85
        dh_builddeb
 
86
 
64
87
binary: binary-indep binary-arch
65
88
.PHONY: build clean binary-indep binary-arch binary install configure