afb-client-demo: real raw output when --raw is set
[src/app-framework-binder.git] / conf.d / packaging / debian.rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Uncomment this to turn on verbose mode.
4 export DH_VERBOSE=1
5
6 # These are used for cross-compiling and for saving the configure script
7 # from having to guess our platform (since we know it already)
8 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
10
11
12 CFLAGS = -Wall -g
13
14 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
15        CFLAGS += -O0
16 else
17        CFLAGS += -O2
18 endif
19 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
20        INSTALL_PROGRAM += -s
21 endif
22
23 configure: configure-stamp
24 configure-stamp:
25         dh_testdir
26         #
27         touch configure-stamp
28
29 build: build-stamp
30 build-stamp: configure-stamp
31         dh_testdir
32         mkdir -p build
33         export PKG_CONFIG_PATH=/opt/AGL/lib/$(DEB_HOST_MULTIARCH)/pkgconfig;cd build;cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=/opt/AGL -DCMAKE_INSTALL_LIBDIR:PATH=lib/$(DEB_HOST_MULTIARCH) -DAGL_DEVEL=1 -DINCLUDE_MONITORING=ON;$(MAKE)
34         touch build-stamp
35
36 clean:
37         #dh_testdir
38         dh_testroot
39         rm -f configure-stamp build-stamp
40         [ ! -f Makefile ] || $(MAKE) distclean
41         #dh_clean
42
43 install: build
44         dh_testdir
45         dh_testroot
46         dh_prep
47         dh_installdirs
48         # Add here commands to install the package into debian/tmp
49         cd build;make install DESTDIR=/usr/src/packages/BUILD/debian/tmp
50         mkdir -p debian/tmp/etc/profile.d
51         echo '#----------  AGL app-framework-binder options Start ---------" '                          > debian/tmp/etc/profile.d/AGL_app-framework-binder.sh
52         echo '# Object: AGL cmake option for  binder/bindings'                                          >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh
53         echo 'export LD_LIBRARY_PATH=/opt/AGL/lib/$(DEB_HOST_MULTIARCH):$${LD_LIBRARY_PATH}'            >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh
54         echo 'export LIBRARY_PATH=/opt/AGL/lib/$(DEB_HOST_MULTIARCH):$${LIBRARY_PATH}'                  >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh
55         echo 'export PKG_CONFIG_PATH=/opt/AGL/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:$${PKG_CONFIG_PATH}'  >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh
56         echo 'export PATH=/opt/AGL/bin:$${PATH}'                                                        >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh
57         echo '#----------  AGL options End ---------'                                                   >> debian/tmp/etc/profile.d/AGL_app-framework-binder.sh
58         # Move all files in their corresponding package
59         dh_install --list-missing -s --sourcedir=debian/tmp
60         # empty dependency_libs in .la files
61         #sed -i "/dependency_libs/ s/'.*'/''/" `find debian/ -name '*.la'`
62
63 # Build architecture-independent files here.
64 binary-indep: build install
65 # We have nothing to do by default.
66
67 # Build architecture-dependent files here.
68 binary-arch: build install
69         dh_testdir
70         dh_testroot
71         dh_installchangelogs
72         dh_installdocs
73         dh_installexamples
74         dh_installman
75         dh_link
76         dh_strip
77         dh_compress
78         dh_fixperms
79         dh_makeshlibs -V
80         dh_installdeb
81         #dh_shlibdeps
82         dh_gencontrol
83         dh_md5sums
84         dh_builddeb
85
86 binary: binary-indep binary-arch
87 .PHONY: build clean binary-indep binary-arch binary install