File: rules

package info (click to toggle)
starjava-util 1.0%2B2024.11.05-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,664 kB
  • sloc: java: 16,366; xml: 473; makefile: 26; sh: 2
file content (31 lines) | stat: -rwxr-xr-x 1,005 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
#!/usr/bin/make -f

%:
	dh $@ --with javahelper

override_dh_auto_build:
	ant jars
	ant javadocs

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	ant test -Djava.awt.headless=true
endif

get-orig-source:
	git clone --filter=blob:none --sparse --single-branch --branch master \
	    https://github.com/Starlink/starjava \
            starjava-repo
	cd starjava-repo; \
	TAG=`git tag --list stilts-\* --sort=creatordate |tail -1` ;\
	git switch --detach $$TAG ; \
	git sparse-checkout add util ; \
	git log -1 --format=%as util/ | tr - . > ../starjava-date.txt
	mv starjava-repo/util starjava-util
	mv starjava-repo/LICENSE.txt starjava-util
	rm -rf starjava-repo
	VERSION=`xmllint --xpath '//project/property[@name="version"]/@value' starjava-util/build.xml | cut -d\" -f2| tr - .| tr -d +` ; \
	DATE=`cat starjava-date.txt`; \
	tar cf starjava-util_$$VERSION+$$DATE.orig.tar starjava-util ; \
	rm -rf starjava-util  starjava-date.txt ; \
	xz starjava-util_$$VERSION+$$DATE.orig.tar