- # $Id: Makefile.am,v 1.27 2000/06/19 00:27:41 mrsam Exp $
- #
- # Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
- # distribution information.
- @SET_MAKE@
- SUBDIRS=numlib @DBSUBDIR@ maildir md5 random128 userdb makedat rfc822 rfc2045
- liblock authlib cgi http11 ldapaddressbook sqwebmail
- DIST_SUBDIRS=numlib gdbmobj bdbobj maildir md5 random128 userdb makedat rfc822
- rfc2045 liblock authlib cgi http11 ldapaddressbook sqwebmail
- noinst_SCRIPTS= sqwebmail.spec
- EXTRA_DIST=INSTALL.html INSTALL.vchkpw NEWS.html README NEWS README.html README.pam
- sysconf_DATA=authmodulelist
- authmodulelist: authlib/modulelist
- cp authlib/modulelist authmodulelist
- # Import userdb documentation+scripts
- if HAS_USERDB
- userdb_scripts=vchkpw2userdb makeuserdb userdbpw pw2userdb
- userdb_data=makeuserdb.8 userdb.8 userdbpw.8
- else
- userdb_scripts=
- userdb_data=
- endif
- scriptbindir=@htmllibdir@/sbin
- scriptbin_SCRIPTS=$(userdb_scripts)
- pkglibexecdir=$(libexecdir)/sqwebmail
- pkglibexec_PROGRAMS=maildirmake
- pkgman8dir=@htmllibdir@/man/man8
- pkgman8_DATA=$(userdb_data) authlib.8
- pkgman1dir=@htmllibdir@/man/man1
- pkgman1_DATA=maildirmake.1
- authliblinks=authpam.8 authpwd.8 authshadow.8 authuserdb.8 authvchkpw.8
- authcram.8 authldap.8 authdaemon.8 authdaemond.8
- makeuserdb.8: userdb/makeuserdb.8
- cp userdb/makeuserdb.8 .
- userdb.8: userdb/userdb.8
- cp userdb/userdb.8 .
- userdbpw.8: userdb/userdbpw.8
- cp userdb/userdbpw.8 .
- authlib.8: authlib/authlib.8
- cp authlib/authlib.8 .
- makeuserdb: userdb/makeuserdb
- cp userdb/makeuserdb .
- userdbpw: userdb/userdbpw
- cp userdb/userdbpw .
- pw2userdb: userdb/pw2userdb
- cp userdb/pw2userdb .
- vchkpw2userdb: userdb/vchkpw2userdb
- cp userdb/vchkpw2userdb vchkpw2userdb
- maildirmake_SOURCES=
- maildirmake: maildir/maildirmake
- cp maildir/maildirmake .
- maildirmake.1: maildir/maildirmake.1
- cp maildir/maildirmake.1 .
- if HAS_USERDB
- install-userdb-local:
- $(mkinstalldirs) $(DESTDIR)$(pkgman8dir)
- rm -f $(DESTDIR)$(pkgman8dir)/pw2userdb.8
- rm -f $(DESTDIR)$(pkgman8dir)/vchkpw2userdb.8
- $(LN_S) makeuserdb.8 $(DESTDIR)$(pkgman8dir)/pw2userdb.8
- $(LN_S) makeuserdb.8 $(DESTDIR)$(pkgman8dir)/vchkpw2userdb.8
- $(mkinstalldirs) $(DESTDIR)$(pkglibexecdir)
- $(INSTALL_PROGRAM) makedat/makedatprog $(DESTDIR)$(pkglibexecdir)/makedatprog
- install-userdb-script:
- $(mkinstalldirs) $(DESTDIR)$(scriptbindir)
- $(INSTALL_SCRIPT) userdb/userdb.pl $(DESTDIR)$(scriptbindir)/userdb
- uninstall-userdb-script:
- rm -f $(DESTDIR)$(scriptbindir)/userdb
- uninstall-userdb-local:
- rm -f $(DESTDIR)$(pkgman8dir)/pw2userdb.8
- rm -f $(DESTDIR)$(pkgman8dir)/vchkpw2userdb.8
- rm -f $(DESTDIR)$(pkglibexecdir)/makedatprog
- else
- install-userdb-local:
- @:
- uninstall-userdb-local:
- @:
- install-userdb-script:
- @:
- uninstall-userdb-script:
- @:
- endif
- cgibindir=@cgibindir@
- #
- # Install SqWebMail setuid to root, if we're running as root
- #
- install-exec-local: install-userdb-script
- $(mkinstalldirs) $(DESTDIR)$(cgibindir)
- test -w $(DESTDIR)$(cgibindir) || exit 0;
- $(INSTALL_PROGRAM) sqwebmail/sqwebmail
- $(DESTDIR)$(cgibindir)/sqwebmail ;
- test -w /etc || continue ;
- chown root $(DESTDIR)$(cgibindir)/sqwebmail ;
- chmod u+s $(DESTDIR)$(cgibindir)/sqwebmail
- . authlib/authdaemonrc ; test "$$authdaemonvar" != "" || exit 0 ;
- $(mkinstalldirs) $(DESTDIR)$(libexecdir)/authlib || exit 1 ;
- $(INSTALL_PROGRAM) authlib/authdaemond
- $(DESTDIR)$(libexecdir)/authlib
- install-data-local: install-userdb-local
- $(mkinstalldirs) $(DESTDIR)$(pkgman8dir)/$$f
- for f in $(authliblinks) ; do
- rm -f $(DESTDIR)$(pkgman8dir)/$$f;
- $(LN_S) authlib.8 $(DESTDIR)$(pkgman8dir)/$$f; done
- . authlib/authdaemonrc ; test "$$authdaemonvar" != "" || exit 0 ;
- $(INSTALL_DATA) authlib/authdaemonrc
- $(DESTDIR)$(sysconfdir)/authdaemonrc || exit 1 ;
- chmod 600 $(DESTDIR)$(sysconfdir)/authdaemonrc || exit 1 ;
- $(mkinstalldirs) $(DESTDIR)@authdaemonvar@ || exit 1 ;
- chmod 700 $(DESTDIR)@authdaemonvar@
- -$(mkinstalldirs) $(DESTDIR)@imagedir@
- -for f in `cat sqwebmail/images/filelist` ; do
- $(INSTALL_DATA) $(srcdir)/sqwebmail/images/$$f $(DESTDIR)@imagedir@/$$f ;
- done
- @cat sqwebmail/sqwebmail.msg
- @cat authlib/authdaemon.msg
- uninstall-local: uninstall-userdb-local uninstall-userdb-script
- for f in $(authliblinks) ; do
- rm -f $(DESTDIR)$(pkgman8dir)/$$f; done
- test -w $(DESTDIR)$(cgibindir) || exit 0;
- rm -f $(DESTDIR)$(cgibindir)/sqwebmail
- . authlib/authdaemonrc ; test "$$authdaemonvar" != "" || exit 0 ;
- rm -f $(DESTDIR)$(libexecdir)/authlib/authdaemond ;
- rm -f $(DESTDIR)$(sysconfdir)/authdaemonrc
- for f in `cat sqwebmail/images/filelist` ; do
- rm -f $(DESTDIR)@imagedir@/$$f ;
- done
- configure-check:
- @echo "SqWebMail CGI will be installed in @cgibindir@"
- @echo "Images will be installed in @imagedir@"
- @cd sqwebmail && $(MAKE) -$(MAKEFLAGS) configure-check
- # Maintainer stuff
- README: README.html
- lynx -dump -nolist $(srcdir)/README.html >README
- NEWS: NEWS.html
- lynx -dump -nolist $(srcdir)/NEWS.html >NEWS
- distrelease:
- runsocks cvs commit
- runsocks cvs -Q tag -F sqwebmail-latest
- runsocks cvs -Q rtag -F -r sqwebmail-latest
- `echo sqwebmail-@VERSION@ | tr '.' '-'` sqwebmail
- $(MAKE) -$(MAKEFLAGS)
- $(MAKE) -$(MAKEFLAGS)
- $(MAKE) -$(MAKEFLAGS) release
- rpm: rpm-build
- rpm-build:
- $(MAKE) -$(MAKEFLAGS) bump.rpm.release
- $(MAKE) -$(MAKEFLAGS) dist
- rm -rf rpm/BUILD/*
- rm -f rpm/RPMS/*/*
- rm -f rpm/SOURCES/*
- rm -f rpm/SPECS/*
- rm -f rpm/SRPMS/*
- rpm -ta --sign @PACKAGE@-@VERSION@.tar.gz
- release:
- rm -f sqwebmail.spec
- $(MAKE) -$(MAKEFLAGS) sqwebmail.spec
- $(MAKE) -$(MAKEFLAGS) dist
- rm -rf htmldist
- mkdir htmldist
- ln @PACKAGE@-@VERSION@.tar.gz htmldist
- ln NEWS.html htmldist/index.html
- INSTALL.txt: INSTALL.html
- lynx -dump -nolist $(srcdir)/INSTALL.html >INSTALL.txt
- rm -f INSTALL
- cp INSTALL.txt INSTALL
- dist-hook:
- rm -f $(distdir)/INSTALL $(distdir)/NEWS $(distdir)/README
- lynx -dump -nolist $(srcdir)/NEWS.html >$(distdir)/NEWS
- lynx -dump -nolist $(srcdir)/README.html >$(distdir)/README
- lynx -dump -nolist $(srcdir)/INSTALL.html >$(distdir)/INSTALL
- cp sqwebmail.spec $(distdir)
- test -f $(srcdir)/rpm.release && cp $(srcdir)/rpm.release $(distdir)
- ; exit 0
- bump.rpm.release: sqwebmail.spec
- VERSION="x";
- test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release;
- NEXT_RELEASE=0;
- test "$$VERSION" = "@VERSION@" && NEXT_RELEASE="$$RELEASE";
- RELEASE=`expr $$NEXT_RELEASE + 1`;
- echo "VERSION=@VERSION@" >$(srcdir)/rpm.release;
- echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release;
- sed 's/^Release: .*/Release: '$$RELEASE'/'
- <sqwebmail.spec >sqwebmail.spec.new;
- mv sqwebmail.spec.new sqwebmail.spec