From f03a45e35d27784be1afeb6e3a3a1ffc6455f9c9 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 21 Sep 2016 16:33:23 +0200 Subject: [PATCH] Compile with debug information and strip them during install Debian automatically creates debug symbol package of the binary is compiled with debug information. If it is compiled without -g, lintian warns about empty debug symbols. --- Makefile | 11 ++++++----- debian/rules | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8636bce..2cc363c 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ -CFLAGS = -O2 -Wall +CFLAGS = -O2 -Wall -g LDLIBS = -llockdev PREFIX ?= /usr/local +INSTALL ?= install -s all: sterm @@ -9,10 +10,10 @@ clean: rm -f sterm install: all - install -d $(DESTDIR)$(PREFIX)/bin - install -m 755 sterm $(DESTDIR)$(PREFIX)/bin + $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin + $(INSTALL) -m 755 sterm $(DESTDIR)$(PREFIX)/bin ifneq ($(NO_MAN),1) - install -d $(DESTDIR)$(PREFIX)/share/man/man1 - install -m 644 sterm.man $(DESTDIR)$(PREFIX)/share/man/man1/sterm.1 + $(INSTALL) -d $(DESTDIR)$(PREFIX)/share/man/man1 + $(INSTALL) -m 644 sterm.man $(DESTDIR)$(PREFIX)/share/man/man1/sterm.1 gzip -f $(DESTDIR)$(PREFIX)/share/man/man1/sterm.1 endif diff --git a/debian/rules b/debian/rules index 9fffce8..3fde8d7 100755 --- a/debian/rules +++ b/debian/rules @@ -19,6 +19,7 @@ include /usr/share/dpkg/default.mk # Variables to pass to sterm Makefile export PREFIX=/usr export NO_MAN=1 +export INSTALL=install # Do not strip - this will be handled by dh_strip # main packaging script based on dh7 syntax %: -- 2.39.2