commit 7efd87948f6dc71d7e91776d68e00d6282701463
parent 451e0fd23580758177aabe784d97384d20d6f5aa
Author: Josuah Demangeon <mail@josuah.net>
Date: Tue, 27 Mar 2018 14:12:47 +0200
building ldapd without autohell is easier than configuring autohell T_T
Diffstat:
8 files changed, 59 insertions(+), 0 deletions(-)
diff --git a/bin/clip b/bin/clip
@@ -2,6 +2,7 @@
CLIP="${CLIP:-$HOME/.cache/clip}"
+mkdir -p "$(dirname "$CLIP")"
touch "$CLIP"
chmod 600 "$CLIP"
diff --git a/pack/ldapd/Makefile b/pack/ldapd/Makefile
@@ -0,0 +1,13 @@
+all: ldapd ldapctl
+
+.PHONY: compat
+compat:
+ make -C $@
+
+.PHONY: ldapctl
+ldapctl: compat
+ make -C $@
+
+.PHONY: ldapd
+ldapd: compat
+ make -C $@
diff --git a/pack/ldapd/Makefile.compat b/pack/ldapd/Makefile.compat
@@ -0,0 +1,4 @@
+include Makefile.am
+include ../config.mk
+
+all: $(dist_noinst_DATA:.c=.o)
diff --git a/pack/ldapd/Makefile.ldapctl b/pack/ldapd/Makefile.ldapctl
@@ -0,0 +1,11 @@
+include Makefile.am
+include ../config.mk
+
+SRC = $(ldapctl_SOURCES:.y=.c)
+OBJ = $(SRC:.c=.o)
+top_srcdir = ..
+
+all: ldapctl
+
+ldapctl: $(OBJ)
+ $(CC) -o $@ $(LIBS) $(OBJ) ../compat/*.o
diff --git a/pack/ldapd/Makefile.ldapd b/pack/ldapd/Makefile.ldapd
@@ -0,0 +1,10 @@
+include Makefile.am
+include ../config.mk
+
+SRC = $(ldapd_SOURCES:.y=.c)
+OBJ = $(SRC:.c=.o)
+
+all: ldapd
+
+ldapd: $(OBJ)
+ $(CC) -o $@ $(LIBS) $(OBJ) ../compat/*.o
diff --git a/pack/ldapd/build b/pack/ldapd/build
@@ -0,0 +1,17 @@
+#!/bin/sh -ex
+
+cp "$PACK/ldapd/config.mk" .
+cp "$PACK/ldapd/Makefile" .
+cp "$PACK/ldapd/Makefile.compat" compat/Makefile
+cp "$PACK/ldapd/Makefile.ldapctl" ldapctl/Makefile
+cp "$PACK/ldapd/Makefile.ldapd" ldapd/Makefile
+
+printf '#include <%s>\n' netinet/in.h net/if_dl.h net/if_types.h \
+ >>compat/compat.h
+
+make
+
+mkdir -p "$PREFIX/bin" "$PREFIX/share/man/man8"
+
+cp ldapd/ldapd ldapctl/ldapctl "$PREFIX/bin"
+cp ldapd/ldapd.8 ldapctl/ldapctl.8 "$PREFIX/share/man/man8"
diff --git a/pack/ldapd/config.mk b/pack/ldapd/config.mk
@@ -0,0 +1,2 @@
+CFLAGS = -I../compat -I../ldapd -I../ldapctl
+LIBS = -lssl -levent -lcrypto -lz
diff --git a/pack/ldapd/tar b/pack/ldapd/tar
@@ -0,0 +1 @@
+http://bitbucket.org/bzero/ldapd-portable/get/tip.tar.gz