]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
slapo-autogroup: update Makefile to install manpage
authorHoward Chu <hyc@openldap.org>
Thu, 22 Feb 2024 14:53:28 +0000 (14:53 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 22 Feb 2024 14:54:15 +0000 (14:54 +0000)
contrib/slapd-modules/autogroup/Makefile

index 24466571a13b1be702abebcc44a25c6bf45e7639..a888c23cb2fc008b8a80b44f1c48674a7c7a6e5a 100644 (file)
@@ -1,4 +1,14 @@
 # $OpenLDAP$
+# Copyright 2007 Howard Chu <hyc@symas.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted only as authorized by the OpenLDAP
+# Public License.
+#
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
 
 LDAP_SRC = ../../..
 LDAP_BUILD = $(LDAP_SRC)
@@ -12,6 +22,7 @@ NT_LDFLAGS = -no-undefined -avoid-version
 UNIX_LDFLAGS = -version-info $(LTVER)
 
 LIBTOOL = $(LDAP_BUILD)/libtool
+INSTALL = /usr/bin/install
 CC = gcc
 OPT = -g -O2
 DEFS = 
@@ -20,6 +31,7 @@ LIBS = $($(PLAT)_LIB) $(LDAP_LIB)
 LD_FLAGS = $(LDFLAGS) $($(PLAT)_LDFLAGS) -rpath $(moduledir) -module
 
 PROGRAMS = autogroup.la
+MANPAGES = slapo-autogroup.5
 LTVER = 0:0:0
 
 prefix=/usr/local
@@ -29,6 +41,8 @@ ldap_subdir=/openldap
 libdir=$(exec_prefix)/lib
 libexecdir=$(exec_prefix)/libexec
 moduledir = $(libexecdir)$(ldap_subdir)
+mandir = $(exec_prefix)/share/man
+man5dir = $(mandir)/man5
 
 .SUFFIXES: .c .o .lo
 
@@ -43,9 +57,17 @@ autogroup.la: autogroup.lo
 clean:
        rm -rf *.o *.lo *.la .libs
 
-install: $(PROGRAMS)
+install: install-lib install-man FORCE
+
+install-lib: $(PROGRAMS)
        mkdir -p $(DESTDIR)$(moduledir)
        for p in $(PROGRAMS) ; do \
                $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \
        done
 
+install-man:
+       mkdir -p  $(DESTDIR)$(man5dir)
+       $(INSTALL) -m 644 $(MANPAGES) $(DESTDIR)$(man5dir)
+
+FORCE:
+