Makefile.am 15 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Makefile.am - Top-level Makefile.am for Sympa
# 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
23
24
25
26
#SUBDIRS = src doc wwsympa nls

ChangeLog:
	@CVS2CL@

root's avatar
root committed
27
## User Id and Group for Sympa (your httpd should have the same uid.gid)
28
29
USER	=	@USER@
GROUP	=	@GROUP@
root's avatar
root committed
30
31

## configuration file
32
CONFDIR	=	${sysconfdir}
root's avatar
root committed
33

salaun's avatar
salaun committed
34
35
36
## LC_ALL is set to this ; required to compile NLS
LANG	=	fr_FR

root's avatar
root committed
37
##  Perl path
38
PERL	=	@PERL@
root's avatar
root committed
39
40
41
42
43
44

## For preparing samples
HOST		=	`$(PERL) -MSys::Hostname -e "printf '%s', Sys::Hostname::hostname();"`
COOKIE		=	`$(PERL) -e " print int(rand ( time ))  "`
PERL_VERSION	=	`$(PERL) -e ' print $$]'`

45
SYMPA_VERSION	=	@VERSION@
root's avatar
root committed
46
47
48
49
50
51

## Root directory for Sympa ; use absolute path.
## Binaries are located under $DIR/bin ; this directory needs to be
## readable for everyone ; `queue' needs to be executable 
## You can also set DESTDIR to the place where everything should be
## installed (usefull for packagers of Sympa)
52
53
54
DIR	=	${prefix}

EXPL_DIR	=	${localstatedir}
root's avatar
root committed
55
56

## PID location
57
PIDDIR	=	${prefix}
root's avatar
root committed
58
59
60
61

## Both queue and bouncequeue are lunched by sendmail. If sendmail
## is configured to used smrsh (check the mailer prog definition), thoses
## files needs to be installed in /etc/smrsh.  
salaun's avatar
salaun committed
62
MAILERPROGDIR	=	${bindir}
root's avatar
root committed
63
64
65
66

#RPMTOPDIR	=	`rpm --eval %_topdir`
RPMTOPDIR	=	/usr/src/redhat

67
MANDIR		=	${mandir}
salaun's avatar
salaun committed
68

root's avatar
root committed
69
70
71
## SYSV init scripts directory
INITDIR		=	$(DIR)/bin

72
73
74
75
76
## no more used ##
BINDIR		=	${bindir}

SBINDIR		=	${sbindir}
LIBDIR		=	${libdir}
root's avatar
root committed
77
78
79
80
81
82
83

## Spools directory
SPOOLDIR	=	$(DIR)/spool

## Directory for installing WWSympa
WWSBINDIR	=	$(BINDIR)

84
## Web interface colors are now defined in sympa.conf
root's avatar
root committed
85
86
87
88

## Target directory for installing Icons
ICONSDIR	=	/home/httpd/icons

89
90
91
92
93
## Settings used in src/etc/scripts/sympa
PIDPRE		=	pidof -x
PIDPOST		=	
LOCKDIR		=	/var/lock/subsys

94
95
## Path to newaliases command (or what else may be called to rebuild
## Mail aliases database)
96
NEWALIASES    =       @NEWALIASES@
97

98
99
## Argument to newaliases command
# NEWALIASES_ARG	=	hash:/etc/mail/sympa_aliases
100
NEWALIASES_ARG	=	@NEWALIASES_ARG@
101

102
103
104
105
## The sendmail aliases file we use. Better use a seperate one for sympa.
## Of cause a extra alias file must be generated with proper permissions
## (owner sympa, write access for sympa, no write access for anyone else)
## and declared in sendmail.cf!
106
SENDMAIL_ALIASES=     @SENDMAIL_ALIASES@
107

root's avatar
root committed
108
## Path to gencat program (creates the .cat catalog file using the .msg)
109
GENCAT	= 	@GENCAT@
root's avatar
root committed
110
111

