aboutsummaryrefslogtreecommitdiffstats
path: root/resources/install/debian/rules.tmpl
blob: 83715095c52be1b9bcd8de3e1adef98cf04f05a1 (plain)
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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export JAVA_HOME=/usr/lib/jvm/default-java
export PACKAGE_NAME=_PACKAGE_NAME_
export ANT=ant

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

libjitsiVersion = $(shell dpkg -s libjitsi | grep Version: | awk '{print $$2}')

%:
	dh $@ --with javahelper

override_dh_auto_build:
	dh_auto_build -- _BUILD_TARGET_

# Copy OS specific and native libs
override_dh_install-indep:
	dh_install -p$(PACKAGE_NAME) -Xslickless.jar -Xslick-runner.jar -X-slick.jar -X.svn -Xcommons-codec.jar -Xcommons-lang.jar
# make and install the debian specific bundles
# use the prebuild and installed bundles to extract/modify and use the
# exising debian java packages
	$(ANT) -file build.xml -Ddebian.bundles.dest=debian/$(PACKAGE_NAME)/usr/share/$(PACKAGE_NAME)/sc-bundles -Ddebian.bundles.common.dest=debian/$(PACKAGE_NAME)-common/usr/share/$(PACKAGE_NAME)-common deb-bundle-jna deb-bundle-util deb-bundle-sysactivitynotifications deb-bundle-swing-ui deb-bundle-json deb-bundle-smacklib deb-bundle-jmdnslib deb-bundle-desktoputil deb-bundle-bouncycastle deb-bundle-plugin-accountinfo deb-bundle-commons-lang deb-bundle-hsqldb deb-libjitsi-deps deb-bundle-httpmime deb-bundle-common deb-bundle-slf4j

override_dh_install-arch:
ifeq ($(DEB_HOST_ARCH),amd64)
	dh_install -p$(PACKAGE_NAME)-jni lib/native/linux-64/*.so usr/lib/jni/
else
	dh_install -p$(PACKAGE_NAME)-jni lib/native/linux/*.so usr/lib/jni/
endif

# we have folders with name *.jar which jh_manifest don't like and fails,
# we do not use it so skip it
override_jh_manifest:
	# do nothing

override_dh_auto_clean:
	dh_auto_clean -- clean-debuild

override_dh_gencontrol:
	dh_gencontrol -- -Vlibjitsi:version="$(libjitsiVersion)"

get-orig-source:
	uscan