~ubuntu-branches/ubuntu/jaunty/language-pack-kde-he/jaunty-updates

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Ubuntu automatic language-pack builder
  • Date: 2010-06-03 20:20:40 UTC
  • Revision ID: james.westby@ubuntu.com-20100603202040-axau9mk2ia2saspi
Tags: 1:9.04+20100531
Initial release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-he_$$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
        [ ! -e data/mozilla.tar.gz ] || tar -C $(PKG) -xzf data/mozilla.tar.gz
 
43
        
 
44
        dh_installdocs -i
 
45
        dh_installchangelogs -i
 
46
        dh_compress -i
 
47
        dh_fixperms -i
 
48
        dh_installdeb -i
 
49
        dh_gencontrol -i
 
50
        dh_md5sums -i
 
51
        dh_builddeb -i -- -Z bzip2
 
52
 
 
53
binary: binary-arch binary-indep
 
54
 
 
55
.PHONY: build clean binary-indep binary-arch binary
 
56