Skip to content
Snippets Groups Projects
Unverified Commit ea7dda84 authored by Jérôme Charaoui's avatar Jérôme Charaoui
Browse files

d/rules: fix/improve nodoc and nocheck profiles

parent dd41ccd5
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ Uploaders:
Build-Depends:
debhelper-compat (= 13),
default-jdk,
default-jdk-doc,
default-jdk-doc <!nodoc>,
gradle-debian-helper,
javahelper,
junit5 <!nocheck>,
......@@ -42,6 +42,7 @@ Description: Easy to use OpenPGP library
This package contains the core PGPainless classes.
Package: libpgpainless-core-java-doc
Build-Profiles: <!nodoc>
Architecture: all
Multi-Arch: foreign
Section: doc
......@@ -71,6 +72,7 @@ Description: Stateless OpenPGP Protocol with PGPainless - library
This package contains the PGPainless-SOP implementation classes.
Package: libpgpainless-sop-java-doc
Build-Profiles: <!nodoc>
Architecture: all
Multi-Arch: foreign
Section: doc
......@@ -98,6 +100,7 @@ Description: Stateless OpenPGP Protocol with PGPainless - runtime library
This package provides CLI command classes for PGPainless-SOP via picocli.
Package: libpgpainless-cli-java-doc
Build-Profiles: <!nodoc>
Architecture: all
Multi-Arch: foreign
Section: doc
......
usr/share/java/pgpainless-cli.jar:
Class-Path: sop-java-picocli.jar pgpainless-sop.jar
Main-Class: org.pgpainless.cli.PGPainlessCLI
usr/share/java/pgpainless-cli-tests.jar:
Class-Path: junit5-system-exit.jar bcutil.jar pgpainless-cli.jar
usr/share/java/pgpainless-core.jar:
Class-Path: bcpg.jar bcprov.jar slf4j-api.jar slf4j-simple.jar
usr/share/java/pgpainless-core-tests.jar:
Class-Path: bcutil.jar pgpainless-core.jar
usr/share/java/pgpainless-sop.jar:
Class-Path: sop-java.jar pgpainless-core.jar
usr/share/java/pgpainless-sop-tests.jar:
Class-Path: pgpainless-sop.jar
......@@ -8,20 +8,27 @@ TEST_SOP_CLASSPATH=$(TEST_CORE_CLASSPATH):/usr/share/java/sop-java.jar:pgpainles
TEST_CLI_CLASSPATH=$(TEST_SOP_CLASSPATH):/usr/share/java/sop-java-picocli.jar:/usr/share/java/junit5-system-exit.jar:pgpainless-cli/build/libs/pgpainless-cli.jar
JUNIT_OPTIONS=--scan-classpath --fail-if-no-tests --disable-ansi-colors
BUILD_TASKS = jar
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
BUILD_TASKS += javadoc
endif
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
BUILD_TASKS += testJar
endif
%:
dh $@ --buildsystem=gradle --with javahelper,maven_repo_helper
override_dh_auto_build:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
dh_auto_build -- jar testJar javadoc
else
dh_auto_build -- jar testJar
endif
dh_auto_build -- $(BUILD_TASKS)
execute_after_dh_auto_build:
for n in pgpainless-core pgpainless-sop pgpainless-cli; do \
cd $$n/build/libs; \
ln -sf $$n-$(DEB_VERSION_UPSTREAM).jar $$n.jar; \
test -e $$n-$(DEB_VERSION_UPSTREAM)-tests.jar && \
ln -sf $$n-$(DEB_VERSION_UPSTREAM)-tests.jar $$n-tests.jar; \
cd $(CURDIR); \
done
......@@ -42,10 +49,26 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
$(JUNIT_OPTIONS)
endif
execute_after_dh_install:
override_dh_install:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS $(DEB_BUILD_PROFILES))))
dh_install
else
dh_install -Nlibpgpainless-core-java-doc -Nlibpgpainless-cli-java-doc -Nlibpgpainless-sop-java-doc
endif
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_install -p libpgpainless-core-java pgpainless-core/build/libs/pgpainless-core-*tests.jar /usr/share/java
dh_install -p libpgpainless-sop-java pgpainless-sop/build/libs/pgpainless-sop-*tests.jar /usr/share/java
dh_install -p libpgpainless-cli-java pgpainless-cli/build/libs/pgpainless-cli-*tests.jar /usr/share/java
endif
override_dh_installman:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
dh_installman -p pgpainless-cli pgpainless-cli/packaging/man/*
endif
execute_after_jh_manifest:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
jh_manifest -c "junit5-system-exit.jar bcutil.jar pgpainless-cli.jar" debian/libpgpainless-cli-java/usr/share/java/pgpainless-cli-tests.jar
jh_manifest -c "bcutil.jar pgpainless-core.jar" debian/libpgpainless-core-java/usr/share/java/pgpainless-core-tests.jar
jh_manifest -c "pgpainless-sop.jar" debian/libpgpainless-sop-java/usr/share/java/pgpainless-sop-tests.jar
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment