~ubuntu-branches/ubuntu/trusty/language-pack-gnome-yi/trusty-proposed

1 by Ubuntu automatic language-pack builder
Initial release.
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
	rm -f debian/postinst
18
19
binary-arch:
20
21
binary-indep:
22
	dh_testdir
23
	dh_testroot
24
	
25
	mkdir -p $(LOCALEDIR)
26
	cd data; \
27
	  find -type d -exec mkdir -p "$(LOCALEDIR)/{}" \; ; \
28
	  find -type f -name "*.po" -exec sh -c "N='{}'; msgfmt -o $(LOCALEDIR)/\$${N%.po}.mo \$$N" \; ; \
29
	
30
	cd debian/upgrade-notes; for f in `ls`; do \
31
	    [ -e ../postinst ] || echo -e "#!/bin/sh -e\n\
32
[ \"\$$1\" = configure ] || exit 0\n\
33
[ -d /var/lib/update-notifier/user.d ] || exit 0\n\n" > ../postinst; \
34
	    echo -e "if dpkg --compare-versions \"\$$2\" lt-nl \"$$f\"; then\n \
35
		cat <<EOF > /var/lib/update-notifier/user.d/language-pack-yi_$$f;" >> ../postinst; \
36
	    cat $$f >> ../postinst; \
37
	    echo 'EOF' >> ../postinst; \
38
	    echo 'fi' >> ../postinst; \
39
	done
40
41
	[ ! -e data/extra.tar ] || tar -C $(PKG) -xf data/extra.tar
42
	
43
	dh_installdocs -i
44
	dh_installchangelogs -i
45
	dh_compress -i
46
	dh_fixperms -i
47
	dh_installdeb -i
48
	dh_gencontrol -i
49
	dh_md5sums -i
50
	dh_builddeb -i -- -Z bzip2
51
52
binary: binary-arch binary-indep
53
54
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary
55