File: rules

package info (click to toggle)
sweethome3d-textures-editor 1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 720 kB
  • ctags: 515
  • sloc: java: 4,382; xml: 121; makefile: 34; sh: 9
file content (43 lines) | stat: -rwxr-xr-x 1,180 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
43
#!/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/textureslibraryeditor/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_auto_install:
	mv TexturesLibraryEditor-*.jar $(NAME).jar
	#icons
	for i in 16 22 48 128; do \
		mkdir -p $(ICONS)/$$i; \
		convert $(ABOUT) -colorspace RGB -resize $${i}x$${i} \
			-colorspace sRGB $(ICONS)/$$i/$(NAME).png; \
	done
	convert $(ABOUT) -colorspace RGB -resize 32x32 \
		-colorspace sRGB $(ICONS)/$(NAME).xpm
	dh_install

override_dh_auto_clean:
	rm -f sweethome3d-textures-editor.jar
	rm -rf build $(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)