File: rules

package info (click to toggle)
pluma 1.8.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 19,484 kB
  • ctags: 6,176
  • sloc: ansic: 59,170; python: 6,848; xml: 3,329; makefile: 1,169; sh: 123; perl: 30
file content (58 lines) | stat: -rwxr-xr-x 1,914 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
55
56
57
58
#!/usr/bin/make -f

PKD   = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
UVER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
DTYPE = +dfsg1
VER  ?= $(subst $(DTYPE),,$(UVER))

DHFLAGS=--parallel

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

override_dh_install:
	rm -rfv debian/tmp/usr/lib/*/pluma/plugin-loaders/*.la
	rm -rfv debian/tmp/usr/lib/*/pluma/plugins/*.la
	dh_install --list-missing

override_dh_auto_configure:
	# upstream tarball is without configure. autogen.sh will create it
	NOCONFIGURE=1 ./autogen.sh
	dh_auto_configure $(DHFLAGS) -- \
		--disable-silent-rules \
		--libexecdir=/usr/lib/ \
		--enable-python \
		--with-gtk=2.0

override_dh_auto_test:
	DEB_BUILD_OPTIONS=nocheck dh_auto_test

override_dh_strip:
	dh_strip --dbg-package=pluma-dbg

get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
	@

$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
	@echo "# Downloading..."
	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
	@echo "# Extracting..."
	mkdir $(PKG)-$(VER) \
	    && tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \
	    || $(RM) -r $(PKG)-$(VER)
	@echo "# Cleaning-up..."
	cd $(PKG)-$(VER) \
	    && $(RM) -r -v \
	        help/ \
	        win32/ \
	        pluma/osx/ \
	        osx/ \
	        pluma/smclient/eggsmclient-win32.c \
	        pluma/smclient/eggsmclient-osx.c
	$(RM) -v $(PKG)_$(VER).orig.tar.*
	@echo "# Packing..."
	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
	    | XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
	    && $(RM) -r "$(PKG)-$(VER)"