File: rules

package info (click to toggle)
zotero-standalone-build 4.0.29.16%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 31,652 kB
  • ctags: 20,005
  • sloc: ansic: 23,474; xml: 23,099; sh: 13,930; sql: 2,918; java: 1,620; python: 1,184; lisp: 1,129; makefile: 698; cpp: 364; perl: 129; ruby: 99; sed: 5
file content (85 lines) | stat: -rwxr-xr-x 3,815 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/make -f

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

include /usr/share/dpkg/pkg-info.mk

export CLASSPATH=/usr/share/java/jackson-core.jar:/usr/share/java/jackson-annotations.jar:/usr/share/java/jackson-databind.jar:/usr/share/java/jna.jar:/usr/share/java/juh.jar:/usr/share/java/ridl.jar:/usr/share/java/unoil.jar
export JAVA_HOME=/usr/lib/jvm/default-java

%:
	dh $@ --with xul-ext,javahelper

override_dh_auto_build:
	# Create the XPI file
	mkdir -p zotero-build/xpi/build/
	cp -a zotero zotero-build/xpi/build/
	./zotero-build/xpi/build_xpi_4.0 zotero

	# Build the standalone package
	./zotero-standalone-build/build.sh -p l -s -f $$(pwd)/zotero-build/xpi/build/zotero-build.xpi

override_jh_build:
	jh_build -N zotero-standalone-build/modules/zotero-libreoffice-integration/build/oxt/Zotero.jar zotero-standalone-build/modules/zotero-libreoffice-integration/build/source
	# Add the RegistrationHandler.classes file
	jar uf zotero-standalone-build/modules/zotero-libreoffice-integration/build/oxt/Zotero.jar -C zotero-standalone-build/modules/zotero-libreoffice-integration/build/source org/zotero/integration/ooo/comp/RegistrationHandler.classes

override_dh_auto_install:
	rm -f zotero-standalone-build/staging/zotero-standalone/COPYING
	install-xpi -p xul-ext-zotero -r zotero-build/xpi/build/zotero-build.xpi

# We don't want to act on the jar in zotero-standalone (which is codeless)
override_jh_manifest:
	jh_manifest -plibreoffice-zotero-integration

# We don't want to act on the jar in zotero-standalone (which is codeless)
override_jh_depends:
	jh_depends -plibreoffice-zotero-integration

override_dh_auto_clean:
	rm -rf zotero-build/xpi/build/
	rm -rf zotero-standalone-build/staging zotero-standalone-build/dist
	rm -f zotero-standalone-build/modules/zotero-libreoffice-integration/build/oxt/Zotero.jar

# Update the following variables for each new upstream release
COMMIT_VERSION=4.0.29.16+dfsg
Z_COMMIT=55ee55ed7b
ZB_COMMIT=171117f0c7
ZSB_COMMIT=0e725a7e9c

get-orig-source:
	if [ "$(DEB_VERSION_UPSTREAM)" != "$(COMMIT_VERSION)" ]; then \
		echo "Debian version and commit version do not match."; \
		exit 1; \
	fi

	rm -rf zotero-standalone-build-$(DEB_VERSION_UPSTREAM)

	# Zotero
	git clone https://github.com/zotero/zotero.git zotero-standalone-build-$(DEB_VERSION_UPSTREAM)/zotero
	cd zotero-standalone-build-$(DEB_VERSION_UPSTREAM)/zotero && \
		git checkout $(Z_COMMIT) && \
		git submodule update --init --recursive

	# Zotero-build
	git clone https://github.com/zotero/zotero-build.git zotero-standalone-build-$(DEB_VERSION_UPSTREAM)/zotero-build
	cd zotero-standalone-build-$(DEB_VERSION_UPSTREAM)/zotero-build/ && \
		git checkout $(ZB_COMMIT) && \
		git submodule update --init --recursive

	# Zotero-standalone-build
	git clone https://github.com/zotero/zotero-standalone-build.git zotero-standalone-build-$(DEB_VERSION_UPSTREAM)/zotero-standalone-build
	cd zotero-standalone-build-$(DEB_VERSION_UPSTREAM)/zotero-standalone-build/ && \
		git checkout $(ZSB_COMMIT) && \
		git submodule update --init --recursive && \
		git submodule deinit modules/zotero-word-for-mac-integration && \
		git submodule deinit modules/zotero-word-for-windows-integration && \
		rm -rf win/ mac/* linux/updater-* modules/zotero-libreoffice-integration/build/lib/*.jar modules/zotero-libreoffice-integration/install/Zotero_OpenOffice_Integration.oxt

	# Pack reproducible orig tarball
	tar -caf zotero-standalone-build_$(DEB_VERSION_UPSTREAM).orig.tar.xz \
		--format=pax --owner=root --group=root --mode='a=rX,u+w' --sort=name --exclude-vcs \
		--mtime=@`cd zotero-standalone-build-$(DEB_VERSION_UPSTREAM)/zotero-standalone-build/ && git log -n1 --format=%ct` \
		zotero-standalone-build-$(DEB_VERSION_UPSTREAM)
	rm -rf zotero-standalone-build-$(DEB_VERSION_UPSTREAM)