#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) # FOR AUTOCONF 2.52 AND NEWER ONLY ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) confflags += --build $(DEB_HOST_GNU_TYPE) else confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) endif # nostrip option ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif # use thumb mode if it's enabled ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS))) CFLAGS += -mthumb endif ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) confflags += --enable-debug endif ifneq (,$(findstring docs,$(DEB_BUILD_OPTIONS))) confflags += --enable-gtk-doc endif ifneq (,$(findstring dmalloc,$(DEB_BUILD_OPTIONS))) CONFIG_DMALLOC=--enable-dmalloc CFLAGS += -DDMALLOC_ENABLE endif # default flags CFLAGS += -g -O2 configure: configure.ac debian/changelog ./bootstrap config.status: configure dh_testdir ifneq (,$(findstring docs,$(DEB_BUILD_OPTIONS))) if [ ! -f doc/gtk-doc.make ]; then gtkdocize --copy --docdir doc; fi endif # Add here commands to configure the package. CFLAGS="$(CFLAGS)" ./configure $(confflags) \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ --localstatedir=/var \ --sysconfdir=/etc \ --disable-fake \ --enable-loopback \ --enable-wifi \ --enable-bluetooth \ --enable-udhcp \ --with-udhcpc=/sbin/udhcpc \ --enable-dhclient \ --enable-resolvconf \ --enable-dnsproxy \ $(CONFIG_DMALLOC) $* # --enable-client # --enable-ethernet # --enable-ppp # --enable-udev build: build-stamp build-stamp: config.status dh_testdir # Add here commands to compile the package. $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. -if [ -f Makefile ] ; then $(MAKE) distclean ; fi -test -r /usr/share/misc/config.sub && \ cp -f /usr/share/misc/config.sub config.sub -test -r /usr/share/misc/config.guess && \ cp -f /usr/share/misc/config.guess config.guess dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/tmp $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp # Create document dir although it is only used if docs are built -mkdir -p debian/tmp/usr/share/gtk-doc/html/connman # Services file is copied separately # the system-services dir is in use in Maemo Fremantle release -mkdir -p debian/tmp/usr/share/dbus-1/system-services -cp src/connman.service debian/tmp/usr/share/dbus-1/system-services/org.moblin.connman.service # the services dir is in use in Maemo Diablo release #-mkdir -p debian/tmp/usr/share/dbus-1/services #-cp src/connman.service debian/tmp/usr/share/dbus-1/services/ # test scripts to usr/bin -mkdir -p debian/tmp/usr/bin -cp -a test/*-* debian/tmp/usr/bin/ # connman temp dirs -mkdir -p debian/tmp/var/lib/connman -mkdir -p debian/tmp/var/run/connman # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installdocs dh_installchangelogs dh_install --sourcedir=debian/tmp --list-missing -v dh_installinit -- start 59 2 3 4 . stop 15 0 1 5 6 . dh_installupstart dh_link dh_strip --dbg-package=connman dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install