File: rules

package info (click to toggle)
android-platform-tools-apksig 30.0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 7,464 kB
  • sloc: java: 20,312; sh: 218; makefile: 32
file content (41 lines) | stat: -rwxr-xr-x 1,323 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
include /usr/share/javahelper/java-vars.mk

export JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=/usr/share/java/apksig.jar

%:
	dh $@ --with maven_repo_helper,javahelper,bash-completion --buildsystem=gradle

debian/%.1: debian/%.1.md
	pandoc --standalone --from=markdown-smart --to=man --output=$@ $<

override_dh_auto_build: apksigner.jar
	dh_auto_build

apksigner.jar: debian/apksigner.1
	jh_build --javacopts="--release 8 -sourcepath src/main/java" --no-javadoc \
		--main=com.android.apksigner.ApkSignerTool \
		$@ src/apksigner/java
	jar uf $@ \
		-C src/apksigner/java com/android/apksigner/help.txt \
		-C src/apksigner/java com/android/apksigner/help_lineage.txt \
		-C src/apksigner/java com/android/apksigner/help_rotate.txt \
		-C src/apksigner/java com/android/apksigner/help_sign.txt \
		-C src/apksigner/java com/android/apksigner/help_verify.txt

override_jh_exec:
	jh_exec --indep --package=apksigner

override_dh_auto_test:
	dh_auto_test
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	java -jar apksigner.jar verify src/test/resources/com/android/apksig/original.apk
	for f in src/test/resources/com/android/apksig/*does-not-verify.apk; do \
		set -e; \
		echo should not verify: $$f; \
		! java -jar apksigner.jar verify $$f; \
	done
endif