## Path to OpenSSL
112
OPENSSL	=	@OPENSSL@
salaun's avatar
salaun committed
113
SSLCERTDIR =	$(EXPL_DIR)/X509-user-certs
root's avatar
root committed
114

115
116
SH	=	@SH@
CC	=	@CC@
root's avatar
root committed
117
118
119
CFLAGS	=	-g

# Aix4.2 (and some others unix), use gnu make !
120
#MAKE	=	@MAKE@
root's avatar
root committed
121

122
123
124
125
126
127
128
129
130
131
132
# FreeBSD hier(7) structure and locations
# by Autrijus Tang 2001/10/11
#ifeq ($(shell uname), FreeBSD)
#	PIDPRE	= 	ps -ax | grep
#	PIDPOST	= 	| grep perl | head -n 1 | cut -f 2 -d " "
#	LOCKDIR	= 	/var/spool/lock
#	ICONSDIR	=	/usr/local/www/icons
#	RPMTOPDIR	=	/usr/local/src/redhat
#	OPENSSL	=	/usr/bin/openssl
#endif

root's avatar
root committed
133
134
135
136
##---------- STOP ---------- STOP ---------- STOP ---------- STOP ----------

CONFIG		=	$(CONFDIR)/sympa.conf
WWSCONFIG	=	$(CONFDIR)/wwsympa.conf
137
ETCBINDIR	=	${datadir}
root's avatar
root committed
138
139
140
141
142
143
144
145
NLSDIR		=	$(DIR)/nls

#ifeq ($(shell uname), Linux)
#	LOG_SOCKET_TYPE="inet"
#else
LOG_SOCKET_TYPE	=	"unix"
#endif

146
all:	checkcpan sources languages checkperl man
root's avatar
root committed
147
148
149
150

rpm: build_rh_rpm build_mdk_rpm

checkperl:
salaun's avatar
salaun committed
151
152
153
154
155
	@echo "#######################################"
	@echo "## Database structure has been extended"
	@echo "## You need to run the following command on your database :"
	@echo "## ALTER TABLE subscriber_table ADD comment_subscriber varchar (150);"
	@echo "## ";
156
	@echo "## Then run $(SBINDIR)/init_comment.pl"
root's avatar
root committed
157
158
	@if [ $(PERL_VERSION) = '5.006' ]; then \
	echo "##################################"; \
salaun's avatar
salaun committed
159
	echo "## You are using Perl version $(PERL_VERSION) :"; \
root's avatar
root committed
160
161
162
163
164
165
166
167
	echo "## You need to patch your syslog.pm "; \
	echo "## See http://bugs.perl.org/perlbug.cgi?req=bidmids&bidmids=20000712.003"; \
	echo "##"; \
	echo "## If your Perl version is 5.6.0 AND if your system is Solaris :"; \
	echo "## See also http://bugs.perl.org/perlbug.cgi?req=bidmids&bidmids=20000522.003"; \
	echo "#############################################################################"; \
	fi

168
sources: src/Makefile src/queue.c src/bouncequeue.c src/aliaswrapper.c
root's avatar
root committed
169
170
171
	@echo "Making src"
	(cd src && echo "making in src..." && \
	$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' \
172
	DIR='${DIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' WWSBINDIR='${WWSBINDIR}' \
root's avatar
root committed
173
174
	MAILERPROGDIR='${MAILERPROGDIR}' ETCBINDIR='${ETCBINDIR}' \
	CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
175
	USER='${USER}' GROUP='${GROUP}' \
176
	SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' NEWALIASES='${NEWALIASES}' \
177
178
	NEWALIASES_ARG='${NEWALIASES_ARG}' \
	PIDPRE='${PIDPRE}' PIDPOST='${PIDPOST}' LOCKDIR='${LOCKDIR}');
root's avatar
root committed
179

180
doc: doc/sympa.tex.tpl doc/Makefile 
root's avatar
root committed
181
182
183
	@echo "Making doc"
	(cd doc && echo "making in doc..." && \
	$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' \
184
	DIR='${DIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' WWSBINDIR='${WWSBINDIR}' \
root's avatar
root committed
185
186
187
188
	MAILERPROGDIR='${MAILERPROGDIR}' ETCBINDIR='${ETCBINDIR}' \
	CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
	USER='${USER}' GROUP='${GROUP}');

