~ubuntu-langpack/langpack-o-matic/main

464 by Martin Pitt
add support for building langpacks for custom classes
1
#!/usr/bin/make -f
2
3
# Uncomment this to turn on verbose mode.
4
#export DH_VERBOSE=1
5
6
PKGNAME=$(shell grep "^Package: " debian/control | head -1 | cut -f 2 -d\ )
7
PKG=$(shell pwd)/debian/$(PKGNAME)
8
LOCALEDIR=$(PKG)/usr/share/locale-langpack
9
10
build:
11
	dh_testdir
12
13
clean:
14
	dh_testdir
15
	dh_testroot
16
	dh_clean
17
18
binary-arch:
19
20
binary-indep:
21
	dh_testdir
22
	dh_testroot
23
	
24
	mkdir -p $(LOCALEDIR)
25
	cd data; \
26
	  find -type d -exec mkdir -p "$(LOCALEDIR)/{}" \; ; \
27
	  find -type f -name "*.po" -exec sh -c "N='{}'; msgfmt -o $(LOCALEDIR)/\$${N%.po}.mo \$$N" \; ; \
28
29
	[ ! -e data/extra.tar ] || tar -C $(PKG) -xf data/extra.tar
30
	[ ! -e data/static.tar ] || tar -C $(PKG) -xf data/static.tar
31
	
32
	dh_installdocs -i
33
	dh_installchangelogs -i
34
	dh_compress -i
35
	dh_fixperms -i
36
	dh_installdeb -i
37
	dh_gencontrol -i
38
	dh_md5sums -i
466 by Martin Pitt
switch to xz compression, bzip2 is outdated
39
	dh_builddeb -i -- -Z xz
464 by Martin Pitt
add support for building langpacks for custom classes
40
41
binary: binary-arch binary-indep
42
43
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary
44