Integrate memberof plugin into build.

This commit is contained in:
Karl MacMillan 0001-01-01 00:00:00 +00:00
parent d3415f85b0
commit e27ab98fd2
4 changed files with 29 additions and 4 deletions

View File

@ -49,6 +49,7 @@ rm -rf %{buildroot}
%{_usr}/share/ipa/*
%{plugin_dir}/libipa_pwd_extop.so
%{plugin_dir}/libipa-memberof-plugin.so
%changelog

View File

@ -49,6 +49,7 @@ rm -rf %{buildroot}
%{_usr}/share/ipa/*
%{plugin_dir}/libipa_pwd_extop.so
%{plugin_dir}/libipa-memberof-plugin.so
%changelog

View File

@ -1,4 +1,4 @@
SUBDIRS=ipa-pwd-extop
SUBDIRS=ipa-pwd-extop ipa-memberof
all:
@for subdir in $(SUBDIRS); do \

View File

@ -1,5 +1,28 @@
all:
gcc ipa-memberof.c -I/usr/include/nss3 -I/usr/include/mozldap -I/usr/include/nspr4 -I/usr/include/fedora-ds -I/usr/include -llber -shared -fPIC -DPIC -g -Wl,-soname -Wl,libipa-memberof-plugin.so -o libipa-memberof-plugin.so
PREFIX ?= $(DESTDIR)/usr
LIBDIR = $(PREFIX)/lib/fedora-ds/plugins
SHAREDIR = $(DESTDIR)/usr/share/ipa
SONAME = libipa-memberof-plugin.so
LDFLAGS += -llber
CFLAGS ?= -Wall -Wshadow -O2
CFLAGS += -I/usr/include/fedora-ds -I/usr/include/nss3 -I/usr/include/mozldap -I/usr/include/nspr4 -fPIC -DPIC
OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
all: $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) -Wl,-soname -Wl,$(SONAME) -shared -o $(SONAME)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
install:
cp -f libipa-memberof-plugin.so /usr/lib/fedora-ds/plugins/
-mkdir -p $(LIBDIR)
install -m 644 $(SONAME) $(LIBDIR)
install -m 644 *.ldif $(SHAREDIR)
clean:
rm -f *.o
rm -f $(SONAME)
rm -f *~