Re: [ptxdist] [PATCH 4/8] [statserial] Added statserial 1.1 with Ubuntu patches
On Mon, Apr 26, 2010 at 01:42:42PM +0200, Carsten Schlote wrote: From: Carsten Schlote c.schl...@konzeptpark.de Added simple tool to monitor modem status lines on serial ports. Either display line status with an ncurses interface or return a decimal or hex value. Useful to check operation of serial ports with an EOL test. Signed-off-by: Carsten Schlote c.schl...@konzeptpark.de --- .../statserial-1.1.orig/crosscompile-fixes.patch | 42 +++ patches/statserial-1.1.orig/series |2 + .../statserial-1.1.orig/statserial_1.1-22.diff.gz | Bin 0 - 3135 bytes No .gz please, remove the debian/* stuff, add add a patch header. [...] --- /dev/null +++ b/rules/statserial.make @@ -0,0 +1,74 @@ +# -*-makefile-*- +# +# Copyright (C) 2010 by konzeptpark GmbH an email address for the copyright +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_STATSERIAL) += statserial + +# +# Paths and names +# +STATSERIAL_VERSION := 1.1.orig +STATSERIAL := statserial-$(STATSERIAL_VERSION) +STATSERIAL_SUFFIX:= tar.gz +STATSERIAL_URL := http://archive.ubuntu.com/ubuntu/pool/universe/s/statserial/statserial_$(STATSERIAL_VERSION).$(STATSERIAL_SUFFIX) +STATSERIAL_SOURCE:= $(SRCDIR)/$(STATSERIAL).$(STATSERIAL_SUFFIX) +STATSERIAL_DIR := $(BUILDDIR)/$(STATSERIAL) +STATSERIAL_LICENSE := GPL + +# +# Get +# + +$(STATSERIAL_SOURCE): + @$(call targetinfo) + @$(call get, STATSERIAL) + @ln -s statserial_$(STATSERIAL_VERSION).$(STATSERIAL_SUFFIX) $(SRCDIR)/$(STATSERIAL).$(STATSERIAL_SUFFIX) + +# +# Prepare +# + +# +# autoconf +# +STATSERIAL_CONF_TOOL := NO + +# +# Compile +# + +STATSERIAL_MAKE_ENV := $(CROSS_ENV) \ + LD=$(CROSS_CC) STATSERIAL_MAKE_ENV := \ $(CROSS_ENV) \ LD=$(CROSS_CC) + +# +# Target-Install +# + +$(STATEDIR)/statserial.targetinstall: + @$(call targetinfo) + + @$(call install_init, statserial) + @$(call install_fixup, statserial,PACKAGE,statserial) + @$(call install_fixup, statserial,PRIORITY,optional) + @$(call install_fixup, statserial,VERSION,$(STATSERIAL_VERSION)) + @$(call install_fixup, statserial,SECTION,base) + @$(call install_fixup, statserial,AUTHOR,konzeptpark GmbH) dito + @$(call install_fixup, statserial,DEPENDS,) + @$(call install_fixup, statserial,DESCRIPTION,Simple tool to monitor modem status lines on serial ports) + + @$(call install_copy, statserial, 0, 0, 0755, $(STATSERIAL_DIR)/statserial, /usr/bin/statserial) @$(call install_copy, statserial, 0, 0, 0755, -, /usr/bin/statserial) mol -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH 4/8] [statserial] Added statserial 1.1 with Ubuntu patches
Carsten Schlote wrote: From: Carsten Schlote c.schl...@konzeptpark.de Added simple tool to monitor modem status lines on serial ports. Either display line status with an ncurses interface or return a decimal or hex value. Useful to check operation of serial ports with an EOL test. Signed-off-by: Carsten Schlote c.schl...@konzeptpark.de --- .../statserial-1.1.orig/crosscompile-fixes.patch | 42 +++ patches/statserial-1.1.orig/series |2 + .../statserial-1.1.orig/statserial_1.1-22.diff.gz | Bin 0 - 3135 bytes rules/statserial.in|7 ++ rules/statserial.make | 74 5 files changed, 125 insertions(+), 0 deletions(-) create mode 100644 patches/statserial-1.1.orig/crosscompile-fixes.patch create mode 100644 patches/statserial-1.1.orig/series create mode 100644 patches/statserial-1.1.orig/statserial_1.1-22.diff.gz create mode 100644 rules/statserial.in create mode 100644 rules/statserial.make diff --git a/patches/statserial-1.1.orig/crosscompile-fixes.patch b/patches/statserial-1.1.orig/crosscompile-fixes.patch new file mode 100644 index 000..e9481cc --- /dev/null +++ b/patches/statserial-1.1.orig/crosscompile-fixes.patch @@ -0,0 +1,42 @@ +[crosscompile fixes] Fixed up Makefile to support cross-compilation + +- Allow for CC and LD to be defined externally. +- Allow to define CPPFLAGS and LDFLAGS externally +- Added DESTDIR prefix for install stage + +Signed-off-by: Carsten Schlote c.schl...@konzeptpark.de + +Index: statserial-1.1.orig/Makefile +=== +--- statserial-1.1.orig.orig/Makefile2010-04-16 16:44:08.0 +0200 statserial-1.1.orig/Makefile 2010-04-16 17:17:11.0 +0200 +@@ -1,13 +1,14 @@ +-CC = gcc +-LD = gcc ++ ++CC ?= gcc ++LD ?= gcc + + # for debug + #CFLAGS = -Wall -g + #LDFLAGS = -N + + # for production code +-CFLAGS = -Wall -O3 -fomit-frame-pointer +-LDFLAGS = -s ++CFLAGS = -Wall -O3 -fomit-frame-pointer ${CPPFLAGS} please use CFLAGS += so that they can be extended from outside. ++LDFLAGS ?= -s ..same goes for LDFLAGS. Remove the -s, make install should install unstripped programs/libs (this may go into a seperate patch, though) + + statserial: statserial.o + $(LD) $(LDFLAGS) -o statserial statserial.o -lcurses +@@ -16,8 +17,8 @@ + $(CC) $(CFLAGS) -c statserial.c + + install: statserial +-install -m 555 statserial /usr/local/bin/statserial +-install -m 444 statserial.1 /usr/local/man/man1/statserial.1 ++install -m 555 statserial $(DESTDIR)/usr/bin/statserial ++install -m 444 statserial.1 $(DESTDIR)/usr/man/man1/statserial.1 Maybe it's better to introduce something like PREFIX = /usr/local that can be overwritten from outside. + + clean: + $(RM) statserial statserial.o core *~ diff --git a/patches/statserial-1.1.orig/series b/patches/statserial-1.1.orig/series new file mode 100644 index 000..141e03f --- /dev/null +++ b/patches/statserial-1.1.orig/series @@ -0,0 +1,2 @@ +statserial_1.1-22.diff.gz +crosscompile-fixes.patch diff --git a/patches/statserial-1.1.orig/statserial_1.1-22.diff.gz b/patches/statserial-1.1.orig/statserial_1.1-22.diff.gz new file mode 100644 index ..6886c6a43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