File: rules

package info (click to toggle)
alarm-clock-applet 0.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,720 kB
  • sloc: ansic: 5,121; sh: 1,382; makefile: 189
file content (42 lines) | stat: -rwxr-xr-x 1,098 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/make -f
# -*- makefile -*-

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,defs

MAKEFILE = $(firstword $(MAKEFILE_LIST))
DEBIAN_DIR = $(dir $(MAKEFILE))
SOURCE_DIR = $(DEBIAN_DIR)/..
VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | \
	sed -n 's/-.*$$//; s/^Version: //p')
PACKAGE = $(shell sed -n 's/^Source: //p' $(DEBIAN_DIR)/control)

get-orig-source:
	uscan \
		--force-download \
		--download \
		--rename \
		--package=$(PACKAGE) \
		--upstream-version=$(VERSION) \
		--watchfile=$(DEBIAN_DIR)/watch \
		--destdir=.

# disable tests; it requires a running D-Bus session
override_dh_auto_test:

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-appindicator

# generate a desktop file for installing to /etc/xdg/autostart/
override_dh_install: debian/alarm-clock-applet.desktop
	dh_install

debian/alarm-clock-applet.desktop: debian/alarm-clock-applet/usr/share/applications/alarm-clock-applet.desktop
	awk '/^Exec=/ { $$0 = $$0 " --hidden"; } {print;}' \
		$< > $@

%:
	dh $@