diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-08-31 22:07:27 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-09-07 10:57:36 +0200 |
commit | 7254ea1dbec4d45390542b9e9a3ed9dfb2bf165c (patch) | |
tree | 06d27b2583e7da9f8b326aa9459aeee0f05f65d2 /meta-oe | |
parent | 4d43e788f2c835948ebeb0180a5c1aaa09e8b3b5 (diff) | |
download | meta-openembedded-7254ea1dbec4d45390542b9e9a3ed9dfb2bf165c.tar.gz |
iptraf-ng: Add new recipe
Delete iptraf and use iptraf-ng to provide
iptraf functionality
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
7 files changed, 177 insertions, 246 deletions
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch new file mode 100644 index 000000000..5b9afd961 --- /dev/null +++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 86b4d398dbb95e2437b70eba3b30e995ec9be505 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 31 Aug 2017 20:47:50 -0700 | ||
4 | Subject: [PATCH] Fix printd formatting strings | ||
5 | |||
6 | Fixes | ||
7 | error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/ipfilter.c | 2 +- | ||
14 | src/othptab.c | 4 ++-- | ||
15 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/src/ipfilter.c b/src/ipfilter.c | ||
18 | index eb17ec7..8c76e4c 100644 | ||
19 | --- a/src/ipfilter.c | ||
20 | +++ b/src/ipfilter.c | ||
21 | @@ -146,7 +146,7 @@ void gethostparams(struct hostparams *data, char *init_saddr, char *init_smask, | ||
22 | snprintf(msgstr, 60, | ||
23 | "Invalid protocol input at or near token \"%s\"", | ||
24 | bptr); | ||
25 | - tui_error(ANYKEY_MSG, msgstr); | ||
26 | + tui_error(ANYKEY_MSG, "%s", msgstr); | ||
27 | doagain = 1; | ||
28 | } else | ||
29 | doagain = 0; | ||
30 | diff --git a/src/othptab.c b/src/othptab.c | ||
31 | index 142c9c2..fe395c2 100644 | ||
32 | --- a/src/othptab.c | ||
33 | +++ b/src/othptab.c | ||
34 | @@ -410,7 +410,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry, | ||
35 | break; | ||
36 | } | ||
37 | |||
38 | - sprintf(scratchpad, rarp_mac_addr); | ||
39 | + sprintf(scratchpad, "%s", rarp_mac_addr); | ||
40 | strcat(msgstring, scratchpad); | ||
41 | wattrset(table->othpwin, ARPATTR); | ||
42 | break; | ||
43 | @@ -485,7 +485,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry, | ||
44 | wattrset(table->othpwin, UNKNIPATTR); | ||
45 | protptr = getprotobynumber(entry->protocol); | ||
46 | if (protptr != NULL) { | ||
47 | - sprintf(protname, protptr->p_aliases[0]); | ||
48 | + sprintf(protname, "%s", protptr->p_aliases[0]); | ||
49 | } else { | ||
50 | sprintf(protname, "IP protocol"); | ||
51 | unknown = 1; | ||
52 | -- | ||
53 | 2.14.1 | ||
54 | |||
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch new file mode 100644 index 000000000..65b92dade --- /dev/null +++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | Use pkg-config to search for ncurses libraries | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | Upstream-Status: Pending | ||
5 | Index: iptraf-ng-1.1.4/Makefile | ||
6 | =================================================================== | ||
7 | --- iptraf-ng-1.1.4.orig/Makefile | ||
8 | +++ iptraf-ng-1.1.4/Makefile | ||
9 | @@ -205,8 +205,8 @@ endif | ||
10 | |||
11 | ifndef NCURSES_LDFLAGS | ||
12 | ifdef NEEDS_NCURSES5 | ||
13 | - NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null) | ||
14 | - NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null) | ||
15 | + NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) | ||
16 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) | ||
17 | ifndef NO_PANEL | ||
18 | NCURSES_LDFLAGS += -lpanel | ||
19 | endif | ||
20 | @@ -215,8 +215,8 @@ endif | ||
21 | |||
22 | ifndef NCURSES_LDFLAGS | ||
23 | ifdef NEEDS_NCURSESW5 | ||
24 | - NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null) | ||
25 | - NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null) | ||
26 | + NCURSES_CFLAGS := $(shell p[k-config ncursesw --cflags 2>/dev/null) | ||
27 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | ||
28 | ifndef NO_PANEL | ||
29 | NCURSES_LDFLAGS += -lpanel | ||
30 | endif | ||
31 | @@ -225,8 +225,8 @@ endif | ||
32 | |||
33 | ifndef NCURSES_LDFLAGS | ||
34 | ifdef NEEDS_NCURSES6 | ||
35 | - NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null) | ||
36 | - NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null) | ||
37 | + NCURSES_CFLAGS := $(shell pkg-config ncurses6 --cflags 2>/dev/null) | ||
38 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses6 --libs 2>/dev/null) | ||
39 | ifndef NO_PANEL | ||
40 | NCURSES_LDFLAGS += -lpanel | ||
41 | endif | ||
42 | @@ -235,8 +235,8 @@ endif | ||
43 | |||
44 | ifndef NCURSES_LDFLAGS | ||
45 | ifdef NEEDS_NCURSESW6 | ||
46 | - NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null) | ||
47 | - NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null) | ||
48 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) | ||
49 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | ||
50 | ifndef NO_PANEL | ||
51 | NCURSES_LDFLAGS += -lpanel | ||
52 | endif | ||
53 | @@ -246,17 +246,17 @@ endif | ||
54 | # try find ncuses by autodetect | ||
55 | ifndef NCURSES_LDFLAGS | ||
56 | ifneq ($(shell ncursesw6-config --libs 2>/dev/null),) | ||
57 | - NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null) | ||
58 | - NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null) | ||
59 | - else ifneq ($(shell ncurses6-config --libs 2>/dev/null),) | ||
60 | - NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null) | ||
61 | - NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null) | ||
62 | - else ifneq ($(shell ncursesw5-config --libs 2>/dev/null),) | ||
63 | - NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null) | ||
64 | - NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null) | ||
65 | - else ifneq ($(shell ncurses5-config --libs 2>/dev/null),) | ||
66 | - NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null) | ||
67 | - NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null) | ||
68 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) | ||
69 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | ||
70 | + else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),) | ||
71 | + NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) | ||
72 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) | ||
73 | + else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) | ||
74 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) | ||
75 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | ||
76 | + else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),) | ||
77 | + NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) | ||
78 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) | ||
79 | endif | ||
80 | |||
81 | ifneq ($(NCURSES_LDFLAGS),) | ||
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb b/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb new file mode 100644 index 000000000..c53e66300 --- /dev/null +++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb | |||
@@ -0,0 +1,42 @@ | |||
1 | # Copyright (C) 2017 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | SUMMARY = "A console-based network monitoring utility" | ||
5 | DESCRIPTION = "IPTraf-ng is a console-based network monitoring utility. IPTraf gathers \ | ||
6 | data like TCP connection packet and byte counts, interface statistics \ | ||
7 | and activity indicators, TCP/UDP traffic breakdowns, and LAN station \ | ||
8 | packet and byte counts. IPTraf-ng features include an IP traffic monitor \ | ||
9 | which shows TCP flag information, packet and byte counts, ICMP \ | ||
10 | details, OSPF packet types, and oversized IP packet warnings; \ | ||
11 | interface statistics showing IP, TCP, UDP, ICMP, non-IP and other IP \ | ||
12 | packet counts, IP checksum errors, interface activity and packet size \ | ||
13 | counts; a TCP and UDP service monitor showing counts of incoming and \ | ||
14 | outgoing packets for common TCP and UDP application ports, a LAN \ | ||
15 | statistics module that discovers active hosts and displays statistics \ | ||
16 | about their activity; TCP, UDP and other protocol display filters so \ | ||
17 | you can view just the traffic you want; logging; support for Ethernet, \ | ||
18 | FDDI, ISDN, SLIP, PPP, and loopback interfaces; and utilization of the \ | ||
19 | built-in raw socket interface of the Linux kernel, so it can be used \ | ||
20 | on a wide variety of supported network cards." | ||
21 | |||
22 | HOMEPAGE = "https://fedorahosted.org/iptraf-ng/" | ||
23 | LICENSE = "GPL-2.0" | ||
24 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e2b3850593b899b1a17594ed4cc4c731" | ||
25 | DEPENDS = "ncurses" | ||
26 | |||
27 | SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/iptraf-ng/iptraf-ng-1.1.4.tar.gz/e0f8df3b7baf2b5106709abc4f8c029a/${BP}.tar.gz \ | ||
28 | file://ncurses-config.patch \ | ||
29 | file://0001-Fix-printd-formatting-strings.patch \ | ||
30 | " | ||
31 | SRC_URI[md5sum] = "e0f8df3b7baf2b5106709abc4f8c029a" | ||
32 | SRC_URI[sha256sum] = "16b9b05bf5d3725d86409b901696639ad46944d02de6def87b1ceae5310dd35c" | ||
33 | |||
34 | inherit autotools-brokensep pkgconfig | ||
35 | |||
36 | CFLAGS += "-D_GNU_SOURCE" | ||
37 | |||
38 | PROVIDES = "iptraf" | ||
39 | RPROVIDES_${PN} += "iptraf" | ||
40 | RREPLACES_${PN} += "iptraf" | ||
41 | RCONFLICTS_${PN} += "iptraf" | ||
42 | |||
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf/0001-src-Fix-error-in-cross-compile.patch b/meta-oe/recipes-devtools/iptraf/iptraf/0001-src-Fix-error-in-cross-compile.patch deleted file mode 100644 index 291ed3196..000000000 --- a/meta-oe/recipes-devtools/iptraf/iptraf/0001-src-Fix-error-in-cross-compile.patch +++ /dev/null | |||
@@ -1,138 +0,0 @@ | |||
1 | From 27910ea19260b7f7a3f9c0465addd1dea80cf3bd Mon Sep 17 00:00:00 2001 | ||
2 | From: Li Xin <lixin.fnst@cn.fujitsu.com> | ||
3 | Date: Thu, 8 Oct 2015 15:11:17 +0900 | ||
4 | Subject: [PATCH] src: Fix error in cross-compile | ||
5 | |||
6 | The errors are like this: | ||
7 | tcptable.h:26:25: fatal error: linux/if_tr.h: No such file or directory | ||
8 | ld: cannot find -ltextbox | ||
9 | |||
10 | Upstream-Status: pending | ||
11 | |||
12 | Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> | ||
13 | --- | ||
14 | src/Makefile | 2 +- | ||
15 | src/hostmon.c | 2 +- | ||
16 | src/install.sh | 4 ++-- | ||
17 | src/othptab.c | 2 +- | ||
18 | src/packet.c | 2 +- | ||
19 | src/tcptable.h | 2 +- | ||
20 | src/tr.c | 2 +- | ||
21 | support/Makefile | 3 +-- | ||
22 | 8 files changed, 9 insertions(+), 10 deletions(-) | ||
23 | |||
24 | diff --git a/src/Makefile b/src/Makefile | ||
25 | index 2043c2d..0f77bea 100644 | ||
26 | --- a/src/Makefile | ||
27 | +++ b/src/Makefile | ||
28 | @@ -39,7 +39,7 @@ LDOPTS = #-static | ||
29 | # you may want to change this to point to your ncurses include directory | ||
30 | # if the ncurses include files are not in the default location. | ||
31 | |||
32 | -INCLUDEDIR = -I/usr/include/ncurses -I../support | ||
33 | +INCLUDEDIR = -I../support | ||
34 | |||
35 | # You can uncomment this one to disable the backspace key in input fields. | ||
36 | # This means you must use the Del key or Ctrl+H combination to erase the | ||
37 | diff --git a/src/hostmon.c b/src/hostmon.c | ||
38 | index 14df2c8..6571562 100644 | ||
39 | --- a/src/hostmon.c | ||
40 | +++ b/src/hostmon.c | ||
41 | @@ -31,7 +31,7 @@ details. | ||
42 | #include <linux/if_packet.h> | ||
43 | #include <linux/if_ether.h> | ||
44 | #include <linux/if_fddi.h> | ||
45 | -#include <linux/if_tr.h> | ||
46 | +#include <netinet/if_tr.h> | ||
47 | #include <net/if_arp.h> | ||
48 | #include <stdlib.h> | ||
49 | #include <time.h> | ||
50 | diff --git a/src/install.sh b/src/install.sh | ||
51 | index d2fd360..36d3516 100755 | ||
52 | --- a/src/install.sh | ||
53 | +++ b/src/install.sh | ||
54 | @@ -23,9 +23,9 @@ echo | ||
55 | echo "*** Installing executable programs and preparing work directories" | ||
56 | echo | ||
57 | echo ">>> Installing iptraf in $TARGET" | ||
58 | -$INSTALL -m 0700 -o root -g root -s iptraf $TARGET | ||
59 | +$INSTALL -m 0700 -o root -g root iptraf $TARGET | ||
60 | echo ">>> Installing rvnamed in $TARGET" | ||
61 | -$INSTALL -m 0700 -o root -g root -s rvnamed $TARGET | ||
62 | +$INSTALL -m 0700 -o root -g root rvnamed $TARGET | ||
63 | |||
64 | if [ ! -d $WORKDIR ]; then | ||
65 | echo ">>> Creating IPTraf work directory $WORKDIR" | ||
66 | diff --git a/src/othptab.c b/src/othptab.c | ||
67 | index 97771d1..a8bb536 100644 | ||
68 | --- a/src/othptab.c | ||
69 | +++ b/src/othptab.c | ||
70 | @@ -18,7 +18,7 @@ details. | ||
71 | |||
72 | #include <asm/types.h> | ||
73 | #include <linux/if_ether.h> | ||
74 | -#include <linux/if_tr.h> | ||
75 | +#include <netinet/if_tr.h> | ||
76 | #include <linux/if_fddi.h> | ||
77 | #include <winops.h> | ||
78 | #include "arphdr.h" | ||
79 | diff --git a/src/packet.c b/src/packet.c | ||
80 | index 33fdf2a..1e2b81b 100644 | ||
81 | --- a/src/packet.c | ||
82 | +++ b/src/packet.c | ||
83 | @@ -36,7 +36,7 @@ details. | ||
84 | #include <linux/if_packet.h> | ||
85 | #include <linux/if_ether.h> | ||
86 | #include <linux/if_fddi.h> | ||
87 | -#include <linux/if_tr.h> | ||
88 | +#include <netinet/if_tr.h> | ||
89 | #include <linux/isdn.h> | ||
90 | #include <linux/sockios.h> | ||
91 | #include <msgboxes.h> | ||
92 | diff --git a/src/tcptable.h b/src/tcptable.h | ||
93 | index 3e17793..d1380b5 100644 | ||
94 | --- a/src/tcptable.h | ||
95 | +++ b/src/tcptable.h | ||
96 | @@ -23,7 +23,7 @@ | ||
97 | #include <linux/if_packet.h> | ||
98 | #include <linux/if_ether.h> | ||
99 | #include <linux/if_fddi.h> | ||
100 | -#include <linux/if_tr.h> | ||
101 | +#include <netinet/if_tr.h> | ||
102 | #include <net/if.h> | ||
103 | #include <netinet/ip.h> | ||
104 | #include <netinet/udp.h> | ||
105 | diff --git a/src/tr.c b/src/tr.c | ||
106 | index 40c9e63..11f8045 100644 | ||
107 | --- a/src/tr.c | ||
108 | +++ b/src/tr.c | ||
109 | @@ -7,7 +7,7 @@ | ||
110 | */ | ||
111 | |||
112 | #include <asm/types.h> | ||
113 | -#include <linux/if_tr.h> | ||
114 | +#include <netinet/if_tr.h> | ||
115 | #include <netinet/in.h> | ||
116 | |||
117 | unsigned int get_tr_ip_offset(unsigned char *pkt) | ||
118 | diff --git a/support/Makefile b/support/Makefile | ||
119 | index 114bfc3..c962c09 100644 | ||
120 | --- a/support/Makefile | ||
121 | +++ b/support/Makefile | ||
122 | @@ -1,4 +1,3 @@ | ||
123 | -INCLUDEDIR = -I/usr/include/ncurses | ||
124 | |||
125 | OBJS = input.o menurt.o listbox.o winops.o labels.o \ | ||
126 | msgboxes.o txbox.o | ||
127 | @@ -12,7 +11,7 @@ libtextbox.a: $(OBJS) | ||
128 | # gcc -shared -o libtextbox.so $(OBJS) | ||
129 | |||
130 | %.o: %.c *.h | ||
131 | - gcc -O2 -g -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $< | ||
132 | + ${CC} -O2 -g -Wall -fPIC -c -o $*.o $< | ||
133 | |||
134 | clean: | ||
135 | rm -rf *.o *~ libtextbox.a libtextbox.so | ||
136 | -- | ||
137 | 1.8.4.2 | ||
138 | |||
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch b/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch deleted file mode 100644 index 5f96f0f4c..000000000 --- a/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | Index: iptraf-3.0.0/src/othptab.c | ||
2 | =================================================================== | ||
3 | --- iptraf-3.0.0.orig/src/othptab.c | ||
4 | +++ iptraf-3.0.0/src/othptab.c | ||
5 | @@ -335,7 +335,7 @@ void printothpentry(struct othptable *ta | ||
6 | break; | ||
7 | } | ||
8 | |||
9 | - sprintf(scratchpad, inet_ntoa(saddr)); | ||
10 | + sprintf(scratchpad, "%s", inet_ntoa(saddr)); | ||
11 | strcat(msgstring, scratchpad); | ||
12 | wattrset(table->othpwin, ARPATTR); | ||
13 | break; | ||
14 | @@ -354,7 +354,7 @@ void printothpentry(struct othptable *ta | ||
15 | break; | ||
16 | } | ||
17 | |||
18 | - sprintf(scratchpad, rarp_mac_addr); | ||
19 | + sprintf(scratchpad, "%s", rarp_mac_addr); | ||
20 | strcat(msgstring, scratchpad); | ||
21 | wattrset(table->othpwin, ARPATTR); | ||
22 | break; | ||
23 | @@ -421,7 +421,7 @@ void printothpentry(struct othptable *ta | ||
24 | wattrset(table->othpwin, UNKNIPATTR); | ||
25 | protptr = getprotobynumber(entry->protocol); | ||
26 | if (protptr != NULL) { | ||
27 | - sprintf(protname, protptr->p_aliases[0]); | ||
28 | + sprintf(protname, "%s", protptr->p_aliases[0]); | ||
29 | } else { | ||
30 | sprintf(protname, "IP protocol"); | ||
31 | unknown = 1; | ||
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch b/meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch deleted file mode 100644 index c84a0a0ad..000000000 --- a/meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | Index: iptraf-3.0.0/src/Makefile | ||
2 | =================================================================== | ||
3 | --- iptraf-3.0.0.orig/src/Makefile | ||
4 | +++ iptraf-3.0.0/src/Makefile | ||
5 | @@ -5,7 +5,7 @@ | ||
6 | # | ||
7 | # Architecture determination string borrowed from the kernel makefile. | ||
8 | # | ||
9 | -ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | ||
10 | +ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | ||
11 | -e s/arm.*/arm/ -e s/sa110/arm/) | ||
12 | PLATFORM = -DPLATFORM=\"$(shell uname -s)/$(ARCH)\" | ||
13 | VERNUMBER := $(shell cat version) | ||
14 | @@ -17,7 +17,7 @@ VERSION = -DVERSION=\"$(VERNUMBER)\" | ||
15 | # | ||
16 | BINDIR = ../../iptraf-$(VERNUMBER).bin.$(ARCH) | ||
17 | |||
18 | -CC = gcc | ||
19 | +CC = $(CC) | ||
20 | LIBS = -L../support -ltextbox -lpanel -lncurses # in this order! | ||
21 | |||
22 | # comment this one out to omit debug code when done. | ||
23 | @@ -31,10 +31,10 @@ PROF = #-pg | ||
24 | # options to be passed to the compiler. I don't believe they need to be | ||
25 | # modified (except for -m486 on non-Intel x86 platforms). | ||
26 | |||
27 | -CFLAGS = -Wall #-O2 #-m486 | ||
28 | +CFLAGS ?= -Wall #-O2 #-m486 | ||
29 | DIRS = -DWORKDIR=\"$(WORKDIR)\" \ | ||
30 | -DLOGDIR=\"$(LOGDIR)\" -DEXECDIR=\"$(TARGET)\" | ||
31 | -LDOPTS = #-static | ||
32 | +LDOPTS ?= #-static | ||
33 | |||
34 | # you may want to change this to point to your ncurses include directory | ||
35 | # if the ncurses include files are not in the default location. | ||
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb b/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb deleted file mode 100644 index abfab02e0..000000000 --- a/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | DESCRIPTION = "IPTraf is a console-based network statistics utility for Linux. \ | ||
2 | It gathers a variety of figures such as TCP connection packet and byte counts, \ | ||
3 | interface statistics and activity indicators, TCP/UDP traffic breakdowns, \ | ||
4 | and LAN station packet and byte counts." | ||
5 | |||
6 | HOMEPAGE = "http://iptraf.seul.org" | ||
7 | |||
8 | LICENSE = "GPLv2" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=dc0bdc29df738baf327368b1bbb15a45" | ||
10 | |||
11 | DEPENDS = "ncurses" | ||
12 | |||
13 | SRC_URI = " \ | ||
14 | ftp://iptraf.seul.org/pub/iptraf/iptraf-3.0.0.tar.gz \ | ||
15 | file://0001-src-Fix-error-in-cross-compile.patch \ | ||
16 | file://format_string.patch \ | ||
17 | file://ldopts.patch \ | ||
18 | " | ||
19 | SRC_URI[md5sum] = "377371c28ee3c21a76f7024920649ea8" | ||
20 | SRC_URI[sha256sum] = "9ee433d95573d612539da4b452e6cdcbca6ab6674a88bfbf6eaf12d4902b5163" | ||
21 | RDEPENDS_${PN} = "ncurses" | ||
22 | |||
23 | EXTRA_OEMAKE = "-e MAKEFLAGS= LDOPTS='${LDFLAGS}' ARCH='${TARGET_ARCH}'" | ||
24 | |||
25 | do_compile() { | ||
26 | oe_runmake -C src all | ||
27 | } | ||
28 | |||
29 | do_install_append() { | ||
30 | rm -r ${D}/${localstatedir}/run | ||
31 | } | ||
32 | |||
33 | do_install() { | ||
34 | install -d ${D}${bindir} | ||
35 | oe_runmake -C src install \ | ||
36 | TARGET=${D}${bindir} \ | ||
37 | WORKDIR=${D}${localstatedir}/local/iptraf \ | ||
38 | LOGDIR=${D}${localstatedir}/log/iptraf \ | ||
39 | LOCKDIR=${D}${localstatedir}/run/iptraf | ||
40 | } | ||
41 | |||
42 | FILES_${PN} += "${bindir} ${localstatedir} /run" | ||