Remove obsolete file.
[connman] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
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)
12
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)
16 else
17   confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
18 endif
19
20 # nostrip option
21 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
22         INSTALL_PROGRAM += -s
23 endif
24
25 # use thumb mode if it's enabled
26 ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
27        CFLAGS += -mthumb
28 endif
29
30 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
31         confflags += --enable-debug
32 endif
33
34 ifneq (,$(findstring docs,$(DEB_BUILD_OPTIONS)))
35         confflags += --enable-gtk-doc
36 endif
37
38 ifneq (,$(findstring dmalloc,$(DEB_BUILD_OPTIONS)))
39         CONFIG_DMALLOC=--enable-dmalloc
40         CFLAGS += -DDMALLOC_ENABLE
41 endif
42
43 # default flags
44 CFLAGS += -g -O2
45
46 configure: configure.ac debian/changelog
47         ./bootstrap
48
49 config.status: configure
50         dh_testdir
51 ifneq (,$(findstring docs,$(DEB_BUILD_OPTIONS)))
52         if [ ! -f doc/gtk-doc.make ]; then gtkdocize --copy --docdir doc; fi
53 endif
54         # Add here commands to configure the package.
55          CFLAGS="$(CFLAGS)" ./configure $(confflags) \
56                 --prefix=/usr \
57                 --mandir=\$${prefix}/share/man \
58                 --localstatedir=/var \
59                 --sysconfdir=/etc \
60                 --disable-fake \
61                 --enable-loopback \
62                 --enable-wifi \
63                 --enable-bluetooth \
64                 --enable-udhcp \
65                 --with-udhcpc=/sbin/udhcpc \
66                 --enable-dhclient \
67                 --enable-resolvconf \
68                 --enable-dnsproxy \
69                 $(CONFIG_DMALLOC) $*
70 #               --enable-client
71 #               --enable-ethernet
72 #               --enable-ppp 
73 #               --enable-udev
74
75 build: build-stamp
76
77 build-stamp:  config.status
78         dh_testdir
79         # Add here commands to compile the package.
80         $(MAKE)
81         touch build-stamp
82
83 clean:
84         dh_testdir
85         dh_testroot
86         rm -f build-stamp 
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
93         dh_clean
94
95 install: build
96         dh_testdir
97         dh_testroot
98         dh_clean -k
99         dh_installdirs
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
108
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/
112
113         # test scripts to usr/bin
114         -mkdir -p debian/tmp/usr/bin
115         -cp -a test/*-* debian/tmp/usr/bin/
116
117         # connman temp dirs
118         -mkdir -p debian/tmp/var/lib/connman
119         -mkdir -p debian/tmp/var/run/connman
120
121 # Build architecture-independent files here.
122 binary-indep: build install
123 # We have nothing to do by default.
124
125 # Build architecture-dependent files here.
126 binary-arch: build install
127         dh_testdir
128         dh_testroot
129         dh_installdocs
130         dh_installchangelogs
131         dh_install --sourcedir=debian/tmp --list-missing -v
132         dh_installinit --  start 59 2 3 4 . stop 15 0 1 5 6 .
133         dh_installupstart
134         dh_link
135         dh_strip --dbg-package=connman
136         dh_compress
137         dh_fixperms
138         dh_makeshlibs
139         dh_installdeb
140         dh_shlibdeps
141         dh_gencontrol
142         dh_md5sums
143         dh_builddeb
144
145 binary: binary-indep binary-arch
146
147 .PHONY: build clean binary-indep binary-arch binary install