From 73e18839e37f0c287f77b40fb7c2fbce2a112a58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 7 Jan 2007 16:09:17 +0000 Subject: [PATCH] * split make install targets in finer granulated targets * added editor config option * updated these to README.txt * removed all those fixups in debina/rules * debian: have our templates in /usr/share/citadel-webcit/ * debian: directly point to debian tinyMCE package --- webcit/Makefile.in | 36 ++++++++++++++++++++++++++---------- webcit/README.txt | 17 ++++++++++------- webcit/aclocal.m4 | 2 +- webcit/config.h | 1 - webcit/configure.ac | 12 ++++++++++++ webcit/debian/control | 7 +------ webcit/debian/rules | 22 ++++------------------ 7 files changed, 54 insertions(+), 43 deletions(-) diff --git a/webcit/Makefile.in b/webcit/Makefile.in index 732301c96..5d1661e1a 100644 --- a/webcit/Makefile.in +++ b/webcit/Makefile.in @@ -19,6 +19,8 @@ PROG_SUBDIRS=@PROG_SUBDIRS@ SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) LOCALEDIR=@LOCALEDIR@ WWWDIR=@WWWDIR@ +EDITORDIR=@EDITORDIR@ + # End of configuration section all: all-progs-recursive webserver setup @@ -65,10 +67,16 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \ $(LIBOBJS) $(LIBS) $(LDFLAGS) -o webserver .c.o: - $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(WWWDIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\" $< + $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) \ + -DWEBCITDIR=\"$(WWWDIR)\" \ + -DLOCALEDIR=\"$(LOCALEDIR)\" \ + -DEDITORDIR=\"$(EDITORDIR)\" $< .cpp.o: - $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(WWWDIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\" $< + $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) \ + -DWEBCITDIR=\"$(WWWDIR)\" \ + -DLOCALEDIR=\"$(LOCALEDIR)\" \ + -DEDITORDIR=\"$(EDITORDIR)\"$< Makefile: $(srcdir)/Makefile.in config.status CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status @@ -82,29 +90,37 @@ $(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4 $(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4 cd $(srcdir) && $(ACLOCAL) -install: install-bin install-locale install-wwwdata +install: install-bin install-setupbin install-locale install-wwwdata install-tinymce install-bin: - test -d $(DESTDIR)$(prefix) || mkdir $(DESTDIR)$(prefix) - for i in webserver setup; do \ - $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \ - done + test -d $(DESTDIR)$(prefix) || mkdir -p $(DESTDIR)$(prefix) + $(INSTALL) webserver $(DESTDIR)$(prefix)/webserver + + +install-setupbin: install-bin + $(INSTALL) setup $(DESTDIR)$(prefix)/setup + install-wwwdata: - test -d $(DESTDIR)$(prefix)/static || mkdir -p $(DESTDIR)$(prefix)/static + test -d $(DESTDIR)$(WWWDIR)/static || mkdir -p $(DESTDIR)$(WWWDIR)/static + for i in `find static -type f | grep -v .svn`; do \ + $(INSTALL) $$i $(DESTDIR)$(WWWDIR)/$$i; \ + done + +install-tinymce: + test -d $(DESTDIR)$(WWWDIR)/static || mkdir -p $(DESTDIR)$(WWWDIR)/static for i in `find tiny_mce -type d | grep -v .svn` \ ; do \ test -d $(DESTDIR)$(WWWDIR)/$$i || mkdir -p $(DESTDIR)$(WWWDIR)/$$i; \ done for i in \ - `find static -type f | grep -v .svn` \ `find tiny_mce -type f | grep -v .svn` \ ; do \ $(INSTALL) $$i $(DESTDIR)$(WWWDIR)/$$i; \ done install-locale: - test -d $(DESTDIR)$(prefix)/local || mkdir -p $(DESTDIR)$(prefix)/local + test -d $(DESTDIR)$(LOCALEDIR)/local || mkdir -p $(DESTDIR)$(LOCALEDIR)/local for i in `find locale -type d | grep -v .svn` \ ; do \ test -d $(DESTDIR)$(LOCALEDIR)/$$i || mkdir -p $(DESTDIR)$(LOCALEDIR)/$$i; \ diff --git a/webcit/README.txt b/webcit/README.txt index 5e1916ac0..6a8b22a57 100644 --- a/webcit/README.txt +++ b/webcit/README.txt @@ -296,19 +296,22 @@ Here is how to configure the "subdirectory" method: If you are building packages and prefer not to have WebCit reside entirely in a single directory, there are several compile-time options available. ---with-staticdir defines where webcit should locate and search its templates and images. If you -want to go with a different installation location then the point at which it is accessed at runtime, -you can use --with-staticrundir. This option is meant to ease your needs if you're going -to install the static files as 'examples' in a location like /usr/share/doc/webcit/examples, -and enable the user to copy them over to another dir (like /var/lib/citadel/www), where -they're accessed at runtime. (The debian instatll scripts provided with this package -do this to preserve user changes to the template system, see debian/citadel-webcit.postinstall) +--with-wwwdir defines where webcit should locate and search its templates and images. +--with-localedir defines where to put webcits locale files. Also, there are possibilities to load the TinyMCE editor into a system-wide location. WebCit uses this standard component to compose its messages for messages and postings. Several WebCit installations that may differ in design but use the same TinyMCE (which is the default that WebCit ships with) (set --with-editordir for that, it defaults to the dir the templates go) +Install targets have diversified to reflect these changes too: + (make install-.....) +locale: the webcit .mo files for gettext & locales. +tinymce: the editor. if your system brings one, just ommit this. +wwwdata: our templates. +setupbin: if you want to use webcits setup facility... but isn't needed in case you provide own init & config scripts. +bin: the binaries. + CONCLUSION ---------- diff --git a/webcit/aclocal.m4 b/webcit/aclocal.m4 index 6af4bc7fa..af52a7f30 100644 --- a/webcit/aclocal.m4 +++ b/webcit/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.9.5 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. diff --git a/webcit/config.h b/webcit/config.h index ca205a300..837193b13 100644 --- a/webcit/config.h +++ b/webcit/config.h @@ -3,7 +3,6 @@ */ #define _GNU_SOURCE -#define EDITORDIR WEBCITDIR "/tiny_mce" #define RUNDIR WEBCITDIR #define BASEDIR WEBCITDIR #define DATADIR WEBCITDIR diff --git a/webcit/configure.ac b/webcit/configure.ac index ba592c3d3..b07cd2660 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -347,9 +347,11 @@ AC_SUBST(SETUP_LIBS) if test "$prefix" = NONE; then LOCALEDIR=$ac_default_prefix WWWDIR=$ac_default_prefix + EDITORDIR=$ac_default_prefix/tiny_mce else LOCALEDIR=$prefix WWWDIR=$prefix + EDITORDIR=$prefix/tiny_mce fi dnl where to put the locale files @@ -372,6 +374,16 @@ AC_ARG_WITH(wwwdir, ) AC_SUBST(WWWDIR) +dnl Checks where to put our editor +AC_ARG_WITH(editordir, + [ --with-editordir directory to put our editor], + [ if test "x$withval" != "xno" ; then + EDITORDIR=$withval + fi + ] +) +AC_SUBST(EDITORDIR) + AC_OUTPUT(Makefile po/Makefile ) diff --git a/webcit/debian/control b/webcit/debian/control index 2e689d123..8c1d98ddf 100644 --- a/webcit/debian/control +++ b/webcit/debian/control @@ -9,7 +9,7 @@ Standards-Version: 3.7.2 Package: citadel-webcit Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, debconf, tinymce -Suggests: citadel-server +Suggests: citadel-server, apache2 | apache Description: web-based frontend to Citadel groupware server WebCit is a web-based, AJAX-enabled frontend to the Citadel groupware system. It is an attractive web middleware layer that allows user-friendly access. @@ -19,8 +19,3 @@ Description: web-based frontend to Citadel groupware server . Homepage: http://www.citadel.org -Package: citadel-webcit-apache -Architecture: any -Depends: citadel-webcit, apache2 | httpd, debconf -Description: Integrates Webcit with your local Apache - diff --git a/webcit/debian/rules b/webcit/debian/rules index d46918ae4..f24ca9840 100755 --- a/webcit/debian/rules +++ b/webcit/debian/rules @@ -27,11 +27,10 @@ configure-stamp: CFLAGS="$(CFLAGS)" ./configure \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ - --prefix=/etc/citadel/www/ \ + --prefix=/usr/sbin/ \ + --with-wwwdir=/usr/share/citadel-webcit \ --with-localedir=/usr/share/locale \ - --with-sysconfdir=/etc/citadel \ - --with-spooldir=/var/spool/citadel \ - --with-datadir=/etc/citadel \ + --with-editordir=/usr/share/tinymce/www \ --with-rundir=/var/run/citadel \ --with-ical --with-db --with-ldap \ --with-zlib --with-ssl --with-libiconf \ @@ -66,21 +65,8 @@ install: build dh_testroot dh_clean -k dh_installdirs + $(MAKE) install-bin install-locale install-wwwdata DESTDIR=$(DESTDIR) -# Add here commands to install the package into debian/webcit. - $(MAKE) -C . install DESTDIR=$(DESTDIR) -# there are debian tinymce packages arround, so we don't ship it another time. - rm -rf $(DESTDIR)/etc/citadel/www/tiny_mce -# we don't use the setup anymore, omit it. - rm -f $(DESTDIR)/etc/citadel/www/setup -# locale -> /usr/share/locale - mkdir -p $(DESTDIR)/usr/share/ - mv $(DESTDIR)/etc/citadel/www/locale \ - $(DESTDIR)/usr/share/locale - - mkdir -p $(DESTDIR)/usr/sbin - mv $(DESTDIR)/etc/citadel/www/webserver \ - $(DESTDIR)/usr/sbin/ # Build architecture-independent files here. -- 2.30.2