189
190
191
192
193
man: doc/man8/Makefile
	@echo "Making man"
	(cd doc/man8 && echo "making in doc/man8/..." && \
	$(MAKE) SYMPA_VERSION='$(SYMPA_VERSION)');

root's avatar
root committed
194
195
languages:
	@echo "Making nls"
salaun's avatar
salaun committed
196
	(LC_ALL=$(LANG); export LC_ALL; cd nls && echo "making in nls..." && \
root's avatar
root committed
197
	$(MAKE) SH='${SH}' PERL='${PERL}' ETCBINDIR='${ETCBINDIR}' \
198
	DIR='${DIR}' NLSDIR='${NLSDIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' \
root's avatar
root committed
199
200
201
202
203
204
205
206
	USER='${USER}' GROUP='${GROUP}' GENCAT='${GENCAT}');

checkcpan: 
	@echo "Checking needed CPAN modules ..."
	$(PERL) ./check_perl_modules.pl

clean:
	find . \( -name ".#*" -o -name "*~" -o -name ".*~" -o -name "#*#" \) -exec  rm -f {} \;
207
	@for i in src nls wwsympa src/etc/sample;\
root's avatar
root committed
208
209
210
211
212
	do \
	(cd $$i && echo "making clean in $$i..." && \
	$(MAKE) PERL='${PERL}' clean) || exit 1; \
	done;

213
214
215
216
217
install: importantchanges installsrc installnls installwws installman installscript installsample installdir installconfig

importantchanges:
	( 	PERL=$(PERL); export PERL; \
		UMASK=0600; export UMASK; \
218
219
220
		BINDIR=$(SBINDIR); export BINDIR; \
		SBINDIR=$(SBINDIR); export SBINDIR; \
		LIBDIR=$(LIBDIR); export LIBDIR; \
221
222
		SYMPA_VERSION=$(SYMPA_VERSION); export SYMPA_VERSION; \
		$(PERL) ./important_changes.pl \
223
	) ;
224

root's avatar
root committed
225
226
227
228

installsrc:
	(cd src && echo "making in src..." && \
	$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' SYMPA_VERSION='${SYMPA_VERSION}' \
229
	DIR='${DIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' WWSBINDIR='${WWSBINDIR}' \
230
	DESTDIR='${DESTDIR}' MAILERPROGDIR='${MAILERPROGDIR}' EXPL_DIR='${EXPL_DIR}' \
231
	PIDDIR='${PIDDIR}' CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
232
	ETCBINDIR='${ETCBINDIR}' SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' \
root's avatar
root committed
233
234
235
236
237
238
239
	USER='${USER}' GROUP='${GROUP}' newinstall) || exit 1;

installnls:
	(cd nls && echo "making in nls..." && \
	$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' \
	DIR='${DIR}' NLSDIR='${NLSDIR}' ETCBINDIR='${ETCBINDIR}' \
	DESTDIR='${DESTDIR}' CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' \
240
	SENDMAIL_ALIASES='${SENDMAIL_ALIASES}' \
root's avatar
root committed
241
242
243
244
245
	USER='${USER}' GROUP='${GROUP}' GENCAT='${GENCAT}' newinstall) || exit 1;

installwws:
	(cd wwsympa && echo "making in wwsympa..." && \
	$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' \
246
	DIR='${DIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' WWSBINDIR='${WWSBINDIR}' MAILERPROGDIR='${MAILERPROGDIR}' \
247
	PIDDIR='${PIDDIR}' CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' ETCBINDIR='${ETCBINDIR}' \
248
	DESTDIR='${DESTDIR}' USER='${USER}' GROUP='${GROUP}' ICONSDIR='${ICONSDIR}' newinstall) || exit 1;
root's avatar
root committed
249
250
251
252

