Update wrt-installer_0.0.69
[framework/web/wrt-installer.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 PACKAGE_VERSION ?= $(shell dpkg-parsechangelog | sed -n 's/^Version: // p')
10
11 PREFIX ?= /usr
12 DATADIR ?= /opt
13 LDFLAGS = -Wl,--rpath=$(PREFIX)/lib
14 CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
15
16 ifeq (,$(findstring no,$(DPL_LOGS)))
17         DPL_LOGS_STATUS = "ON"
18 else
19         DPL_LOGS_STATUS = "OFF"
20 endif
21
22 config.status:
23         dh_testdir
24         # Add here commands to configure the package.
25         mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
26         cmake ${SRCDIR} \
27                 -DCMAKE_INSTALL_PREFIX="${PREFIX}"      \
28                 -DDPL_LOG=$(DPL_LOGS_STATUS)            \
29                 -DCMAKE_PACKAGE_VERSION=${PACKAGE_VERSION} ..
30 build: build-stamp
31
32 build-stamp:  config.status
33         dh_testdir
34         # Add here commands to compile the package.
35         cd $(CMAKE_BUILD_DIR) && $(MAKE) -j 4
36         #docbook-to-man debian/ncurses.sgml > ncurses.1
37         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
38                 cat $$f > $${f%.in}; \
39                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
40                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
41         done
42
43         touch $@
44
45 clean:
46         dh_testdir
47         dh_testroot
48         rm -f build-stamp
49         rm -rf $(CMAKE_BUILD_DIR)
50         dh_clean
51
52 install: build
53         dh_testdir
54         dh_testroot
55         dh_clean -k
56         dh_installdirs
57
58         # Add here commands to install the package into debian/ncurses.
59         cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
60
61
62 # Build architecture-independent files here.
63 binary-indep: build install
64 # We have nothing to do by default.
65
66 # Build architecture-dependent files here.
67 binary-arch: build install
68         dh_testdir
69         dh_testroot
70         dh_installchangelogs
71         dh_installdocs
72         dh_installexamples
73         dh_install --sourcedir=debian/tmp
74 #       dh_installmenu
75 #       dh_installdebconf
76 #       dh_installlogrotate
77 #       dh_installemacsen
78 #       dh_installpam
79 #       dh_installmime
80 #       dh_python
81 #       dh_installinit
82 #       dh_installcron
83 #       dh_installinfo
84         dh_installman
85         dh_link
86         dh_strip --dbg-package=wrt-installer-dbg
87         dh_compress
88         dh_fixperms
89 #       dh_perl
90         dh_makeshlibs
91         dh_installdeb
92         dh_shlibdeps
93         dh_gencontrol
94         dh_md5sums
95         dh_builddeb
96
97 binary: binary-indep binary-arch
98 .PHONY: build clean binary-indep binary-arch binary install