summaryrefslogtreecommitdiff
path: root/package/netkit-bootparamd
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-03-20 10:14:41 -0500
committerWaldemar Brodkorb <wbx@openadk.org>2015-03-20 10:15:31 -0500
commit8f585952d4e7655f21d83b73e02819d54afa7797 (patch)
tree462fcba6aa912eec47439d25c195b187b7cfe9c9 /package/netkit-bootparamd
parentf8d903453747b1cbbc985498ebe11ea0d2f702b0 (diff)
add new package
Diffstat (limited to 'package/netkit-bootparamd')
-rw-r--r--package/netkit-bootparamd/Makefile42
-rw-r--r--package/netkit-bootparamd/patches/patch-MRULES13
-rw-r--r--package/netkit-bootparamd/patches/patch-rpc_bootparamd_Makefile19
-rw-r--r--package/netkit-bootparamd/patches/patch-rpc_bootparamd_main_c24
4 files changed, 98 insertions, 0 deletions
diff --git a/package/netkit-bootparamd/Makefile b/package/netkit-bootparamd/Makefile
new file mode 100644
index 000000000..595465d1c
--- /dev/null
+++ b/package/netkit-bootparamd/Makefile
@@ -0,0 +1,42 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= netkit-bootparamd
+PKG_VERSION:= 0.17
+PKG_RELEASE:= 1
+PKG_HASH:= 7fd44b14f7ee5bf930bdd03b0c3a15bdb6efb60a862af47269b05361c4ed395c
+PKG_DESCR:= net bootparam daemon
+PKG_SECTION:= net/misc
+PKG_BUILDDEP:= libtirpc
+PKG_SITES:= http://www.openadk.org/distfiles/
+
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,NETKIT_BOOTPARAMD,netkit-bootparamd,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+CONFIG_STYLE:= manual
+TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/usr/include/tirpc
+TARGET_LDFLAGS+= -ltirpc
+
+do-configure:
+ echo "BINDIR=/usr/bin" > $(WRKBUILD)/MCONFIG
+ echo "SBINDIR=/usr/sbin" >> $(WRKBUILD)/MCONFIG
+ echo "MANDIR=/usr/share/man" >> $(WRKBUILD)/MCONFIG
+ echo "PREFIX=$PREFIX" >> $(WRKBUILD)/MCONFIG
+ echo "EXECPREFIX=$EXECPREFIX" >> $(WRKBUILD)/MCONFIG
+ echo "INSTALLROOT=$(WRKINST)" >> $(WRKBUILD)/MCONFIG
+ echo "CC=$(TARGET_CC)" >> $(WRKBUILD)/MCONFIG
+ echo "CFLAGS=$(TARGET_CFLAGS)" >> $(WRKBUILD)/MCONFIG
+ echo "CPPFLAGS=$(TARGET_CPPFLAGS)" >> $(WRKBUILD)/MCONFIG
+ echo "LDFLAGS=$(TARGET_LDFLAGS)" >> $(WRKBUILD)/MCONFIG
+
+netkit-bootparamd-install:
+ $(INSTALL_DIR) $(IDIR_NETKIT_BOOTPARAMD)/usr/sbin
+ $(INSTALL_BIN) $(WRKINST)/usr/sbin/rpc.bootparamd \
+ $(IDIR_NETKIT_BOOTPARAMD)/usr/sbin
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/netkit-bootparamd/patches/patch-MRULES b/package/netkit-bootparamd/patches/patch-MRULES
new file mode 100644
index 000000000..9a20c1f8f
--- /dev/null
+++ b/package/netkit-bootparamd/patches/patch-MRULES
@@ -0,0 +1,13 @@
+--- netkit-bootparamd-0.17.orig/MRULES 1997-03-08 10:15:54.000000000 -0600
++++ netkit-bootparamd-0.17/MRULES 2015-03-07 14:24:01.850444545 -0600
+@@ -1,8 +1,8 @@
+ # Standard compilation rules (don't use make builtins)
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $< -c
++ $(CC) $(CPPFLAGS) $(CFLAGS) $< -c
+
+ %.o: %.cc
+- $(CC) $(CFLAGS) $< -c
++ $(CC) $(CPPFLAGS) $(CFLAGS) $< -c
+
diff --git a/package/netkit-bootparamd/patches/patch-rpc_bootparamd_Makefile b/package/netkit-bootparamd/patches/patch-rpc_bootparamd_Makefile
new file mode 100644
index 000000000..e99f9ccd9
--- /dev/null
+++ b/package/netkit-bootparamd/patches/patch-rpc_bootparamd_Makefile
@@ -0,0 +1,19 @@
+--- netkit-bootparamd-0.17.orig/rpc.bootparamd/Makefile 1999-12-12 12:04:59.000000000 -0600
++++ netkit-bootparamd-0.17/rpc.bootparamd/Makefile 2015-03-07 14:50:58.986429736 -0600
+@@ -22,12 +22,11 @@ callbootd: callbootd.o bootparam_prot_cl
+ ${CC} $(LDFLAGS) $^ $(LIBS) -o $@
+
+ install: bootparamd callbootd
+- install -s -m $(DAEMONMODE) bootparamd \
++ install -d $(INSTALLROOT)$(SBINDIR)
++ install -m 755 bootparamd \
+ $(INSTALLROOT)$(SBINDIR)/rpc.bootparamd
+- install -s -m $(BINMODE) callbootd $(INSTALLROOT)$(BINDIR)/callbootd
+- install -m $(MANMODE) bootparamd.8 \
+- $(INSTALLROOT)$(MANDIR)/man8/rpc.bootparamd.8
+- ln -sf rpc.bootparamd.8 $(INSTALLROOT)$(MANDIR)/man8/bootparamd.8
++ install -d $(INSTALLROOT)$(BINDIR)
++ install -m 755 callbootd $(INSTALLROOT)$(BINDIR)/callbootd
+
+ clean:
+ rm -f *.o bootparamd callbootd
diff --git a/package/netkit-bootparamd/patches/patch-rpc_bootparamd_main_c b/package/netkit-bootparamd/patches/patch-rpc_bootparamd_main_c
new file mode 100644
index 000000000..fc2eb939a
--- /dev/null
+++ b/package/netkit-bootparamd/patches/patch-rpc_bootparamd_main_c
@@ -0,0 +1,24 @@
+--- netkit-bootparamd-0.17.orig/rpc.bootparamd/main.c 2000-07-22 11:23:56.000000000 -0500
++++ netkit-bootparamd-0.17/rpc.bootparamd/main.c 2015-03-07 15:09:26.074419604 -0600
+@@ -15,12 +15,6 @@
+ #include <unistd.h>
+ #include "bootparam_prot.h"
+
+-
+-#ifdef __GLIBC__
+- /* quick fix */
+- void get_myaddress(struct sockaddr_in *);
+-#endif
+-
+ int debug = 0;
+ int dolog = 0;
+ struct in_addr route_addr;
+@@ -39,7 +33,7 @@ main(int argc, char **argv)
+ struct stat buf;
+ char c;
+
+- progname = rindex(argv[0],'/');
++ progname = strrchr(argv[0],'/');
+ if (progname) progname++;
+ else progname = argv[0];
+