installsample:
	(cd src/etc/sample && echo "making in src/etc/sample..." && \
	$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' LOG_SOCKET_TYPE='${LOG_SOCKET_TYPE}' \
253
	DESTDIR='${DESTDIR}' DIR='${DIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' WWSBINDIR='${WWSBINDIR}' HOST='${HOST}' \
root's avatar
root committed
254
	CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' ETCBINDIR='${ETCBINDIR}' MAILERPROGDIR='${MAILERPROGDIR}' \
255
256
	COOKIE='${COOKIE}' OPENSSL='@OPENSSL@' SSLCERTDIR='${SSLCERTDIR}' \
	SPOOLDIR='${SPOOLDIR}' USER='${USER}' GROUP='${GROUP}' ICONSDIR='${ICONSDIR}' PIDDIR='${PIDDIR}' install) || exit 1;
root's avatar
root committed
257

salaun's avatar
salaun committed
258
259
260
installman:
	mkdir -p $(DESTDIR)$(MANDIR)
	mkdir -p $(DESTDIR)$(MANDIR)/man8
261
	@for manfile in sympa.8 archived.8 bounced.8 alias_manager.8; do \
salaun's avatar
salaun committed
262
263
264
265
266
267
268
269
270
271
	echo "Installing man file man8/$$manfile..."; \
	( \
		cd doc/man8 ; \
		PERL=$(PERL); export PERL; \
		UMASK=0600; export UMASK; \
		DIR=$(DIR); export DIR; \
		INSTALLDIR=$(MANDIR)/man8; export INSTALLDIR; \
		DESTDIR=$(DESTDIR); export DESTDIR; \
		SYMPA_VERSION=$(SYMPA_VERSION); export SYMPA_VERSION; \
		CONFDIR=$(CONFDIR); export CONFDIR; \
272
273
274
275
		SENDMAIL_ALIASES=$(SENDMAIL_ALIASES); export SENDMAIL_ALIASES; \
		MAILERPROGDIR=$(MAILERPROGDIR); export MAILERPROGDIR; \
		PIDDIR=$(PIDDIR); export PIDDIR; \
		SPOOLDIR=$(SPOOLDIR); export SPOOLDIR; \
salaun's avatar
salaun committed
276
277
278
279
280
281
282
283
		PIDDIR=$(PIDDIR); export PIDDIR; \
		$(PERL) ../../subst.pl $$manfile \
	) ;\
	chown $(USER) $(DESTDIR)$(MANDIR)/man8/$$manfile; \
	chgrp $(GROUP) $(DESTDIR)$(MANDIR)/man8/$$manfile; \
	done


root's avatar
root committed
284
285
286
installscript:
	(cd src/etc/script && echo "making in src/etc/script..." && \
	$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' \
287
	DIR='${DIR}' DESTDIR='${DESTDIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' WWSBINDIR='${WWSBINDIR}' HOST='${HOST}' \
root's avatar
root committed
288
	CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' ETCBINDIR='${ETCBINDIR}' \
aumont's avatar
aumont committed
289
	MAILERPROGDIR='${MAILERPROGDIR}' PIDDIR='${PIDDIR}' \
290
	COOKIE='${COOKIE}' INITDIR='${INITDIR}' \
291
	PIDPRE='${PIDPRE}' PIDPOST='${PIDPOST}' LOCKDIR='${LOCKDIR}' \
292
	OPENSSL='@OPENSSL@' USER='${USER}' GROUP='${GROUP}' ICONSDIR='${ICONSDIR}' install) || exit 1;
root's avatar
root committed
293
294
295


installdir:
296
297
298
	echo "Setting $(USER) owner of $(DESTDIR)$(DIR)"
	chown $(USER) $(DESTDIR)$(DIR)
	chgrp $(GROUP) $(DESTDIR)$(DIR)
root's avatar
root committed
299
	@if [ ! -f $(DESTDIR)$(CONFDIR)/sympa.conf ] ; then \
300
	echo "First installation : installing directories..."; \
