File: rules

package info (click to toggle)
lightproof 1.5%2Bgit20140515-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 940 kB
  • ctags: 108
  • sloc: python: 1,353; xml: 48; makefile: 33; sh: 16
file content (57 lines) | stat: -rwxr-xr-x 1,889 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets  by Bill Allombert 2001

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

# This has to be exported to make some magic below work.
export DH_OPTIONS

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

%:
	dh $@ 

override_dh_auto_clean:
	find . -name "*.pyc" -exec rm {} \;
	find . -name "*.oxt" -exec rm {} \;
	dh_clean
	# manually needed as long as we don't build -editor
	rm -rf debian/libreoffice-lightproof-editor
	rm -f debian/libreoffice-lightproof-editor.substvars

override_dh_auto_build:
	for cfg in `find src -name "*.cfg"`; do \
		python3 make.py $$cfg; \
	done

override_dh_auto_install:
	for oxt in `find . -name "*.oxt"`; do \
		oxt=`echo $$oxt | sed -e 's,./,,'`; \
		pkg="libreoffice-`echo $$oxt | cut -d- -f1 | sed -e "s/_/-/g" | tr A-Z a-z`"; \
		dir=`echo $$oxt | cut -d- -f1`; \
		mkdir -p $(CURDIR)/debian/$$pkg/usr/lib/libreoffice/share/extensions/$$dir && \
		cd $(CURDIR)/debian/$$pkg/usr/lib/libreoffice/share/extensions/$$dir && \
			unzip -o $(CURDIR)/$$oxt; \
	done

override_dh_gencontrol:
	for oxt in `find . -name "*.oxt"`; do \
		oxt=`echo $$oxt | sed -e 's,./,,'`; \
		pkg="libreoffice-`echo $$oxt | cut -d- -f1 | sed -e "s/_/-/g" | tr A-Z a-z`"; \
		if ! dh_listpackages | grep -q $$pkg; then continue; fi; \
		ver=$$(basename $$(echo $$oxt | cut -d- -f2) .oxt); \
		dh_gencontrol -p$$pkg -- -v$$ver+$(DEB_VERSION); \
	done

override_dh_installdocs:
	dh_installdocs -p