File: rules

package info (click to toggle)
clamtk 3.10-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 628 kB
  • ctags: 31
  • sloc: perl: 1,532; makefile: 50
file content (62 lines) | stat: -rwxr-xr-x 1,525 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
#!/usr/bin/make -f
# -*- makefile -*-

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

include /usr/share/quilt/quilt.make
LOCALES_DIR = $(CURDIR)/debian/clamtk/usr/share/locale

build: patch build-stamp
build-stamp:
	dh_testdir
	@echo Generating new .mo files
	for locale in $(shell ls $(CURDIR)/po/*.mo | sed 's@.*/\(.*\)\.mo@\1@g'); \
		do mv $(CURDIR)/po/$$locale.mo $(CURDIR)/po/$$locale.mo.backup && \
		msgfmt $(CURDIR)/po/$$locale.po -o $(CURDIR)/po/$$locale.mo; \
	done
	touch $@

clean: unpatch
	dh_testdir
	dh_testroot
	@echo Moving back upstream's .mo's
	for locale in $(shell ls $(CURDIR)/po/*.mo.backup | sed 's@.*/\(.*\)\.mo\.backup@\1@g'); \
		do mv $(CURDIR)/po/$$locale.mo.backup $(CURDIR)/po/$$locale.mo; \
	done
	dh_clean build-stamp patch-stamp

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	dh_install
	
	@echo Installing locales now...
	for locale in $(shell ls $(CURDIR)/po/*.mo | sed 's@.*/\(.*\)\.mo@\1@g'); \
		do mkdir -p $(LOCALES_DIR)/$$locale/LC_MESSAGES/ && \
		install -m 644 $(CURDIR)/po/$$locale.mo $(LOCALES_DIR)/$$locale/LC_MESSAGES/clamtk.mo; \
	done

binary-arch: build install	
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGES
	dh_installdocs README
	dh_installmenu
	dh_link
	dh_strip
	dh_installman clamtk.1.gz
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install