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')
12 LDFLAGS = -Wl,--rpath=$(PREFIX)/lib
13 CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
15 ifeq (,$(findstring no,$(DPL_LOGS)))
16 DPL_LOGS_STATUS = "ON"
18 DPL_LOGS_STATUS = "OFF"
21 # Please set CFLAGS only in CMakeLists.txt, as they are dependent on CMake build type.
23 #config.status: configure
26 # Add here commands to configure the package.
27 mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
29 -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
30 -DDPL_LOG=$(DPL_LOGS_STATUS) \
31 -DPROJECT_VERSION="${PACKAGE_VERSION}" ..
35 build-stamp: config.status
37 # Add here commands to compile the package.
38 cd $(CMAKE_BUILD_DIR) && $(MAKE) -j 4
39 #docbook-to-man debian/ncurses.sgml > ncurses.1
41 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
42 cat $$f > $${f%.in}; \
43 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
53 # Add here commands to clean up after the build process.
54 -find . -name CMakeFiles -exec rm -rf {} \;
55 -find . -name cmake_install.cmake -exec rm {} \;
56 #-find . -name Makefile -exec rm {} \;
59 rm -rf $(CMAKE_BUILD_DIR)
69 rm -rf build/install-sh
70 rm -rf build/ltmain.sh
73 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
74 cp -f /usr/share/misc/config.sub config.sub
76 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
77 cp -f /usr/share/misc/config.guess config.guess
80 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
93 # Add here commands to install the package into debian/ncurses.
94 cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
97 # Build architecture-independent files here.
98 binary-indep: build install
99 # We have nothing to do by default.
101 # Build architecture-dependent files here.
102 binary-arch: build install
108 dh_install --sourcedir=debian/tmp
111 # dh_installlogrotate
121 dh_strip --dbg-package=wrt-dbg
132 binary: binary-indep binary-arch
133 .PHONY: build clean binary-indep binary-arch binary install