~ubuntu-branches/ubuntu/maverick/language-pack-gnome-st/maverick-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: 2011-03-09 14:37:56 UTC
  • Revision ID: james.westby@ubuntu.com-20110309143756-8umgetyfxjcldjf7
Tags: 1:10.10+20110308
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
FIREFOX_ADDON_DIR=$(PKG)/usr/lib/firefox-addons/extensions
 
10
 
 
11
build: 
 
12
        dh_testdir
 
13
 
 
14
clean:
 
15
        dh_testdir
 
16
        dh_testroot
 
17
        dh_clean
 
18
        rm -f debian/postinst
 
19
 
 
20
binary-arch:
 
21
 
 
22
binary-indep:
 
23
        dh_testdir
 
24
        dh_testroot
 
25
        
 
26
        mkdir -p $(LOCALEDIR)
 
27
        cd data; \
 
28
          find -type d -exec mkdir -p "$(LOCALEDIR)/{}" \; ; \
 
29
          find -type f -name "*.po" -exec sh -c "N='{}'; msgfmt -o $(LOCALEDIR)/\$${N%.po}.mo \$$N" \; ; \
 
30
          find -type f -name '*.xpi' -exec install -D -m 644 "{}" "$(FIREFOX_ADDON_DIR)/`basename {}`" \;
 
31
        
 
32
        cd debian/upgrade-notes; for f in `ls`; do \
 
33
            [ -e ../postinst ] || echo -e "#!/bin/sh -e\n\
 
34
[ \"\$$1\" = configure ] || exit 0\n\
 
35
[ -d /var/lib/update-notifier/user.d ] || exit 0\n\n" > ../postinst; \
 
36
            echo -e "if dpkg --compare-versions \"\$$2\" lt-nl \"$$f\"; then\n \
 
37
                cat <<EOF > /var/lib/update-notifier/user.d/language-pack-st_$$f;" >> ../postinst; \
 
38
            cat $$f >> ../postinst; \
 
39
            echo 'EOF' >> ../postinst; \
 
40
            echo 'fi' >> ../postinst; \
 
41
        done
 
42
 
 
43
        [ ! -e data/extra.tar ] || tar -C $(PKG) -xf data/extra.tar
 
44
        [ ! -e data/mozilla.tar.gz ] || tar -C $(PKG) -xzf data/mozilla.tar.gz
 
45
        
 
46
        dh_installdocs -i
 
47
        dh_installchangelogs -i
 
48
        dh_compress -i
 
49
        dh_fixperms -i
 
50
        dh_installdeb -i
 
51
        dh_gencontrol -i
 
52
        dh_md5sums -i
 
53
        dh_builddeb -i -- -Z bzip2
 
54
 
 
55
binary: binary-arch binary-indep
 
56
 
 
57
.PHONY: build clean binary-indep binary-arch binary
 
58