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

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Julian Andres Klode
  • Date: 2020-01-28 09:55:09 UTC
  • Revision ID: juliank@ubuntu.com-20200128095509-93wh1wcbisnm9xtq
Tags: 3.192.28
releasing package update-notifier version 3.192.28

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
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/update-notifier
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/update-notifier
74
 
 
75
 
        #install -p -m 755 debian/synaptic-wrapper $(tmp)/usr/bin
76
 
        install -p -m 644 debian/99update-notifier $(tmp)/etc/apt/apt.conf.d
77
 
        install -p -m 644 debian/10periodic $(tmp)/etc/apt/apt.conf.d
78
 
        install -p -m 644 debian/20archive $(tmp)/etc/apt/apt.conf.d
79
 
 
80
 
 
81
 
 
82
 
 
83
 
# Build architecture-independent files here.
84
 
binary-indep: build install
85
 
# We have nothing to do by default.
86
 
 
87
 
# Build architecture-dependent files here.
88
 
binary-arch: build install
89
 
        dh_testdir
90
 
        dh_testroot
91
 
        dh_installchangelogs ChangeLog
92
 
        dh_installdocs
93
 
        dh_installexamples
94
 
        dh_icons
95
 
        dh_gconf
96
 
#       dh_install
97
 
#       dh_installmenu
98
 
#       dh_installdebconf       
99
 
#       dh_installlogrotate
100
 
#       dh_installemacsen
101
 
#       dh_installpam
102
 
#       dh_installmime
103
 
#       dh_installinit
104
 
#       dh_installcron
105
 
#       dh_installinfo
106
 
        dh_installman
107
 
        dh_link
108
 
        dh_strip
109
 
        dh_compress
110
 
        dh_fixperms
111
 
#       dh_perl
112
 
#       dh_python
113
 
#       dh_makeshlibs
114
 
        dh_installdeb
115
 
        dh_shlibdeps
116
 
        dh_gencontrol
117
 
        dh_md5sums
118
 
        dh_builddeb
119
 
 
120
 
 
121
 
arch-build: 
122
 
        #-$(MAKE) distclean
123
 
        rm -rf debian/arch-build
124
 
        mkdir -p debian/arch-build/$(PKG)-$(DEBVER)
125
 
        tar -c --exclude=arch-build --no-recursion -f - `bzr inventory` | (cd debian/arch-build/$(PKG)-$(DEBVER);tar xf -)
126
 
        debian/arch-build/$(PKG)-$(DEBVER)/autogen.sh
127
 
        # HACK to fix the *$�/$&"�" automake generated po/Makefile.in
128
 
        sed -i 's/@install_sh@/..\/install-sh/' debian/arch-build/$(PKG)-$(DEBVER)/po/Makefile.in.in
129
 
        (cd debian/arch-build/$(PKG)-$(DEBVER) && $(DEB_BUILD_PROG))
130
 
 
131
 
 
132
 
binary: binary-indep binary-arch
133
 
.PHONY: build clean binary-indep binary-arch binary install 
 
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 $@ --with python3 --with autoreconf
 
7
 
 
8
override_dh_autoreconf:
 
9
        NOCONFIGURE=1 dh_autoreconf ./autogen.sh
 
10
 
 
11
override_dh_auto_configure:
 
12
        dh_auto_configure -- --libdir=/usr/lib
 
13
 
 
14
override_dh_auto_test:
 
15
        cd tests && python3 test_package-data-downloader.py
 
16
        cd tests && python3 test_motd.py
 
17