File: rules

package info (click to toggle)
winff 1.6.4%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,340 kB
  • sloc: pascal: 3,455; xml: 1,386; sh: 330; makefile: 37
file content (61 lines) | stat: -rwxr-xr-x 1,981 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
#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1

# Set temporary HOME for lazarus primary config directory
export HOME = $(CURDIR)/tmphome

# needed for reproducibility
export BUILD_DATE = $(shell date -d @$(SOURCE_DATE_EPOCH) +'%Y-%m-%d %H:%M:%S')
export LC_ALL = C.UTF-8
export TZ = UTC

%:
	dh $@

override_dh_auto_configure:
	if [ -f winff/presets.xml ] ; then mv winff/presets.xml winff/presets-orig.xml; fi

override_dh_auto_build-arch:
	lazbuild --widgetset=qt5 winff/winff.lpr
	mv winff/winff winff/winff-qt

override_dh_auto_build-indep:
# bug 768733: if $HOME does not exist, soffice fails to build pdf's
	mkdir -p $(CURDIR)/tmpoffice
	export HOME=$(CURDIR)/tmpoffice

	faketime -f '$(BUILD_DATE)' \
	/usr/bin/soffice --headless --convert-to pdf --outdir winff/docs winff/docs/WinFF.es_AR.odg

	faketime -f '$(BUILD_DATE)' \
	/usr/bin/soffice --headless --convert-to pdf --outdir winff/docs winff/docs/WinFF.ca.odt

	faketime -f '$(BUILD_DATE)' \
	/usr/bin/soffice --headless --convert-to pdf --outdir winff/docs winff/docs/WinFF.en.odt

	faketime -f '$(BUILD_DATE)' \
	/usr/bin/soffice --headless --convert-to pdf --outdir winff/docs winff/docs/WinFF.fr.odt

	faketime -f '$(BUILD_DATE)' \
	/usr/bin/soffice --headless --convert-to pdf --outdir winff/docs winff/docs/WinFF.nl.odt

	faketime -f '$(BUILD_DATE)' \
	/usr/bin/soffice --headless --convert-to pdf --outdir winff/docs winff/docs/WinFF.pt_BR.odt

# winff only searches pdf files for the first two characters of the language code,
# and we don't have a European Spanish or Portuguese Manual translation yet.
	if [ ! -f winff/docs/WinFF.es.pdf ] ; then \
		mv winff/docs/WinFF.es_AR.pdf winff/docs/WinFF.es.pdf ; \
	fi ; true

	if [ ! -f winff/docs/WinFF.pt.pdf ] ; then \
		mv winff/docs/WinFF.pt_BR.pdf winff/docs/WinFF.pt.pdf ; \
	fi ; true

override_dh_compress:
	dh_compress -X.pdf

execute_before_dh_clean:
	if [ -f winff/presets-orig.xml ] ; then mv winff/presets-orig.xml winff/presets.xml; fi