File: rules

package info (click to toggle)
synaptic 0.84.2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 21,356 kB
  • ctags: 2,544
  • sloc: cpp: 24,304; xml: 10,562; ansic: 2,084; makefile: 582; sh: 438; sed: 93; python: 82
file content (54 lines) | stat: -rwxr-xr-x 1,728 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
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/make -f

# make the package build on ubuntu and debian
DIST = $(shell lsb_release -i -s)

DHFLAGS=--parallel
CONFIGURE_FLAGS= --prefix=/usr \
	      --mandir=\$${prefix}/share/man \
	      --infodir=\$${prefix}/share/info \
	      --localstatedir=/var/lib/synaptic \
	      --sysconfdir=/etc \
	      --with-pkg-hold \
	      $(MULTIARCH)

%:
	dh $@ --with autoreconf $(DHFLAGS)

override_dh_auto_configure:
	dh_auto_configure $(DHFLAGS) -- $(CONFIGURE_FLAGS) 

override_dh_auto_install:
	dh_auto_install $(DHFLAGS)
	# allow per distro supported PIXMAP, FIXME: make this part
	# of the install (e.g. package-supported.{Ubuntu,Debian} and
	# do run-time switching
	if [ -f debian/package-supported.png.$(DIST) ]; then \
		cp debian/package-supported.png.$(DIST) $(CURDIR)/debian/synaptic/usr/share/icons/hicolor/16x16/actions/package-supported.png; \
	fi

override_dh_installman:
	dh_installman -psynaptic man/synaptic.es.8 man/synaptic.fr.8 man/synaptic.hr.8 man/synaptic.ja.8 man/synaptic.pt_BR.8 man/synaptic.ru.8 man/synaptic.tr.8

# FIXME: use quilt instead - quilt has a nice concept of 
#        debian/patches/{ubuntu,debian}.series but that does not
#        work for native packages :/

# patch
override_dh_auto_build:
	# apply distro specific patches if we have them
	if [ -e debian/patches/00list.$(DIST) ]; then \
	  cp debian/patches/00list.$(DIST) debian/patches/00list;\
	  dpatch apply-all;\
	fi;
	dh_auto_build $(DHFLAGS)
	# ubuntu specific for universe langpacks but will not do any
	#  harm on debian
	make -C po synaptic.pot

# unpatch
override_dh_auto_clean:
	cp debian/patches/00list.$(DIST) debian/patches/00list
	dpatch deapply-all
	rm -rf patch-stamp debian/patched
	dh_auto_clean $(DHFLAGS)