2006-03-09 17:44:19 +00:00
|
|
|
#
|
|
|
|
# Tim Rice Wed Aug 10 10:36:25 PDT 2005
|
|
|
|
#
|
|
|
|
# Tim Rice <tim@multitalents.net>
|
|
|
|
#
|
|
|
|
SHELL = /bin/sh
|
|
|
|
# We'll use tar instead of install-sh to preserve time stamps
|
|
|
|
#INSTALL = @INSTALL@
|
|
|
|
LN_S = @LN_S@
|
|
|
|
CHMOD = @CHMOD@
|
|
|
|
CHOWN = @CHOWN@
|
|
|
|
COPY = @COPY_PROG@
|
|
|
|
GREP = @GREP@
|
|
|
|
ID = @ID@
|
|
|
|
MKDIR = @MKDIR@
|
|
|
|
PERL = @PERL_PATH@
|
|
|
|
RM = @RM@
|
|
|
|
TAR = @TAR@
|
|
|
|
|
|
|
|
prefix=@prefix@
|
|
|
|
exec_prefix=@exec_prefix@
|
2009-09-25 17:38:33 +00:00
|
|
|
sbindir=@sbindir@
|
2006-07-13 18:46:17 +00:00
|
|
|
datarootdir = @datarootdir@
|
2006-03-09 17:44:19 +00:00
|
|
|
sysconfdir=@sysconfdir@
|
|
|
|
localstatedir=@localstatedir@
|
|
|
|
mandir=@mandir@
|
|
|
|
htmldir=@prefix@/html
|
|
|
|
|
|
|
|
srcdir=@srcdir@
|
|
|
|
top_srcdir=@top_srcdir@
|
|
|
|
VPATH=@srcdir@
|
|
|
|
top_builddir = .
|
|
|
|
|
|
|
|
HTTPD_USER = @HTTPD_USER@
|
|
|
|
HTTPD_GROUP = @HTTPD_GROUP@
|
|
|
|
|
|
|
|
#INSTALL_PROGRAM = $(INSTALL)
|
|
|
|
#INSTALL_DATA = $(INSTALL) -m 644
|
|
|
|
#INSTALL_SCRIPT = $(INSTALL) -m 755
|
|
|
|
|
2009-09-25 17:38:33 +00:00
|
|
|
DOCS = COPYING HISTORY INSTALL README copyright \
|
2006-03-09 17:44:19 +00:00
|
|
|
docs/README.Kolab.txt docs/README.fpdf.htm \
|
|
|
|
docs/README.hosts.txt docs/README.lamdaemon.txt \
|
|
|
|
docs/README.openldap.txt docs/README.schema.txt \
|
2009-09-25 17:38:33 +00:00
|
|
|
docs/README.security.txt docs/README.upgrade.txt \
|
|
|
|
docs/schema/dhcp.schema
|
2006-03-09 17:44:19 +00:00
|
|
|
|
|
|
|
HTML_DOCS = docs/devel
|
|
|
|
|
2006-05-06 07:24:08 +00:00
|
|
|
LIST1 = graphics help index.html lib locale style templates VERSION
|
2006-03-09 17:44:19 +00:00
|
|
|
LIST2 = sess tmp
|
|
|
|
LIST3 = config
|
|
|
|
|
|
|
|
RAR = run-as-root.sh
|
|
|
|
|
|
|
|
all:
|
|
|
|
|
|
|
|
install: install-lam install-htdocs
|
|
|
|
|
|
|
|
install-lam:
|
|
|
|
@HERE=`pwd` ; \
|
|
|
|
[ -d $(DESTDIR)$(prefix) ] || \
|
|
|
|
$(MKDIR) -p $(DESTDIR)$(prefix) || exit 1 ; \
|
|
|
|
[ -d $(DESTDIR)$(localstatedir) ] || \
|
|
|
|
$(MKDIR) -p $(DESTDIR)$(localstatedir) || exit 1 ; \
|
|
|
|
[ -d $(DESTDIR)$(sysconfdir) ] || \
|
|
|
|
$(MKDIR) -p $(DESTDIR)$(sysconfdir) || exit 1 ; \
|
|
|
|
cd $(DESTDIR)$(prefix) || exit 1 ; \
|
|
|
|
for i in $(LIST2) ; do \
|
|
|
|
[ -d $(DESTDIR)$(localstatedir)/$${i} ] || \
|
|
|
|
$(MKDIR) -p $(DESTDIR)$(localstatedir)/$${i} || exit 1 ; \
|
|
|
|
$(CHMOD) 750 $(DESTDIR)$(localstatedir)/$${i} ; \
|
|
|
|
$(LN_S) $(localstatedir)/$${i} $${i} ; \
|
2009-09-25 17:38:33 +00:00
|
|
|
(cd $(srcdir) ; $(COPY) $${i}/.htaccess \
|
|
|
|
$(DESTDIR)$(localstatedir)/$${i}) ; \
|
2006-03-09 17:44:19 +00:00
|
|
|
done ; \
|
|
|
|
LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d * | $(GREP) -v sample)`" ; \
|
|
|
|
(cd $(srcdir)/$(LIST3) ; $(TAR) cf - .) | \
|
|
|
|
(cd $(DESTDIR)$(sysconfdir) ; $(TAR) xf -) ; \
|
|
|
|
$(LN_S) $(sysconfdir) ${LIST3} ; \
|
|
|
|
(cd $(srcdir) ; $(TAR) cf - $(LIST1)) | $(TAR) xf - ; \
|
|
|
|
[ -d $(DESTDIR)$(prefix)/docs ] || \
|
|
|
|
$(MKDIR) -p $(DESTDIR)$(prefix)/docs || exit 1 ; \
|
|
|
|
(cd $(srcdir) ; $(COPY) $(DOCS) $(DESTDIR)$(prefix)/docs) ; \
|
|
|
|
$(PERL) -pi -e "s~/usr/bin/perl~$(PERL)~" \
|
|
|
|
$(DESTDIR)$(prefix)/lib/lamdaemon.pl \
|
|
|
|
$(DESTDIR)$(prefix)/docs/README.lamdaemon.txt ; \
|
|
|
|
cd $${HERE} ; \
|
|
|
|
echo "LAM files installed" ; \
|
|
|
|
if [ `$(ID) -u` = 0 ] ; then \
|
|
|
|
$(MAKE) DESTDIR=$(DESTDIR) do-chown ; \
|
|
|
|
else \
|
|
|
|
$(MAKE) DESTDIR=$(DESTDIR) echo-chown ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
do-chown:
|
|
|
|
@for i in $(LIST2) ; do \
|
|
|
|
$(CHOWN) $(HTTPD_USER) $(DESTDIR)$(localstatedir)/$${i} ; \
|
|
|
|
done ; \
|
|
|
|
LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d * | $(GREP) -v sample)`" ; \
|
|
|
|
for i in $${LIST4} ; do \
|
|
|
|
$(CHOWN) -R $(HTTPD_USER) $(DESTDIR)$(sysconfdir)/$${i} ; \
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
echo-chown:
|
|
|
|
@$(RM) -f $(RAR) ; \
|
|
|
|
for i in $(LIST2) ; do \
|
|
|
|
echo "$(CHOWN) $(HTTPD_USER) $(DESTDIR)$(localstatedir)/$${i}" \
|
|
|
|
>> $(RAR) ; \
|
|
|
|
done ; \
|
|
|
|
LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d * | $(GREP) -v sample)`" ; \
|
|
|
|
for i in $${LIST4} ; do \
|
|
|
|
echo "$(CHOWN) -R $(HTTPD_USER) $(DESTDIR)$(sysconfdir)/$${i}" \
|
|
|
|
>> $(RAR) ; \
|
|
|
|
done ; \
|
|
|
|
echo "Switch user to root and run $(RAR)"
|
|
|
|
|
|
|
|
|
|
|
|
install-htdocs:
|
|
|
|
@[ -d $(DESTDIR)$(htmldir) ] || \
|
|
|
|
$(MKDIR) -p $(DESTDIR)$(htmldir) || exit 1 ; \
|
|
|
|
(cd $(srcdir)/$(HTML_DOCS) ; $(TAR) cf - .) | \
|
|
|
|
(cd $(DESTDIR)$(htmldir) ; $(TAR) xf -) ; \
|
|
|
|
echo "HTML docs installed in $(htmldir)"
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) -f $(RAR)
|
|
|
|
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
$(RM) -f Makefile config.log config.status
|
|
|
|
|
|
|
|
|