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.
9 PACKAGE_VERSION ?= $(shell dpkg-parsechangelog | sed -n 's/^Version: // p')
13 LDFLAGS = -Wl,--rpath=$(PREFIX)/lib
14 CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
16 ifeq (,$(findstring no,$(DPL_LOGS)))
17 DPL_LOGS_STATUS = "ON"
19 DPL_LOGS_STATUS = "OFF"
24 # Add here commands to configure the package.
25 mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
27 -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
28 -DDPL_LOG=$(DPL_LOGS_STATUS) \
29 -DCMAKE_PACKAGE_VERSION=${PACKAGE_VERSION} ..
32 build-stamp: config.status
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}; \
49 rm -rf $(CMAKE_BUILD_DIR)
58 # Add here commands to install the package into debian/ncurses.
59 cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
62 # Build architecture-independent files here.
63 binary-indep: build install
64 # We have nothing to do by default.
66 # Build architecture-dependent files here.
67 binary-arch: build install
73 dh_install --sourcedir=debian/tmp
86 dh_strip --dbg-package=wrt-installer-dbg
97 binary: binary-indep binary-arch
98 .PHONY: build clean binary-indep binary-arch binary install