File: rules

package info (click to toggle)
jedit 5.5.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 14,720 kB
  • sloc: java: 103,377; xml: 96,521; makefile: 43; sh: 42; cpp: 6; python: 6
file content (58 lines) | stat: -rwxr-xr-x 1,840 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

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_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:
	if [ -d "bsh" ]; then ant clean-all; fi
	-dh_quilt_unpatch
	-mv debian/patches/series debian/patches/series.noauto
	rm -f debian/jedit.menu debian/jedit.desktop debian/jedit.debhelper.log
	# bsh: clean
	rm -rf org/gjt/sp/jedit/bsh bsh