blob: defc05cd1dd5895a50ea96820b79600af4862279 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001require netcat.inc
2SUMMARY = "OpenBSD Netcat"
3HOMEPAGE = "http://ftp.debian.org"
4LICENSE = "BSD-2-Clause"
5LIC_FILES_CHKSUM = "file://debian/copyright;md5=f39e60ae4ea9fdb559c833be2e59de99"
6
7DEPENDS += "glib-2.0 libbsd"
8do_patch[depends] = "quilt-native:do_populate_sysroot"
9
10SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/netcat-openbsd/1.190-2/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \
11 https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/netcat-openbsd/1.190-2/netcat-openbsd_${PV}-2.debian.tar.xz;name=netcat-patch;subdir=${BP} \
12 file://0001-bundle-own-base64-encode-decode-functions.patch \
13 "
14
15SRC_URI[netcat.md5sum] = "dd32fd1d7903b541ad8709794539b959"
16SRC_URI[netcat.sha256sum] = "68ccc448392c05ec51baed0167a72b8c650454f990b895d6e6877d416a38e536"
17SRC_URI[netcat-patch.md5sum] = "78058b7af0170654b877b02c37716cdf"
18SRC_URI[netcat-patch.sha256sum] = "88088af3f520c7825e59bc133d65e70fc4a30139d451c6faabbd9f240bc78374"
19
20inherit pkgconfig
21
22EXTRA_OEMAKE += "'LDFLAGS=${LDFLAGS}'"
23
24do_configure[noexec] = "1"
25
26netcat_do_patch() {
27 cd ${S}
28 quilt pop -a || true
29 if [ -d ${S}/.pc-netcat ]; then
30 rm -rf ${S}/.pc
31 mv ${S}/.pc-netcat ${S}/.pc
32 QUILT_PATCHES=${S}/debian/patches quilt pop -a
33 rm -rf ${S}/.pc
34 fi
35 QUILT_PATCHES=${S}/debian/patches quilt push -a
36 mv ${S}/.pc ${S}/.pc-netcat
37}
38
39do_unpack[cleandirs] += "${S}"
40
41python do_patch() {
42 bb.build.exec_func('netcat_do_patch', d)
43 bb.build.exec_func('patch_do_patch', d)
44}
45
46do_compile() {
47 cd ${S}
48 pkgrel=4
49 oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\""
50}
51
52do_install() {
53 install -d ${D}${bindir}
54 install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN}
55}
56ALTERNATIVE_PRIORITY = "60"