File: rules

package info (click to toggle)
libjide-oss-java 3.7.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,444 kB
  • sloc: java: 91,177; xml: 661; makefile: 35
file content (43 lines) | stat: -rwxr-xr-x 1,346 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# export DH_VERBOSE=1
DPATH := $(abspath $(dir $(MAKEFILE_LIST)))
DTYPE := +dfsg
PKG := libjide-oss-java
VER ?= $(shell dpkg-parsechangelog -l$(DPATH)/changelog | perl -ne 'print $$1 if m{Version:\s*([\d\.]+)}')

%:
	dh $@ --with javahelper,jh_maven_repo_helper

override_dh_auto_build:
	cp -r src-jdk9/* src/
	dh_auto_build

override_dh_clean:
	dh_clean
	$(RM) -r $(CURDIR)/classes
	$(RM) -r $(CURDIR)/javadoc
	$(RM) $(CURDIR)/jide-oss-*.jar
	$(RM) $(CURDIR)/jide-oss-src-*.zip

.PHONY: get-orig-source
## http://wiki.debian.org/onlyjob/get-orig-source
get-orig-source: $(PKG)_$(VER).orig.tar.xz
	@

$(PKG)_$(VER).orig.tar.xz:
	@echo "# Cloning upstream git repository..."
	git clone https://github.com/jidesoft/jide-oss.git $(PKG)-$(VER)
	@echo "# Clean-up..."
	cd $(PKG)-$(VER) \
	&& git checkout -b debiansource $(VER) \
	&& for F in $$(git ls-tree -r --name-only HEAD); \
	do touch --no-dereference -d "$$(git log -1 --format="%ai" -- "$$F")" "$$F"; done \
	&& git log --pretty --numstat --summary | git2cl > ChangeLog \
	&& $(RM) -r -v \
		libs/ \
		src/com/jidesoft/plaf/aqua/AquaRangeSliderUI.java \
		.git/
	@echo "# Packing..."
	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
	| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
	&& $(RM) -r "$(PKG)-$(VER)"