Makefile.am 3.5 KB
Newer Older
1
 # Makefile.am - Top-level Makefile.am for Sympa
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# RCS Identication ; $Revision$ ; $Date$ 
#
# Sympa - SYsteme de Multi-Postage Automatique
# Copyright (c) 1997, 1998, 1999, 2000, 2001 Comite Reseau des Universites
# Copyright (c) 1997,1998, 1999 Institut Pasteur & Christophe Wolfhugel
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

22
SUBDIRS = src wwsympa soap web_tt2 mail_tt2 doc po po-wwsympa
23

24
EXTRA_DIST = important_changes.pl
25

26
install-data-hook: installdir installconfig nextstep importantchanges
root's avatar
root committed
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
installdir:
	@echo "Creating writable directories"
	@for dir in $(expldir) $(spooldir) $(spooldir)/msg $(spooldir)/digest \
		$(spooldir)/moderation $(spooldir)/expire $(spooldir)/auth \
		$(spooldir)/outgoing $(spooldir)/tmp $(spooldir)/task \
		$(prefix)/bounce $(prefix)/arc; do \
		if [ ! -d $(DESTDIR)$$dir ] ; then \
			echo "Creating $(DESTDIR)$$dir"; \
			install -d -m 755 $(DESTDIR)$$dir; \
			chown $(USER) $(DESTDIR)$$dir || /bin/true; \
			chgrp $(GROUP) $(DESTDIR)$$dir || /bin/true; \
		fi \
	done
	@echo "Creating non-writable directories"
	@for dir in create_list_templates mail_tt2 web_tt2 scenari \
		task_models general_task_models; do \
		if [ ! -d $(DESTDIR)$(sysconfdir)/$$dir ] ; then \
			echo "Creating $(DESTDIR)$(sysconfdir)/$$dir"; \
			install -d -m 755 $(DESTDIR)$(sysconfdir)/$$dir; \
		fi \
	done
49

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
installconfig:
	@echo "Installing basic configuration ..."
	export PERL5LIB=$(DESTDIR)$(modulesdir); \
	$(DESTDIR)$(sbindir)/sympa_wizard.pl \
		--create sympa.conf \
		--target $(DESTDIR)$(sysconfdir)/sympa.conf \
		|| /bin/true; \
	$(DESTDIR)$(sbindir)/sympa_wizard.pl \
		--create wwsympa.conf \
		--target $(DESTDIR)$(sysconfdir)/wwsympa.conf \
		|| /bin/true
	if [ ! -f $(DESTDIR)$(sysconfdir)/data_structure.version ]; then \
		cd $(DESTDIR)$(sysconfdir); \
		echo "# automatically created file" >> data_structure.version; \
		echo "# you should not modify it" >> data_structure.version; \
		echo $(VERSION) >> data_structure.version; \
		chown $(USER).$(GROUP) data_structure.version || /bin/true; \
sympa-authors's avatar
sympa-authors committed
67
68
	fi

olivier.salaun's avatar
olivier.salaun committed
69
nextstep: 
70
71
72
	@echo ""
	@echo "** You can find documentation at:"
	@echo "** http://www.sympa.org/documentation/manual/sympa-$(SYMPA_VERSION).pdf"
olivier.salaun's avatar
olivier.salaun committed
73
74
75
76
	@echo ""
	@echo "#########################################################"
	@echo "# If you install Sympa for the first time on this server"
	@echo "# you should check the INSTALL file."
77
78
	@echo "#"
	@echo "# If you are upgrading, you now need to run"
79
	@echo "#    $(sbindir)/sympa.pl --upgrade"
olivier.salaun's avatar
olivier.salaun committed
80
	@echo "#######################################################"
81
82

importantchanges:
83
84
85
86
87
88
89
90
91
92
	if [ -f $(DESTDIR)$(modulesdir)/Version.pm ]; then \
		previous=`perl -Mlib=$(DESTDIR)$(modulesdir) -MVersion -e 'print $$Version::Version'`; \
	fi; \
	$(PERL) $(top_srcdir)/important_changes.pl \
		--current $(VERSION) \
		--previous $${previous}

uninstall-hook:
	rm -f $(DESTDIR)$(sysconfdir)/sympa.conf
	rm -f $(DESTDIR)$(sysconfdir)/wwsympa.conf