init
[qstardict] / debian / rules
1 #!/usr/bin/make -f
2
3 CFLAGS = -Wall
4
5 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
6         CFLAGS += -O0
7 else
8         CFLAGS += -O2
9 endif
10
11 configure: configure-stamp
12 configure-stamp:
13         dh_testdir
14         qmake-qt4
15         touch configure-stamp
16
17 build: build-stamp
18
19 build-stamp: configure-stamp 
20         dh_testdir
21         $(MAKE) CFLAGS="$(CFLAGS)"
22         touch $@
23
24 clean:
25         dh_testdir
26         dh_testroot
27         rm -f build-stamp configure-stamp
28         if test -f $(CURDIR)/Makefile; then \
29                 $(MAKE) distclean; \
30         fi
31         if test -f $(CURDIR)/qstardict/moc_dbusadaptor.o; then \
32             rm -f $(CURDIR)/qstardict/moc_dbusadaptor.o; \
33         fi
34         if test -f $(CURDIR)/qstardict/dbusadaptor.o; then \
35             rm -f $(CURDIR)/qstardict/dbusadaptor.o; \
36         fi
37         dh_clean
38
39 install:
40         dh_testdir
41         dh_testroot
42         dh_clean -k
43         dh_installdirs
44         cd $(CURDIR)/qstardict && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/qstardict install
45         cd $(CURDIR)/plugins && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/qstardict install
46         mkdir -p $(CURDIR)/debian/qstardict/usr/share/pixmaps
47         cp $(CURDIR)/debian/qstardict.xpm $(CURDIR)/debian/qstardict/usr/share/pixmaps/qstardict.xpm
48         cp $(CURDIR)/qstardict/qstardict.png $(CURDIR)/debian/qstardict/usr/share/pixmaps/qstardict.png
49         mkdir -p $(CURDIR)/debian/qstardict/usr/share/applications/hildon/
50         cp $(CURDIR)/qstardict/qstardict.desktop $(CURDIR)/debian/qstardict/usr/share/applications/hildon/qstardict.desktop
51
52 binary-indep: build install
53
54 binary-arch: install
55         dh_testdir
56         dh_testroot
57         dh_installmenu
58         dh_strip
59         dh_compress
60         dh_fixperms
61         dh_installdeb
62         dh_shlibdeps
63         dh_gencontrol
64         dh_md5sums
65         dh_builddeb
66
67 binary: binary-indep binary-arch
68 .PHONY: build clean binary-indep binary-arch binary install configure