po templates, debian/rules and install policy
[cell-modem-ui] / cell-modem-ui / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 config.status: configure
5         dh_testdir
6
7 configure: configure-stamp
8
9 configure-stamp:
10 #       libtoolize --automake
11 #       aclocal-1.7 || aclocal
12 #       autoconf
13 #       autoheader
14 #       automake-1.7 --add-missing --foreign || automake --add-missing> --foreign
15         touch configure-stamp
16
17
18 build: build-stamp
19
20 build-stamp:  config.status
21         dh_testdir
22         touch build-stamp
23
24 clean:
25         dh_testdir
26         dh_testroot
27         rm -f build-stamp 
28         [ ! -f Makefile ] || $(MAKE) distclean
29 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
30         cp -f /usr/share/misc/config.sub config.sub
31 endif
32 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
33         cp -f /usr/share/misc/config.guess config.guess
34 endif
35         rm -f configure Makefile.in aclocal.m4 configure-stamp build-stamp config.guess config.sub depcomp install-sh ltmain.sh missing mkinstalldirs config.h.in
36         dh_clean 
37
38 install: build
39         dh_testdir
40         dh_testroot
41         dh_clean -k 
42         dh_installdirs
43
44         # install our xml to /opt
45         mkdir -p $(CURDIR)/debian/tmp/opt/cell-modem-ui
46         cp $(CURDIR)/etc/systemui/*.xml $(CURDIR)/debian/tmp/opt/cell-modem-ui/
47
48         # install our translations by hand
49         for i in fi_FI en_GB en_US es_ES fr_FR sv_SE pl_PL nl_NL it_IT de_DE; do
50                 mkdir -p $(CURDIR)/debian/tmp/usr/share/locale/$i/LC_MESSAGES
51                 msgfmt $(CURDIR)/po/$i.po -o $(CURDIR)/debian/tmp/usr/share/locale/$i/LC_MESSAGES/cell-modem-ui.mo
52         done
53
54 binary-indep: build install
55
56 binary-arch: build install
57         dh_testdir
58         dh_testroot
59         dh_installchangelogs
60         dh_installdocs
61         dh_install -v --sourcedir=debian/tmp
62         dh_link
63         dh_strip --dbg-package=cell-modem-ui
64         dh_compress
65         dh_fixperms
66         dh_makeshlibs -V
67         dh_installdeb
68         dh_shlibdeps
69         dh_gencontrol
70         dh_md5sums
71         dh_builddeb
72
73 binary: binary-indep binary-arch
74 .PHONY: build clean binary-indep binary-arch binary install