File: rules

package info (click to toggle)
jedit 5.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,252 kB
  • ctags: 11,190
  • sloc: java: 98,480; xml: 94,070; makefile: 52; sh: 42; cpp: 6; python: 6
file content (69 lines) | stat: -rwxr-xr-x 2,193 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
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/make -f

export JAVA_HOME=/usr/lib/jvm/default-java
VERSION    := $(shell dpkg-parsechangelog|egrep '^Version:'|cut -f2 -d' '|cut -f1 -d+)
PROPERTIES := $(CURDIR)/debian/build.properties
ICON       := $(CURDIR)/build/doc/jedit.png
DESTDIR    := $(CURDIR)/debian/jedit
ICONS      := $(DESTDIR)/usr/share/icons/hicolor
TMPDIR     := get-orig-source-tmp

%:
	dh $@ --with javahelper

override_dh_builddeb:
	dh_builddeb -- -Zxz

override_dh_auto_configure:
	# bsh: extract and copy to jEdit original locations
	mkdir bsh && cd bsh && tar zxf /usr/src/bsh-src/bsh.tar.gz
	-mv debian/patches/series.noauto debian/patches/series
	dh_quilt_patch
	cp -a bsh/src/bsh org/gjt/sp/jedit
	cp -a bsh/asm/src/bsh/org org/gjt/sp/jedit/bsh

override_dh_auto_build:
	# build
	ant -propertyfile $(PROPERTIES) build
	ant -propertyfile $(PROPERTIES) docs-html
	# upstream changelog
	cp build/doc/CHANGES.txt build/doc/changelog

override_dh_auto_install:
	#dh_install
	# icons
	for i in 16 22 48; do \
		mkdir -p $(ICONS)/$${i}x$${i}/apps; \
		convert $(ICON) -colorspace RGB \
			-resize $${i}x$${i} -colorspace sRGB \
			$(ICONS)/$${i}x$${i}/apps/jedit.png; \
	done
	install -d -m 755 $(DESTDIR)/usr/share/pixmaps
	convert $(ICON) -colorspace RGB \
		-resize 32x32 -colorspace sRGB \
		$(DESTDIR)/usr/share/pixmaps/jedit.xpm
	# desktop
	cp package-files/linux/deb/jedit.desktop debian/jedit.desktop
	sed -i /^Icon/s/=.*/=jedit/ debian/jedit.desktop
	install -d -m 755 $(DESTDIR)/usr/share/applications
	install -m 644 debian/jedit.desktop \
		$(DESTDIR)/usr/share/applications

override_dh_install:
	dh_install --exclude=LICENSE.md

override_dh_auto_clean:
	-dh_quilt_unpatch
	-mv debian/patches/series debian/patches/series.noauto
	ant clean-all
	rm -f debian/jedit.menu debian/jedit.desktop debian/jedit.debhelper.log
	# bsh: clean
	rm -rf org/gjt/sp/jedit/bsh bsh

get-orig-source:
	uscan --verbose --download-version $(VERSION) --force-download --repack --rename
	-mkdir $(TMPDIR) && tar -C $(TMPDIR) -zxf ../jedit_$(VERSION).orig.tar.gz
	rm -f ../jedit_$(VERSION).orig.tar.gz
	cd $(TMPDIR) && tar --exclude org/gjt/sp/jedit/bsh \
		-Jcf ../../jedit_$(VERSION)+dfsg.orig.tar.xz *
	rm -rf $(TMPDIR)