2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
8 # These are used for cross-compiling and for saving the configure script
9 # from having to guess our platform (since we know it already)
10 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
11 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13 # FOR AUTOCONF 2.52 AND NEWER ONLY
14 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
15 confflags += --build $(DEB_HOST_GNU_TYPE)
17 confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
21 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
25 # use thumb mode if it's enabled
26 ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
30 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
31 confflags += --enable-debug
34 ifneq (,$(findstring docs,$(DEB_BUILD_OPTIONS)))
35 confflags += --enable-gtk-doc
38 ifneq (,$(findstring dmalloc,$(DEB_BUILD_OPTIONS)))
39 CONFIG_DMALLOC=--enable-dmalloc
40 CFLAGS += -DDMALLOC_ENABLE
46 configure: configure.ac debian/changelog
49 config.status: configure
51 ifneq (,$(findstring docs,$(DEB_BUILD_OPTIONS)))
52 if [ ! -f doc/gtk-doc.make ]; then gtkdocize --copy --docdir doc; fi
54 # Add here commands to configure the package.
55 CFLAGS="$(CFLAGS)" ./configure $(confflags) \
57 --mandir=\$${prefix}/share/man \
58 --localstatedir=/var \
65 --with-udhcpc=/sbin/udhcpc \
77 build-stamp: config.status
79 # Add here commands to compile the package.
87 # Add here commands to clean up after the build process.
88 -if [ -f Makefile ] ; then $(MAKE) distclean ; fi
89 -test -r /usr/share/misc/config.sub && \
90 cp -f /usr/share/misc/config.sub config.sub
91 -test -r /usr/share/misc/config.guess && \
92 cp -f /usr/share/misc/config.guess config.guess
100 # Add here commands to install the package into debian/tmp
101 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
102 # Create document dir although it is only used if docs are built
103 -mkdir -p debian/tmp/usr/share/gtk-doc/html/connman
104 # Services file is copied separately
105 # the system-services dir is in use in Maemo Fremantle release
106 -mkdir -p debian/tmp/usr/share/dbus-1/system-services
107 -cp src/connman.service debian/tmp/usr/share/dbus-1/system-services/org.moblin.connman.service
109 # the services dir is in use in Maemo Diablo release
110 #-mkdir -p debian/tmp/usr/share/dbus-1/services
111 #-cp src/connman.service debian/tmp/usr/share/dbus-1/services/
113 # test scripts to usr/bin
114 -mkdir -p debian/tmp/usr/bin
115 -cp -a test/*-* debian/tmp/usr/bin/
118 -mkdir -p debian/tmp/var/lib/connman
119 -mkdir -p debian/tmp/var/run/connman
121 # Build architecture-independent files here.
122 binary-indep: build install
123 # We have nothing to do by default.
125 # Build architecture-dependent files here.
126 binary-arch: build install
131 dh_install --sourcedir=debian/tmp --list-missing -v
132 dh_installinit -- start 59 2 3 4 . stop 15 0 1 5 6 .
135 dh_strip --dbg-package=connman
145 binary: binary-indep binary-arch
147 .PHONY: build clean binary-indep binary-arch binary install