dc004732e6d452761bcf47cf90a3ee7dfbed1420
[tunertool] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
5
6 # Uncomment this to turn on verbose mode.
7 export DH_VERBOSE=1
8
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13
14 CFLAGS = -Wall -g -mcpu=arm926ej-s 
15
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17         CFLAGS += -O0
18 else
19         CFLAGS += -O2
20 endif
21 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
22         INSTALL_PROGRAM += -s
23 endif
24
25 config.status: configure
26         dh_testdir
27         # Add here commands to configure the package.
28         CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
29      --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man \
30      --infodir=\$${prefix}/share/info --with-maemo
31
32 configure:
33         ./autogen.sh
34
35
36 build: build-stamp
37
38 build-stamp:  config.status
39         dh_testdir
40
41         # Add here commands to compile the package.
42         $(MAKE) 
43         touch build-stamp
44
45 clean:
46         dh_testdir
47         dh_testroot
48         rm -f build-stamp 
49
50         # Add here commands to clean up after the build process.
51         -$(MAKE) distclean
52
53         dh_clean 
54
55 install: build
56         dh_testdir
57         dh_testroot
58         dh_clean -k 
59         dh_installdirs
60         dh_link
61
62         # Add here commands to install the package
63         mkdir -p $(CURDIR)/debian/tmp/usr
64         mkdir -p $(CURDIR)/debian/tmp/usr/share/applications/hildon
65         mkdir -p $(CURDIR)/debian/tmp/usr/share/icons/hicolor/26x26/hildon
66         mkdir -p $(CURDIR)/debian/tmp/usr/share/icons/hicolor/40x40/hildon
67         mkdir -p $(CURDIR)/debian/tmp/usr/share/icons/hicolor/scalable/hildon
68         cp $(CURDIR)/src/tuner26.png $(CURDIR)/debian/tmp/usr/share/icons/hicolor/26x26/hildon/pkg_tuner.png
69         cp $(CURDIR)/src/tuner40.png $(CURDIR)/debian/tmp/usr/share/icons/hicolor/40x40/hildon/pkg_tuner.png
70         cp $(CURDIR)/src/tuner64.png $(CURDIR)/debian/tmp/usr/share/icons/hicolor/scalable/hildon/pkg_tuner.png
71         cp $(CURDIR)/tuner.desktop $(CURDIR)/debian/tmp/usr/share/applications/hildon/tuner.desktop
72         mkdir -p $(CURDIR)/debian/tmp/usr/bin
73         cp $(CURDIR)/src/tuner $(CURDIR)/debian/tmp/usr/bin
74         strip $(CURDIR)/debian/tmp/usr/bin/tuner
75
76 # Build architecture-independent files here.
77 binary-indep: build install
78 # We have nothing to do by default.
79
80 # Build architecture-dependent files here.
81 binary-arch: build install
82         dh_testdir
83         dh_testroot
84         dh_link
85         dh_strip
86         dh_compress
87         dh_fixperms
88         dh_installdeb
89         dh_shlibdeps
90         dh_gencontrol
91         dh_md5sums
92         dh_builddeb
93
94 binary: binary-indep binary-arch
95 .PHONY: build clean binary-indep binary-arch binary install configure