File: rules

package info (click to toggle)
dict-elements 20001107-a-9
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 180 kB
  • sloc: sh: 45; makefile: 38
file content (52 lines) | stat: -rwxr-xr-x 2,114 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
#!/usr/bin/make -f
# -*- makefile -*-

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

pkg             := dict-elements
BUILD_DATE      := $(shell dpkg-parsechangelog --show-field Date)
DICTDIR         = debian/$(pkg)/usr/share/dictd
FILES_TO_CLEAN  = debian/files *.dict* *.index debian/*.log debian/*.substvars
DIRS_TO_CLEAN   = debian/$(pkg)
install_file    = /usr/bin/install -p -o root -g root -m 644
install_program = /usr/bin/install -p -o root -g root -m 755
make_directory  = /usr/bin/install -d -o root -g root -m 755

%:
	dh $@

override_dh_clean:
	dh_clean
	-rm -f  $(FILES_TO_CLEAN)
	-rm -rf $(DIRS_TO_CLEAN)
	-rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
                -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
                -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS

override_dh_auto_build:
	cat elements|/usr/bin/dictfmt -p -u http://www.miranda.org/~jkominek/elements/ -s "The Elements (07Nov00)" --without-time elements
	# Ensure deterministic mtime in elements.dict.dz for dictzip
	touch --date='$(BUILD_DATE)' elements.dict
	/usr/bin/dictzip elements.dict

override_dh_auto_install:
	rm -rf               debian/$(pkg)-* debian/tmp.deb
	$(make_directory)    debian/$(pkg)
	$(make_directory)    debian/$(pkg)/usr
	$(make_directory)    debian/$(pkg)/usr/share
	$(make_directory)    debian/$(pkg)/usr/share/dictd
	$(make_directory)    debian/$(pkg)/usr/share/doc
	$(make_directory)    debian/$(pkg)/usr/share/doc/$(pkg)
	$(install_file)      elements.dict.dz $(DICTDIR)
	$(install_file)      elements.index $(DICTDIR)
	-rm -f               elements.dict.dz
	-rm -f               elements.index
	$(install_file)      debian/changelog \
		             debian/$(pkg)/usr/share/doc/$(pkg)/changelog.Debian
#	$(install_file)      debian/changelog \
#		             debian/$(pkg)/usr/share/doc/$(pkg)/changelog
	gzip -9frqn          debian/$(pkg)/usr/share/doc/$(pkg)/
# Make sure the copyright file is not compressed
	$(install_file)      debian/copyright \
	                     debian/$(pkg)/usr/share/doc/$(pkg)/copyright