~ubuntu-branches/ubuntu/raring/codeblocks/raring-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-08-09 04:38:38 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100809043838-a59ygguym4eg0jgw
Tags: 10.05-0ubuntu1
* New upstream release. Closes (LP: #322350)
 - Switch to dpkg-source 3.0 (quilt) format
 - Remove unneeded README.source
 - Add debian/get-source-orig script that removes all
   Windows prebuilt binaries
* Bump Standards-Version to 3.9.1
 - Stop shipping *.la files
* debian/control
 - Add cdbs package as Build-Depend
 - Add libbz2-dev and zlib1g-dev packages as
   Build-Depends (needed by libhelp_plugin.so)
 - Remove dpatch package of Build-Depends
 - Add codeblocks-contrib-debug package
 - Split architecture-independent files of codeblocks
   package in codeblocks-common package
* debian/rules
 - Switch to CDBS rules system
 - Add parallel build support
 - Add a call to debian/get-source-orig script
 - Use lzma compression (saves 23,5 MB of free space)
* debian/patches
 - Refresh 01_codeblocks_plugin_path
 - Add 02_no_Makefiles_in_debian_dir to remove any link
   in codeblocks build system to deleted Makefiles of debian directory
 - Drop 02_ftbfs_gcc44 and 03_ftbfs_glib221 (merged in upstream)
* debian/watch
 - Update to use the new host (berlios.de)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# -*- makefile -*-
3
 
# Code::Blocks debian/rules file
4
 
 
5
 
# enable dpatch
6
 
include /usr/share/dpatch/dpatch.make
7
 
 
8
 
# Uncomment this to turn on verbose mode.
9
 
#export DH_VERBOSE=1
10
 
 
11
 
# Get the package version from the changelog
12
 
VERSION=$(shell parsechangelog | grep ^Version | awk -F": " '{print $$2}' | cut -d"-" -f1)
13
 
 
14
 
# These are used for cross-compiling and for saving the configure script
15
 
# from having to guess our platform (since we know it already)
16
 
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17
 
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
18
 
 
19
 
 
20
 
CFLAGS = -Wall -g
21
 
 
22
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
23
 
        CFLAGS += -O0
24
 
else
25
 
        CFLAGS += -O2
26
 
endif
27
 
 
28
 
config.status: configure patch-stamp
29
 
        dh_testdir
30
 
 
31
 
        # Update config.sub/guess
32
 
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
33
 
        cp -f /usr/share/misc/config.sub config.sub
34
 
endif
35
 
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
36
 
        cp -f /usr/share/misc/config.guess config.guess
37
 
endif
38
 
 
39
 
        CFLAGS="$(CFLAGS)" \
40
 
                ./configure \
41
 
                --with-contrib-plugins=all \
42
 
                --host=$(DEB_HOST_GNU_TYPE) \
43
 
                --build=$(DEB_BUILD_GNU_TYPE) \
44
 
                --prefix=/usr \
45
 
                --docdir=\$${prefix}/share/doc \
46
 
                --mandir=\$${prefix}/share/man \
47
 
                --infodir=\$${prefix}/share/info
48
 
 
49
 
 
50
 
build: build-stamp
51
 
 
52
 
build-stamp:  config.status
53
 
        dh_testdir
54
 
 
55
 
        # Add here commands to compile the package.
56
 
        $(MAKE)
57
 
 
58
 
        touch build-stamp
59
 
 
60
 
clean: unpatch
61
 
        dh_testdir
62
 
        dh_testroot
63
 
        rm -f build-stamp 
64
 
 
65
 
        # Add here commands to clean up after the build process.
66
 
        [ ! -f Makefile ] || $(MAKE) distclean
67
 
 
68
 
        dh_clean rm config.log \
69
 
                config.status \
70
 
                config.sub config.guess \
71
 
                src/plugins/contrib/codesnippets/resources/codesnippets.zip \
72
 
                src/plugins/scriptedwizard/resources/scriptedwizard.zip
73
 
 
74
 
install: build
75
 
        dh_testdir
76
 
        dh_testroot
77
 
        dh_clean -k 
78
 
        dh_installdirs -ptmp usr/share/doc
79
 
 
80
 
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
81
 
 
82
 
        # Move the plugins folder from /usr/share/codeblocks/plugins to its proper place
83
 
        mkdir -p $(CURDIR)/debian/tmp/usr/lib/codeblocks/plugins
84
 
        mv $(CURDIR)/debian/tmp/usr/share/codeblocks/plugins/ $(CURDIR)/debian/tmp/usr/lib/codeblocks/
85
 
 
86
 
        # Add the override to its proper place
87
 
        mkdir -p $(CURDIR)/debian/tmp/usr/share/lintian/overrides
88
 
        cp $(CURDIR)/debian/codeblocks.lintian-overrides $(CURDIR)/debian/tmp/usr/share/lintian/overrides/codeblocks
89
 
 
90
 
# Build architecture-independent files here.
91
 
binary-indep: build install
92
 
# We have nothing to do by default.
93
 
 
94
 
# Build architecture-dependent files here.
95
 
binary-arch: build install
96
 
        dh_testdir
97
 
        dh_testroot
98
 
        dh_installchangelogs ChangeLog
99
 
        dh_installdocs
100
 
        dh_installexamples
101
 
        dh_install --fail-missing --sourcedir=debian/tmp
102
 
        dh_installmenu
103
 
        dh_installinfo
104
 
        dh_installman
105
 
        dh_installmime
106
 
        dh_icons
107
 
        dh_link
108
 
        dh_strip --dbg-package=codeblocks-dbg
109
 
        dh_compress
110
 
        dh_fixperms
111
 
        dh_makeshlibs
112
 
        dh_installdeb
113
 
        dh_shlibdeps
114
 
        dh_gencontrol
115
 
        dh_md5sums
116
 
        dh_builddeb
117
 
 
118
 
get-orig-source:
119
 
        cd .. && wget http://internap.dl.sourceforge.net/sourceforge/codeblocks/codeblocks-8.02-src.tar.bz2 && \
120
 
        bunzip2 codeblocks-${VERSION}-src.tar.bz2 && \
121
 
        gzip -9 codeblocks-${VERSION}-src.tar && \
122
 
        mv codeblocks-${VERSION}-src.tar.gz codeblocks_${VERSION}.orig.tar.gz
123
 
 
124
 
binary: binary-indep binary-arch
125
 
.PHONY: build clean binary-indep binary-arch binary install 
 
2
 
 
3
include /usr/share/cdbs/1/class/autotools.mk
 
4
include /usr/share/cdbs/1/rules/debhelper.mk
 
5
 
 
6
DEB_BUILD_PARALLEL= yes
 
7
DEB_PARALLEL_JOBS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
 
8
 
 
9
ifneq (,$(filter $(DEB_PARALLEL_JOBS),-1 0))
 
10
        DEB_PARALLEL_JOBS:=1
 
11
endif
 
12
 
 
13
DEB_CONFIGURE_EXTRA_FLAGS=--with-contrib-plugins=all --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
 
14
 
 
15
DEB_INSTALL_CHANGELOGS_ALL= ChangeLog
 
16
DEB_DBG_PACKAGE_libcodeblocks0= codeblocks-dbg
 
17
DEB_DBG_PACKAGE_libwxsmithlib0= codeblocks-contrib-dbg
 
18
 
 
19
DEB_DH_MAKESHLIBS_ARGS_codeblocks-contrib= -Ncodeblocks-contrib
 
20
DEB_DH_BUILDDEB_ARGS= -- -Zlzma
 
21
 
 
22
get-orig-source::
 
23
        ./debian/get-orig-source