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')
11 CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build
12 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -Wl,--hash-style=both -Wl,--version-script=$(CURDIR)/wrt-plugins-common.map
14 ifeq (,$(findstring no,$(DPL_LOGS)))
15 DPL_LOGS_STATUS = "ON"
17 DPL_LOGS_STATUS = "OFF"
22 # Add here commands to configure the package.
23 mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
24 CFLAGS= cmake ${SRCDIR} \
25 LDFLAGS="$(LDFLAGS)" \
26 -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
27 -DDPL_LOG=$(DPL_LOGS_STATUS) \
28 -DCMAKE_PROJECT_VERSION="$(PACKAGE_VERSION)" ..
31 build-stamp: configure-stamp
34 # Add here commands to compile the package.
35 cd $(CMAKE_BUILD_DIR) && $(MAKE) -j4
36 #docbook-to-man debian/ncurses.sgml > ncurses.1
38 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
39 cat $$f > $${f%.in}; \
40 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
48 rm -f build-stamp configure-stamp
49 rm -rf $(CMAKE_BUILD_DIR)
53 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
54 cp -f /usr/share/misc/config.sub config.sub
56 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
57 cp -f /usr/share/misc/config.guess config.guess
60 for f in `find $(CURDIR)/ -name "*.pc"`; do \
72 # Add here commands to install the package into debian/ncurses.
73 cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
75 # Build architecture-independent files here.
76 binary-indep: build install
77 # We have nothing to do by default.
79 # Build architecture-dependent files here.
80 binary-arch: build install
86 dh_install --sourcedir=debian/tmp
99 dh_strip --dbg-package=wrt-plugins-common-dbg
110 binary: binary-indep binary-arch
111 .PHONY: build clean binary-indep binary-arch binary install