Squashed 'import-layers/meta-openembedded/' content from commit 247b126

Change-Id: I40827e9ce5fba63f1cca2a0be44976ae8383b4c0
git-subtree-dir: import-layers/meta-openembedded
git-subtree-split: 247b1267bbe95719cd4877d2d3cfbaf2a2f4865a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init
new file mode 100644
index 0000000..669c19c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/files/ypbind.init
@@ -0,0 +1,107 @@
+#! /bin/sh
+# Copyright (c) 2004 Author: Thorsten Kukuk <kukuk@suse.de>
+#
+# /etc/init.d/ypbind
+#
+#   and symbolic its link
+#
+# /usr/sbin/rcypbind
+#
+# System startup script for the ypbind daemon
+#
+### BEGIN INIT INFO
+# Provides: ypbind
+# Required-Start: $remote_fs $portmap
+# Should-Start: ypserv slpd
+# Required-Stop: portmap
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Start ypbind (necessary for a NIS client)
+# Description: ypbind finds the server for NIS domains and maintains
+#	the NIS binding information.
+### END INIT INFO
+
+# Need to use status function
+. /etc/init.d/functions
+
+YPBIND_BIN=/usr/sbin/ypbind
+pidfile=/var/run/ypbind.pid
+YPDOMAINNAME_bin=/usr/bin/ypdomainname
+
+[ -f /etc/default/ypbind ] && . /etc/default/ypbind
+
+case "$1" in
+    start)
+	echo -n "Starting ypbind"
+	## If the domainname is not set, skip starting of ypbind
+	## and return with "program not configured"
+        $YPDOMAINNAME_bin >/dev/null 2>&1
+        if [ $? -ne 0 -o -z "`$YPDOMAINNAME_bin 2>/dev/null`" ]; then
+           if [ -f /etc/defaultdomain ]; then
+             XDOMAINNAME=`cat /etc/defaultdomain`
+             $YPDOMAINNAME_bin "$XDOMAINNAME"
+	   fi
+           $YPDOMAINNAME_bin >/dev/null 2>&1
+           if [ $? -ne 0 -o -z "`$YPDOMAINNAME_bin 2>/dev/null`" ]; then
+	     # Tell the user this has skipped
+	     echo -n " . . . . . . . . . . No domainname set"
+             # service is not configured
+	     exit 1
+           fi
+        fi
+
+	## If we don't have a /etc/yp.conf file, skip starting of
+        ## ypbind and return with "program not configured"
+        ## if you add the -broadcast Option later, comment this out.
+	if [ ! -f /etc/yp.conf -a "$YPBIND_BROADCAST" != "yes" ] ; then
+	  # Tell the user this has skipped
+	  echo -n " . . . . . . . . . . ${attn}/etc/yp.conf not found${norm}"
+          # service is not configured
+	  exit 1
+        fi
+
+	# evaluate the OPTIONS for ypbind-mt
+	OPTIONS=""
+	test "$YPBIND_LOCAL_ONLY" = "yes" && OPTIONS="-local-only $OPTIONS"
+	test "$YPBIND_BROADCAST" = "yes" && OPTIONS="-broadcast $OPTIONS"
+	test "$YPBIND_BROKEN_SERVER" = "yes" && OPTIONS="-broken-server $OPTIONS"
+
+	start-stop-daemon --start --quiet --pidfile $pidfile --exec $YPBIND_BIN -- $YPBIND_OPTIONS $OPTIONS
+        if [ $? -eq 0 ]; then
+            notfound=1
+            for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
+                ypwhich >/dev/null 2>&1 && { notfound=0 ; break; };
+                echo -n " ."
+                sleep 1;
+            done
+            if [ $notfound -eq 1 ]; then
+                echo -n " ${warn}No NIS server found${norm}";
+	    fi
+        else
+            exit 1
+        fi
+	;;
+    stop)
+	echo -n "Shutting down ypbind"
+	start-stop-daemon --stop --quiet --pidfile $pidfile
+	# Remove static data, else glibc will continue to use NIS
+        rm -f /var/yp/binding/* /var/run/ypbind.pid
+	;;
+    restart)
+	$0 stop
+	sleep 1
+	$0 start
+	;;
+    reload | force-reload)
+	echo -n "Reload service ypbind"
+	start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
+	;;
+    status)
+	echo -n "Checking for ypbind: "
+	status $YPBIND_BIN
+	;;
+    *)
+	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+	exit 1
+	;;
+esac
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
new file mode 100644
index 0000000..c4aa10e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
@@ -0,0 +1,31 @@
+# This include file contains global definitions for the
+# various NIS packages.
+#
+# These packages will only function correctly with glibc -
+# the rpcsvc functionality is not present in uclibc
+DESCRIPTION = "NIS Server and Tools"
+HOMEPAGE = "http://www.linux-nis.org/nis/"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+inherit autotools gettext pkgconfig
+
+# install is broken because src/Makefile heroically adds '-s'
+# to the install flags - passing -s to the build /usr/bin/install!
+# install-strip gets it right but installs ypbind -m <default>,
+# not -m 555.  In an OE build this is not, so far as I can see,
+# a security problem (and this fix to the build problem is *much*
+# easier and more maintainable.)
+do_install() {
+    oe_runmake 'DESTDIR=${D}' install-strip
+}
+
+# An attempt to build on uclibc will fail, causing annoyance,
+# so force the package to be skipped here (this will cause a
+# 'nothing provides' error)
+python () {
+    os = bb.data.getVar("TARGET_OS", d, 1)
+    if os == "linux-uclibc":
+        raise bb.parse.SkipPackage("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this")
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service
new file mode 100644
index 0000000..21aa92c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/domainname.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=NIS Domainname
+
+[Service]
+Type=oneshot
+EnvironmentFile=/etc/nisdomainname
+ExecStart=/usr/bin/domainname $NISDOMAINNAME
+RemainAfterExit=true
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
new file mode 100644
index 0000000..9ef569f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
@@ -0,0 +1,110 @@
+From a1ef10d63b0ea34c788d5432e94c72b00ae55e04 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Fri, 27 Feb 2015 12:04:10 -0500
+Subject: [PATCH] ipv4/ipv6: Provide an in-place version of mapv4v6addr.h
+
+mapv4v6addr.h isn't always available, depending on your build, but
+nis-hosts.c only needs it for a single, inline function.  So drop a copy
+here rather than playing games with the include path that would
+potentially lead to cross-compilation issues.
+
+Upstream-status: Inappropriate [embedded specific]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ nss_nis6/mapv4v6addr.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ nss_nis6/nis-hosts.c   |  2 +-
+ 2 files changed, 70 insertions(+), 1 deletion(-)
+ create mode 100644 nss_nis6/mapv4v6addr.h
+
+diff --git a/nss_nis6/mapv4v6addr.h b/nss_nis6/mapv4v6addr.h
+new file mode 100644
+index 0000000..7f85f7d
+--- /dev/null
++++ b/nss_nis6/mapv4v6addr.h
+@@ -0,0 +1,69 @@
++/*
++ * ++Copyright++ 1985, 1988, 1993
++ * -
++ * Copyright (c) 1985, 1988, 1993
++ *    The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ * -
++ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies, and that
++ * the name of Digital Equipment Corporation not be used in advertising or
++ * publicity pertaining to distribution of the document or software without
++ * specific, written prior permission.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
++ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
++ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++ * SOFTWARE.
++ * -
++ * --Copyright--
++ */
++
++#include <string.h>
++#include <arpa/nameser.h>
++
++static void
++map_v4v6_address (const char *src, char *dst)
++{
++  u_char *p = (u_char *) dst;
++  int i;
++
++  /* Move the IPv4 part to the right position.  */
++  memcpy (dst + 12, src, INADDRSZ);
++
++  /* Mark this ipv6 addr as a mapped ipv4. */
++  for (i = 0; i < 10; i++)
++    *p++ = 0x00;
++  *p++ = 0xff;
++  *p = 0xff;
++}
+diff --git a/nss_nis6/nis-hosts.c b/nss_nis6/nis-hosts.c
+index af99c74..96d8fa1 100644
+--- a/nss_nis6/nis-hosts.c
++++ b/nss_nis6/nis-hosts.c
+@@ -36,7 +36,7 @@
+ #include "nss-nis6.h"
+ 
+ /* Get implementation for some internal functions. */
+-#include <resolv/mapv4v6addr.h>
++#include "mapv4v6addr.h"
+ 
+ #define ENTNAME         hostent
+ #define DATABASE        "hosts"
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb
new file mode 100644
index 0000000..8c6837b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_2.14.bb
@@ -0,0 +1,34 @@
+# This package builds tools to manage NIS
+# The source package is utils/net/NIS/yp-tools
+#
+require nis.inc
+
+SUMMARY = "NIS client programs"
+DESCRIPTION = " \
+Network Information Service tools.  \
+This package contains ypcat, ypmatch, ypset, \
+ypwhich, yppasswd, domainname, nisdomainname \
+and ypdomainname. \
+\
+This is the final IPv4-only version of yp-tools. \
+"
+
+SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
+           file://domainname.service \
+"
+SRC_URI[md5sum] = "ba1f121c17e3ad65368be173b977cd13"
+SRC_URI[sha256sum] = "d01f70fadc643a55107a0edc47c6be99d0306bcc4f66df56f65e74238b0124c9"
+
+inherit systemd
+SYSTEMD_SERVICE_${PN} = "domainname.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
+
+do_install_append() {
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb
new file mode 100644
index 0000000..b89f0b8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_3.3.bb
@@ -0,0 +1,48 @@
+# This package builds tools to manage NIS
+# The source package is utils/net/NIS/yp-tools
+#
+require nis.inc
+
+SUMMARY = "NIS client programs"
+DESCRIPTION = " \
+Network Information Service tools.  \
+This package contains ypcat, ypmatch, ypset, \
+ypwhich, yppasswd, domainname, nisdomainname \
+and ypdomainname. \
+"
+
+PNBLACKLIST[yp-tools] ?= "BROKEN: fails to build for qemuarm."
+
+SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
+           file://domainname.service \
+           file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \
+"
+SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
+SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50"
+
+DEPENDS = "libtirpc"
+
+inherit autotools systemd
+SYSTEMD_SERVICE_${PN} = "domainname.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
+
+EXTRA_OECONF = " \
+                --disable-rpath \
+                --libdir=${libdir}/yp-nis/ \
+                --includedir=${includedir}/yp-nis/ \
+               "
+
+FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/"
+FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug"
+FILES_${PN}-dev += " ${libdir}/yp-nis/*.so ${libdir}/yp-nis/*.so.[12] ${libdir}/yp-nis/*.la"
+FILES_${PN}-staticdev += " ${libdir}/yp-nis/*.a"
+
+do_install_append() {
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service
new file mode 100644
index 0000000..1f8df42
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=YP Bind
+Requires=domainname.service
+After=domainname.service network.target
+Before=systemd-user-sessions.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/ypbind.pid
+ExecStart=/usr/sbin/ypbind
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb
new file mode 100644
index 0000000..d113b82
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb
@@ -0,0 +1,58 @@
+# This package builds the NIS ypbind daemon
+# The source package is utils/net/NIS/ypbind-mt
+#
+require nis.inc
+
+DESCRIPTION = " \
+Multithreaded NIS bind service (ypbind-mt).  \
+ypbind-mt is a complete new implementation of a NIS \
+binding daemon for Linux. It has the following \
+features.  Supports ypbind protocol V1 and V2.  \
+Uses threads for better response.  Supports multiple \
+domain bindings.  Supports /var/yp/binding/* file \
+for Linux libc 4/5 and glibc 2.x.  Supports a list \
+of known secure NIS server (/etc/yp.conf) Binds to \
+the server which answered as first. \
+\
+This is the final IPv4-only version of ypbind-mt. \
+"
+HOMEPAGE = "http://www.linux-nis.org/nis/ypbind-mt/index.html"
+DEPENDS = " \
+           yp-tools \
+           ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+          "
+RDEPENDS_${PN} += "yp-tools"
+
+# ypbind-mt now provides all the functionality of ypbind
+# and is used in place of it.
+PROVIDES += "ypbind"
+
+SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
+           file://ypbind.init \
+           file://ypbind.service \
+"
+SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1"
+SRC_URI[sha256sum] = "1930ce19f6ccfe10400f3497b31867f71690d2bcd3f5b575199fa915559b7746"
+
+inherit systemd update-rc.d
+
+SYSTEMD_SERVICE_${PN} = "ypbind.service"
+INITSCRIPT_NAME = "ypbind"
+INITSCRIPT_PARAMS = "start 44 3 5 . stop 70 0 1 2 6 ."
+
+CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
+
+do_install_append () {
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/rcS.d
+
+    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
+}
+
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb
new file mode 100644
index 0000000..cee5880
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb
@@ -0,0 +1,53 @@
+# This package builds the NIS ypbind daemon
+# The source package is utils/net/NIS/ypbind-mt
+#
+require nis.inc
+
+DESCRIPTION = " \
+Multithreaded NIS bind service (ypbind-mt).  \
+ypbind-mt is a complete new implementation of a NIS \
+binding daemon for Linux. It has the following \
+features.  Supports ypbind protocol V1 and V2.  \
+Uses threads for better response.  Supports multiple \
+domain bindings.  Supports /var/yp/binding/* file \
+for Linux libc 4/5 and glibc 2.x.  Supports a list \
+of known secure NIS server (/etc/yp.conf) Binds to \
+the server which answered as first. \
+"
+HOMEPAGE = "http://www.linux-nis.org/nis/ypbind-mt/index.html"
+DEPENDS = "yp-tools ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+PROVIDES += "ypbind"
+
+PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools"
+
+SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
+           file://ypbind.init \
+           file://ypbind.service \
+"
+SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8"
+SRC_URI[sha256sum] = "dc2f7d97c94dcab0acfdcd115cd8b464eb8c427e4bb0fe68404ae7465f517cd3"
+
+inherit systemd update-rc.d
+
+SYSTEMD_SERVICE_${PN} = "ypbind.service"
+INITSCRIPT_NAME = "ypbind"
+INITSCRIPT_PARAMS = "start 44 3 5 . stop 70 0 1 2 6 ."
+
+CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
+
+EXTRA_OECONF = "PKG_CONFIG_PATH='${STAGING_LIBDIR}/yp-nis/pkgconfig/'"
+
+do_install_append () {
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/rcS.d
+
+    install -m 0755 ${WORKDIR}/ypbind.init ${D}${sysconfdir}/init.d/ypbind
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
+}
+
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"