setserial: convert to autotargets and fix manpages install
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 25 Jul 2010 14:53:51 +0000 (16:53 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 26 Jul 2010 22:48:27 +0000 (00:48 +0200)
Close #2269

[Peter: fix Makefile patch to not strip wrong file, rename hayes patch]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/setserial/setserial-2.17-build-system-fix.patch [new file with mode: 0644]
package/setserial/setserial-2.17-tiocghayesesp-build-fix.patch [new file with mode: 0644]
package/setserial/setserial-tiocghayesesp-build-fix.patch [deleted file]
package/setserial/setserial.mk

diff --git a/CHANGES b/CHANGES
index d03b434d820aabb13660ed3510729232f51cbc4d..73fb6eb5a7c3414bec1ecccb40d2a1039f7b7a5a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
        libgpg-error, libidn, liblockfile, libpng, lighttpd, links,
        linux-fusion, lmbench, lrzsz, ltrace, make, module-init-tools,
        mplayer, mysql_client, nbd, ncurses, neon, netcat, netperf,
-       ntfsprogs, openssl, php, qt, quagga, sqlite, sdl, sdl_mixer,
-       sdl_sound, sdl_ttf, squashfs, swfdec, tftpd, thttpd, tn5250,
-       tremor, usbutils, webif, wireless_tools, xkeyboard-config,
-       xserver_xorg-server, xvkbd
+       ntfsprogs, openssl, php, qt, quagga, setserial, sdl, sdl_mixer,
+       sdl_sound, sdl_ttf, sqlite, squashfs, swfdec, tftpd, thttpd,
+       tn5250, tremor, usbutils, webif, wireless_tools,
+       xkeyboard-config, xserver_xorg-server, xvkbd
 
        Removed packages: modutils, portage, rxvt
 
@@ -81,6 +81,7 @@
        #2233: Atmel atstk target skeletons have /etc/mtab as a file, not ...
        #2245: Netcat does not work due to incorrect assumptions about signed..
        #2251: directory output/build after make *_defconfig not found
+       #2269: setserial causes make error
 
 2010.05, Released May 30th, 2010:
 
diff --git a/package/setserial/setserial-2.17-build-system-fix.patch b/package/setserial/setserial-2.17-build-system-fix.patch
new file mode 100644 (file)
index 0000000..eec7993
--- /dev/null
@@ -0,0 +1,28 @@
+Install the setserial program in /usr/bin instead of /bin, and make
+sure that the directories (especially the manpages directory) are
+created before installing files to them. This is similar to what
+automake does.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Makefile.in |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+Index: setserial-2.17/Makefile.in
+===================================================================
+--- setserial-2.17.orig/Makefile.in
++++ setserial-2.17/Makefile.in
+@@ -26,9 +26,10 @@ setserial.cat: setserial.8
+       nroff -man setserial.8 > setserial.cat
+ install: setserial setserial.8
+-      $(INSTALL_PROGRAM) setserial $(DESTDIR)/bin
+-      $(STRIP) $(DESTDIR)/bin/setserial
+-      $(INSTALL_DATA) setserial.8 $(DESTDIR)/usr/man/man8
++      mkdir -p $(DESTDIR)/usr/bin
++      $(INSTALL_PROGRAM) setserial $(DESTDIR)/usr/bin
++      mkdir -p $(DESTDIR)/usr/share/man/man8
++      $(INSTALL_DATA) setserial.8 $(DESTDIR)/usr/share/man/man8
+ clean:
+       $(RM) setserial setserial.o setserial.cat *~
diff --git a/package/setserial/setserial-2.17-tiocghayesesp-build-fix.patch b/package/setserial/setserial-2.17-tiocghayesesp-build-fix.patch
new file mode 100644 (file)
index 0000000..176a0c9
--- /dev/null
@@ -0,0 +1,28 @@
+[PATCH] setserial: fix build with 2.6.33+ kernel headers
+
+linux/hayesesp.h got removed in 2.6.33, but some archs (like x86) still
+define the TIOCGHAYESESP ioctl, breaking the build.
+
+It's very unlikely to be of interest anymore, so just undef it.
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ setserial.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+Index: setserial-2.17/setserial.c
+===================================================================
+--- setserial-2.17.orig/setserial.c
++++ setserial-2.17/setserial.c
+@@ -24,6 +24,11 @@
+ #endif
+ #include <linux/serial.h>
++/* linux/hayesesp.h got removed in 2.6.33 but some archs (like x86)
++   still define TIOCGHAYESESP. It's very unlikely to be of interest
++   anymore, so just undef it */
++#undef TIOCGHAYESESP
++
+ #include "version.h"
+ static char version_str[] = "setserial version " SETSERIAL_VERSION ", "
diff --git a/package/setserial/setserial-tiocghayesesp-build-fix.patch b/package/setserial/setserial-tiocghayesesp-build-fix.patch
deleted file mode 100644 (file)
index 176a0c9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-[PATCH] setserial: fix build with 2.6.33+ kernel headers
-
-linux/hayesesp.h got removed in 2.6.33, but some archs (like x86) still
-define the TIOCGHAYESESP ioctl, breaking the build.
-
-It's very unlikely to be of interest anymore, so just undef it.
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- setserial.c |    5 +++++
- 1 file changed, 5 insertions(+)
-
-Index: setserial-2.17/setserial.c
-===================================================================
---- setserial-2.17.orig/setserial.c
-+++ setserial-2.17/setserial.c
-@@ -24,6 +24,11 @@
- #endif
- #include <linux/serial.h>
-+/* linux/hayesesp.h got removed in 2.6.33 but some archs (like x86)
-+   still define TIOCGHAYESESP. It's very unlikely to be of interest
-+   anymore, so just undef it */
-+#undef TIOCGHAYESESP
-+
- #include "version.h"
- static char version_str[] = "setserial version " SETSERIAL_VERSION ", "
index 1c222a20922c8dfcb5a0a3264b144c4b64f30e4e..0b673469cf7fa1929e3f4380b06c530f5a71470a 100644 (file)
@@ -3,16 +3,18 @@
 # Setserial
 #
 #############################################################
-SETSERIAL_VERSION:=2.17
-SETSERIAL_PATCH_VERSION:=.orig
-SETSERIAL_PATCH_FILE:=setserial_2.17-45.diff.gz
-SETSERIAL_SOURCE:=setserial_$(SETSERIAL_VERSION)$(SETSERIAL_PATCH_VERSION).tar.gz
-SETSERIAL_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/s/setserial/
-SETSERIAL_INSTALL_TARGET_OPT=DESTDIR=$(TARGET_DIR) install
+SETSERIAL_VERSION            = 2.17
+SETSERIAL_PATCH              = setserial_2.17-45.2.diff.gz
+SETSERIAL_SOURCE             = setserial_$(SETSERIAL_VERSION).orig.tar.gz
+SETSERIAL_SITE               = $(BR2_DEBIAN_MIRROR)/debian/pool/main/s/setserial/
+SETSERIAL_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
 
 define SETSERIAL_APPLY_DEBIAN_PATCHES
+       # Touching gorhack.h is needed for the Debian patch 18 to work
        if [ -d $(@D)/debian/patches ]; then \
-               toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \
+               touch $(@D)/gorhack.h; \
+               rm $(@D)/debian/patches/01_makefile.dpatch; \
+               toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches *.dpatch; \
        fi
 endef