File: rules

package info (click to toggle)
sweethome3d-furniture-editor 1.24-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 928 kB
  • sloc: java: 7,282; xml: 137; makefile: 33; sh: 9
file content (42 lines) | stat: -rwxr-xr-x 1,135 bytes parent folder | download
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

NAME=$(shell dpkg-parsechangelog|grep '^Source:'|cut -f2 -d' ')
VERS=$(shell dpkg-parsechangelog|grep '^Version:'|cut -f2 -d' '|cut -f1 -d-)
ICONS=debian/icons
ABOUT=src/com/eteks/furniturelibraryeditor/swing/resources/aboutIcon.png

export JAVA_HOME=/usr/lib/jvm/default-java

%:
	dh $@

override_dh_auto_build:
	mkdir -p build/classes-sh3d
	unzip -q /usr/share/sweethome3d/sweethome3d.jar -d build/classes-sh3d
	dh_auto_build

override_dh_install:
	mv FurnitureLibraryEditor-*.jar $(NAME).jar
	#icons
	for i in 16 22 48 128; do \
		mkdir -p $(ICONS)/$$i; \
		convert $(ABOUT) -colorspace RGB -resize $${i}x$${i} \
			+set date:create +set date:modify -define png:exclude-chunk=time \
			-colorspace sRGB $(ICONS)/$$i/$(NAME).png; \
	done
	dh_install

override_dh_auto_clean:
	rm -f $(NAME).jar
	rm -rf debian/icons
	dh_clean

TXZ=$(NAME)_$(VERS).orig.tar.xz
TMPDIR=_tmpdir
get-orig-source:
	rm -f ../$(TXZ)
	mkdir -p $(TMPDIR)
	uscan --verbose --download-version $(VERS) --force-download --destdir $(TMPDIR)
	unzip -q $(TMPDIR)/*.zip -d $(TMPDIR)
	cd $(TMPDIR)/*-src; tar Jcvf ../../../$(TXZ) .
	rm -rf $(TMPDIR)