301
302
303
304
305
	echo "Creating $(DESTDIR)$(DIR)/"; \
	mkdir -p $(DESTDIR)$(DIR); \
	chmod 755 $(DESTDIR)$(DIR); \
	chown $(USER) $(DESTDIR)$(DIR); \
	chgrp $(GROUP) $(DESTDIR)$(DIR); \
root's avatar
root committed
306
307
308
309
310
311
312
313
314
315
	for dir in expl etc sample ; do \
		if [ ! -d $(DESTDIR)$(DIR)/$$dir ] ; then \
			echo "Creating $(DESTDIR)$(DIR)/$$dir"; \
			mkdir -p $(DESTDIR)$(DIR)/$$dir; \
			chown $(USER) $(DESTDIR)$(DIR)/$$dir; \
			chgrp $(GROUP) $(DESTDIR)$(DIR)/$$dir; \
		fi \
	done \
	fi
	@if [ ! -f $(DESTDIR)$(CONFDIR)/sympa.conf ] ; then \
316
	echo "First installation : installing conf directories..."; \
317
318
	for dir in etc/create_list_templates etc/templates etc/wws_templates etc/scenari \
	etc/task_models etc/general_task_models; do \
root's avatar
root committed
319
320
321
322
323
324
325
326
327
		if [ ! -d $(DESTDIR)$(DIR)/$$dir ] ; then \
			echo "Creating $(DESTDIR)$(DIR)/$$dir"; \
			mkdir -p $(DESTDIR)$(DIR)/$$dir; \
			chown $(USER) $(DESTDIR)$(DIR)/$$dir; \
			chgrp $(GROUP) $(DESTDIR)$(DIR)/$$dir; \
		fi \
	done \
	fi
	@if [ ! -f $(DESTDIR)$(CONFDIR)/sympa.conf ] ; then \
328
	echo "First installation : installing spool directories..."; \
root's avatar
root committed
329
	for dir in $(SPOOLDIR) $(SPOOLDIR)/msg $(SPOOLDIR)/digest $(SPOOLDIR)/moderation \
330
331
	$(SPOOLDIR)/expire $(SPOOLDIR)/auth $(SPOOLDIR)/outgoing $(SPOOLDIR)/tmp \
	$(SPOOLDIR)/task ; do \
root's avatar
root committed
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
		if [ ! -d $(DESTDIR)$$dir ] ; then \
			echo "Creating $(DESTDIR)$$dir"; \
			mkdir -p $(DESTDIR)$$dir; \
			chown $(USER) $(DESTDIR)$$dir; \
			chgrp $(GROUP) $(DESTDIR)$$dir; \
			chmod 770 $(DESTDIR)$$dir; \
		fi \
	done \
	fi

installconfig:
	mkdir -p $(DESTDIR)$(CONFDIR)
	@for cfile in sympa.conf wwsympa.conf ; do \
	if [ ! -f $(DESTDIR)$(CONFDIR)/$$cfile ] ; then \
	echo "Installing sample config file $$cfile..."; \
	( \
		cd src/etc/sample/ ; \
		PERL=$(PERL); export PERL; \
		UMASK=0600; export UMASK; \
		DIR=$(DIR); export DIR; \
352
		EXPL_DIR=$(EXPL_DIR); export EXPL_DIR; \
root's avatar
root committed
353
354
355
		INSTALLDIR=$(CONFDIR); export INSTALLDIR; \
		DESTDIR=$(DESTDIR); export DESTDIR; \
		BINDIR=$(BINDIR); export BINDIR; \
356
357
		SBINDIR=$(SBINDIR); export SBINDIR; \
		LIBDIR=$(LIBDIR); export LIBDIR; \
root's avatar
root committed
358
359
360
361
362
		ETCBINDIR=$(ETCBINDIR); export ETCBINDIR; \
		CONFIG=$(CONFIG); export CONFIG; \
		LOG_SOCKET_TYPE=$(LOG_SOCKET_TYPE); export LOG_SOCKET_TYPE; \
		COOKIE=$(COOKIE); export COOKIE; \
		HOST=$(HOST); export HOST; \
363
		OPENSSL=@OPENSSL@; export OPENSSL ; \
root's avatar
root committed
364
		SSLCERTDIR=$(SSLCERTDIR); export SSLCERTDIR ; \
365
366
		PIDDIR=$(PIDDIR); export PIDDIR; \
		SPOOLDIR=$(SPOOLDIR); export SPOOLDIR; \
root's avatar
root committed
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
		$(PERL) ../../../subst.pl $$cfile \
	) ;\
	chown $(USER) $(DESTDIR)$(CONFDIR)/$$cfile; \
	chgrp $(GROUP) $(DESTDIR)$(CONFDIR)/$$cfile; \
	fi \
	done

