Qt 4.6
[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         /opt/qt4-maemo5/bin/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         mkdir -p $(CURDIR)/debian/qstardict/usr/share/icons/hicolor/scalable/hildon
49         cp $(CURDIR)/qstardict/qstardict.png $(CURDIR)/debian/qstardict/usr/share/pixmaps/qstardict.png
50         cp $(CURDIR)/qstardict/qstardict.png $(CURDIR)/debian/qstardict/usr/share/icons/hicolor/scalable/hildon/qstardict.png
51         mkdir -p $(CURDIR)/debian/qstardict/usr/share/icons/hicolor/26x26/hildon
52         cp $(CURDIR)/debian/qstardict.png $(CURDIR)/debian/qstardict/usr/share/icons/hicolor/26x26/hildon/qstardict.png
53         mkdir -p $(CURDIR)/debian/qstardict/usr/share/applications/hildon/
54         cp $(CURDIR)/qstardict/qstardict.desktop $(CURDIR)/debian/qstardict/usr/share/applications/hildon/qstardict.desktop
55         mkdir -p $(CURDIR)/debian/qstardict/usr/share/doc/qstardict
56         cp $(CURDIR)/debian/copyright $(CURDIR)/debian/qstardict/usr/share/doc/qstardict/copyright
57
58 binary-indep: build install
59
60 binary-arch: install
61         dh_maemo_package_icons
62         dh_testdir
63         dh_testroot
64         dh_installmenu
65         dh_strip
66         dh_compress
67         dh_fixperms
68         dh_installdeb
69         dh_shlibdeps
70         dh_gencontrol
71         dh_md5sums
72         if test -x /usr/bin/maemo-optify; then \
73                 maemo-optify; \
74         fi
75         dh_builddeb
76         dh_maemo_package_icons -r
77
78 binary: binary-indep binary-arch
79 .PHONY: build clean binary-indep binary-arch binary install configure