File: rules

package info (click to toggle)
visualvm 2.0.6+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 39,516 kB
  • sloc: java: 306,212; xml: 14,016; javascript: 3,543; ansic: 1,889; cpp: 1,277; sh: 701; makefile: 68
file content (58 lines) | stat: -rwxr-xr-x 2,250 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/make -f

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
export JAVA_HOME = /usr/lib/jvm/default-java
export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)

ifneq (,$(filter $(DEB_HOST_ARCH), s390))
  ARCHFLAG="-m31"
else ifneq (,$(filter $(DEB_HOST_ARCH), sparc powerpc i386))
  ARCHFLAG="-m32"
else
  ARCHFLAG="-m64"
endif

NB_PLATFORM_VERSION=18
NB_BUILD_PROPERTIES=-Dpermit.jdk9.builds=true

%:
	dh $@

override_dh_auto_build:
	# Prepare the source tree
	mkdir -p visualvm/netbeans
	ln -s /usr/share/netbeans/platform$(NB_PLATFORM_VERSION) visualvm/netbeans/platform
	ln -s /usr/share/netbeans/harness visualvm/netbeans/harness

	# Build the native libraries
	cd visualvm/libs.profiler/lib.profiler/native/build && \
	JAVA_HOME_15=$(JAVA_HOME) JAVA_HOME_16=$(JAVA_HOME) ./buildnative-linux64.sh

	#Build visualvm
	cd visualvm && ant build

override_dh_install-indep:
	dh_install -i

	# Create and install /etc/visualvm/visualvm.clusters
	echo visualvm >> debian/visualvm/etc/visualvm/visualvm.clusters

	# Install the icons
	install -m 644 -D debian/icons/visualvm-22x22.png debian/visualvm/usr/share/icons/hicolor/22x22/apps/visualvm.png
	install -m 644 -D debian/icons/visualvm-32x32.png debian/visualvm/usr/share/icons/hicolor/32x32/apps/visualvm.png
	install -m 644 -D debian/icons/visualvm-48x48.png debian/visualvm/usr/share/icons/hicolor/48x48/apps/visualvm.png
	install -m 644 -D debian/icons/visualvm-64x64.png debian/visualvm/usr/share/icons/hicolor/64x64/apps/visualvm.png
	install -m 644 -D debian/icons/visualvm-128x128.png debian/visualvm/usr/share/icons/hicolor/128x128/apps/visualvm.png
	install -m 644 -D debian/icons/visualvm-256x256.png debian/visualvm/usr/share/icons/hicolor/256x256/apps/visualvm.png
	install -m 644 -D debian/icons/visualvm-512x512.png debian/visualvm/usr/share/icons/hicolor/512x512/apps/visualvm.png

	# Remove the native libraries from the visualvm package
	$(RM) -r debian/visualvm/usr/share/visualvm/visualvm/lib/deployed

override_dh_clean:
	dh_clean
	find . -name "*.so" -delete
	find . -name "*.class" -delete
	find . -name "*.jar" -type f -delete
	find visualvm -name 'build' -not -path visualvm/libs.profiler/lib.profiler/native/build | xargs rm -Rf
	find -type l -delete