build_rh_rpm: clean
	@echo "Building RedHat RPM in $(RPMTOPDIR) ..."
	@( \
		cd src/etc/script/ ; \
		PERL=$(PERL); export PERL; \
		UMASK=0600; export UMASK; \
		INSTALLDIR=$(RPMTOPDIR)/SPECS; export INSTALLDIR; \
		SUFFIX=''; export SUFFIX; \
		ZIPEXT='gz'; export ZIPEXT; \
		APPGROUP='System Environment/Daemons'; export APPGROUP; \
384
385
		HOMEDIR='/var/sympa'; export HOMEDIR; \
		ICONSDIR='/var/www/icons'; export ICONSDIR; \
386
		PIDDIR='/var/run/sympa'; export PIDDIR; \
root's avatar
root committed
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
		VERSION=$(SYMPA_VERSION); export VERSION; \
		$(PERL) ../../../subst.pl sympa.spec \
	)
	@( \
		cd ..; \
		tar -cvf $(RPMTOPDIR)/SOURCES/sympa-$(SYMPA_VERSION).tar sympa-$(SYMPA_VERSION); \
		gzip $(RPMTOPDIR)/SOURCES/sympa-$(SYMPA_VERSION).tar; \
	)
	rpm -ba $(RPMTOPDIR)/SPECS/sympa.spec

build_mdk_rpm: clean
	@echo "Building Mandrake RPM in $(RPMTOPDIR) ..."
	@( \
		cd src/etc/script/ ; \
		PERL=$(PERL); export PERL; \
		UMASK=0600; export UMASK; \
		INSTALLDIR=$(RPMTOPDIR)/SPECS; export INSTALLDIR; \
		SUFFIX='mdk'; export SUFFIX; \
		ZIPEXT='bz2'; export ZIPEXT; \
		APPGROUP='System/Servers'; export APPGROUP; \
		HOMEDIR='/var/lib/sympa'; export HOMEDIR; \
408
		PIDDIR='/var/run/sympa'; export PIDDIR; \
aumont's avatar
aumont committed
409
		ICONSDIR='/var/www/icons'; export ICONSDIR; \
root's avatar
root committed
410
411
412
413
414
415
416
417
418
419
		VERSION=$(SYMPA_VERSION); export VERSION; \
		$(PERL) ../../../subst.pl sympa.spec \
	)
	@( \
		cd ..; \
		tar -cvf $(RPMTOPDIR)/SOURCES/sympa-$(SYMPA_VERSION).tar sympa-$(SYMPA_VERSION); \
		bzip2 $(RPMTOPDIR)/SOURCES/sympa-$(SYMPA_VERSION).tar; \
	)
	rpm -ba $(RPMTOPDIR)/SPECS/sympa.spec

salaun's avatar
salaun committed
420
421
tag:	ChangeLog
	@if [ ! $(NEW_VERSION) ]; then \
salaun's avatar
salaun committed
422
	echo "Current version is $(VERSION)"; \
salaun's avatar
salaun committed
423
	echo "You need to define NEW_VERSION"; \
salaun's avatar
salaun committed
424
	else echo $(NEW_VERSION) > .version; cvs ci -m 'preparing $(NEW_VERSION)' .version ChangeLog; cvs tag -F `echo sympa-$(NEW_VERSION)|sed 's/\./_/g'`; \
salaun's avatar
salaun committed
425
	fi