~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Michael Vogt
  • Date: 2008-11-10 18:04:02 UTC
  • Revision ID: michael.vogt@ubuntu.com-20081110180402-lvolg0ct1xr4vqoi
* debian/update-notifier-common.install:
  - move apt-check, apt-cdrom-check and cdromdistupgrade
    into update-notifier-common

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
export CFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
3
 
export LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
4
 
 
5
 
%:
6
 
        dh $@
 
2
# -*- makefile -*-
 
3
# Sample debian/rules that uses debhelper.
 
4
# GNU copyright 1997 to 1999 by Joey Hess.
 
5
 
 
6
# Uncomment this to turn on verbose mode.
 
7
#export DH_VERBOSE=1
 
8
 
 
9
 
 
10
tmp := $(CURDIR)/debian/tmp
 
11
# These are used for cross-compiling and for saving the configure script
 
12
# from having to guess our platform (since we know it already)
 
13
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
14
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
15
 
 
16
PKG=update-notifier
 
17
DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p')
 
18
DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
 
19
 
 
20
CFLAGS = -Wall -g
 
21
 
 
22
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
23
        CFLAGS += -O0
 
24
else
 
25
        CFLAGS += -O2
 
26
endif
 
27
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
28
        INSTALL_PROGRAM += -s
 
29
endif
 
30
 
 
31
config.status: configure
 
32
        dh_testdir
 
33
        # Add here commands to configure the package.
 
34
        CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-pkg-manager="/usr/bin/update-manager" --sysconfdir=/etc 
 
35
 
 
36
 
 
37
build: build-stamp
 
38
 
 
39
build-stamp:  config.status
 
40
        dh_testdir
 
41
 
 
42
        # Add here commands to compile the package.
 
43
        $(MAKE)
 
44
        (cd po; intltool-update -p --verbose)
 
45
        #/usr/bin/docbook-to-man debian/upgrade-notifier.sgml > upgrade-notifier.1
 
46
 
 
47
        touch build-stamp
 
48
 
 
49
clean:
 
50
        dh_testdir
 
51
        dh_testroot
 
52
        rm -f build-stamp 
 
53
 
 
54
        # Add here commands to clean up after the build process.
 
55
        -$(MAKE) distclean
 
56
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
 
57
        cp -f /usr/share/misc/config.sub config.sub
 
58
endif
 
59
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 
60
        cp -f /usr/share/misc/config.guess config.guess
 
61
endif
 
62
 
 
63
 
 
64
        dh_clean 
 
65
 
 
66
install: build
 
67
        dh_testdir
 
68
        dh_testroot
 
69
        dh_clean -k 
 
70
        dh_installdirs
 
71
 
 
72
        # Add here commands to install the package into debian/upgrade-notifier.
 
73
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
 
74
 
 
75
        #install -p -m 755 debian/synaptic-wrapper $(tmp)/usr/bin
 
76
        mkdir -p $(tmp)/etc/apt/apt.conf.d
 
77
        install -p -m 644 debian/99update-notifier $(tmp)/etc/apt/apt.conf.d
 
78
        install -p -m 644 debian/10periodic $(tmp)/etc/apt/apt.conf.d
 
79
        install -p -m 644 debian/15update-stamp $(tmp)/etc/apt/apt.conf.d
 
80
        install -p -m 644 debian/20archive $(tmp)/etc/apt/apt.conf.d
 
81
 
 
82
 
 
83
 
 
84
 
 
85
# Build architecture-independent files here.
 
86
binary-indep: build install
 
87
# We have nothing to do by default.
 
88
 
 
89
# Build architecture-dependent files here.
 
90
binary-arch: build install
 
91
        dh_testdir
 
92
        dh_testroot
 
93
        dh_installchangelogs ChangeLog
 
94
        dh_installdocs
 
95
        dh_installexamples
 
96
        dh_icons
 
97
        dh_install --sourcedir=debian/tmp
 
98
        dh_gconf
 
99
#       dh_installmenu
 
100
#       dh_installdebconf       
 
101
#       dh_installlogrotate
 
102
#       dh_installemacsen
 
103
#       dh_installpam
 
104
#       dh_installmime
 
105
#       dh_installinit
 
106
#       dh_installcron
 
107
#       dh_installinfo
 
108
        dh_installman
 
109
        dh_link
 
110
        dh_strip
 
111
        dh_compress
 
112
        dh_fixperms
 
113
#       dh_perl
 
114
#       dh_python
 
115
#       dh_makeshlibs
 
116
        dh_installdeb
 
117
        dh_shlibdeps
 
118
        dh_gencontrol
 
119
        dh_md5sums
 
120
        dh_builddeb
 
121
 
 
122
 
 
123
arch-build: 
 
124
        #-$(MAKE) distclean
 
125
        rm -rf debian/arch-build
 
126
        mkdir -p debian/arch-build/$(PKG)-$(DEBVER)
 
127
        tar -c --exclude=arch-build --no-recursion -f - `bzr inventory` | (cd debian/arch-build/$(PKG)-$(DEBVER);tar xf -)
 
128
        debian/arch-build/$(PKG)-$(DEBVER)/autogen.sh
 
129
        # HACK to fix the *$�/$&"�" automake generated po/Makefile.in
 
130
        sed -i 's/@install_sh@/..\/install-sh/' debian/arch-build/$(PKG)-$(DEBVER)/po/Makefile.in.in
 
131
        (cd debian/arch-build/$(PKG)-$(DEBVER) && $(DEB_BUILD_PROG))
 
132
 
 
133
 
 
134
binary: binary-indep binary-arch
 
135
.PHONY: build clean binary-indep binary-arch binary install