Commit ac7f5167 authored by salaun's avatar salaun
Browse files

Changes: these changes are related to the RPM building :

	+ Add missing variables to build sympa.spec for RH
	+ require 'smtpdaemon' with RH, 'MailTransportAgent' with MDK
	+ ./configure is done at RPM build time with relevant options
	+ correct path to sympa_wizard
	+ fix problems with the %files section, when changing directories
	+ missing %changelog


git-svn-id: https://subversion.renater.fr/sympa/trunk@1826 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 8757013a
......@@ -159,6 +159,8 @@ CONFIG = $(CONFDIR)/sympa.conf
WWSCONFIG = $(CONFDIR)/wwsympa.conf
ETCBINDIR = @DATADIR@
main_SRC = AUTHORS COPYING ChangeLog INSTALL KNOWNBUGS NEWS README
#ifeq ($(shell uname), Linux)
# LOG_SOCKET_TYPE="inet"
#else
......@@ -401,10 +403,27 @@ build_rh_rpm: clean
SUFFIX=''; export SUFFIX; \
ZIPEXT='gz'; export ZIPEXT; \
APPGROUP='System Environment/Daemons'; export APPGROUP; \
MTA='smtpdaemon'; export MTA; \
HOMEDIR='/var/sympa'; export HOMEDIR; \
ICONSDIR='/var/www/icons'; export ICONSDIR; \
ICONSDIR='/var/www/icons/sympa'; export ICONSDIR; \
PIDDIR='/var/run/sympa'; export PIDDIR; \
VERSION=$(SYMPA_VERSION); export VERSION; \
CONFDIR='/etc'; export CONFDIR; \
SENDMAIL_ALIASES='/etc/mail/sympa_aliases'; export SENDMAIL_ALIASES; \
MAILERPROGDIR='/etc/smrsh'; export MAILERPROGDIR; \
INITDIR='/etc/rc.d/init.d'; export INITDIR; \
SPOOLDIR='/var/sympa/spool'; export SPOOLDIR; \
BINDIR='/etc/smrsh'; export BINDIR; \
SBINDIR='/var/sympa/sbin'; export SBINDIR; \
DATADIR='/usr/share/sympa'; export DATADIR; \
EXPLDIR='/var/sympa/expl'; export EXPLDIR; \
LIBDIR='/usr/lib/sympa/bin'; export LIBDIR; \
CGIDIR='/var/www/cgi-bin'; export CGIDIR; \
NLSDIR='/usr/lib/sympa/nls'; export NLSDIR; \
SCRIPTDIR='/var/sympa/bin'; export SCRIPTDIR; \
LIBEXECDIR='/var/sympa/bin'; export LIBEXECDIR; \
SAMPLEDIR='/usr/share/sympa/examples'; export SAMPLEDIR; \
ETCDIR='/etc/sympa'; export ETCDIR; \
$(PERL) ../../../subst.pl sympa.spec \
)
@( \
......@@ -412,7 +431,7 @@ build_rh_rpm: clean
tar -cvf $(RPMTOPDIR)/SOURCES/sympa-$(SYMPA_VERSION).tar sympa-$(SYMPA_VERSION); \
gzip $(RPMTOPDIR)/SOURCES/sympa-$(SYMPA_VERSION).tar; \
)
rpm -ba $(RPMTOPDIR)/SPECS/sympa.spec
rpm -ba $(RPMTOPDIR)/SPECS/sympa.spec
build_mdk_rpm: clean
@echo "Building Mandrake RPM in $(RPMTOPDIR) ..."
......@@ -424,25 +443,27 @@ build_mdk_rpm: clean
SUFFIX='mdk'; export SUFFIX; \
ZIPEXT='bz2'; export ZIPEXT; \
APPGROUP='System/Servers'; export APPGROUP; \
MTA='MailTransportAgent'; export MTA; \
HOMEDIR='/var/lib/sympa'; export HOMEDIR; \
VERSION=$(SYMPA_VERSION); export VERSION; \
CONFDIR=$(CONFDIR); export CONFDIR; \
SENDMAIL_ALIASES=$(SENDMAIL_ALIASES); export SENDMAIL_ALIASES; \
MAILERPROGDIR=$(MAILERPROGDIR); export MAILERPROGDIR; \
PIDDIR=$(PIDDIR); export PIDDIR; \
INITDIR=$(INITDIR); export INITDIR; \
SPOOLDIR=$(SPOOLDIR); export SPOOLDIR; \
ICONSDIR=$(ICONSDIR); export ICONSDIR; \
BINDIR=$(BINDIR); export BINDIR; \
SBINDIR=$(SBINDIR); export SBINDIR; \
DATADIR=$(DATADIR); export DATADIR; \
EXPLDIR=$(EXPLDIR); export EXPLDIR; \
LIBDIR=$(LIBDIR); export LIBDIR; \
CGIDIR=$(CGIDIR); export CGIDIR; \
NLSDIR=$(NLSDIR); export NLSDIR; \
SCRIPTDIR=$(SCRIPTDIR); export SCRIPTDIR; \
SAMPLEDIR=$(SAMPLEDIR); export SAMPLEDIR; \
ETCDIR=$(ETCDIR); export ETCDIR; \
CONFDIR='/etc/sympa'; export CONFDIR; \
SENDMAIL_ALIASES='/etc/mail/sympa_aliases'; export SENDMAIL_ALIASES; \
MAILERPROGDIR='/usr/lib/sympa/bin'; export MAILERPROGDIR; \
PIDDIR='/var/run/sympa'; export PIDDIR; \
INITDIR='/etc/rc.d/init.d'; export INITDIR; \
SPOOLDIR='/var/spool/sympa'; export SPOOLDIR; \
ICONSDIR='/var/www/icons/sympa'; export ICONSDIR; \
BINDIR='/usr/lib/sympa/bin'; export BINDIR; \
SBINDIR='/usr/lib/sympa/bin'; export SBINDIR; \
DATADIR='/usr/share/sympa'; export DATADIR; \
EXPLDIR='/var/lib/sympa/expl'; export EXPLDIR; \
LIBDIR='/usr/lib/sympa/bin'; export LIBDIR; \
CGIDIR='/var/www/cgi-bin'; export CGIDIR; \
NLSDIR='/usr/lib/sympa/nls'; export NLSDIR; \
SCRIPTDIR='/usr/lib/sympa/bin'; export SCRIPTDIR; \
LIBEXECDIR='/usr/lib/sympa/bin'; export LIBEXECDIR; \
SAMPLEDIR='/usr/share/sympa/examples'; export SAMPLEDIR; \
ETCDIR='/etc/sympa'; export ETCDIR; \
$(PERL) ../../../subst.pl sympa.spec \
)
@( \
......
......@@ -195,6 +195,8 @@ CONFIG = $(CONFDIR)/sympa.conf
WWSCONFIG = $(CONFDIR)/wwsympa.conf
ETCBINDIR = @DATADIR@
main_SRC = AUTHORS COPYING ChangeLog INSTALL KNOWNBUGS NEWS README
#ifeq ($(shell uname), Linux)
# LOG_SOCKET_TYPE="inet"
#else
......@@ -584,10 +586,27 @@ build_rh_rpm: clean
SUFFIX=''; export SUFFIX; \
ZIPEXT='gz'; export ZIPEXT; \
APPGROUP='System Environment/Daemons'; export APPGROUP; \
MTA='smtpdaemon'; export MTA; \
HOMEDIR='/var/sympa'; export HOMEDIR; \
ICONSDIR='/var/www/icons'; export ICONSDIR; \
ICONSDIR='/var/www/icons/sympa'; export ICONSDIR; \
PIDDIR='/var/run/sympa'; export PIDDIR; \
VERSION=$(SYMPA_VERSION); export VERSION; \
CONFDIR='/etc'; export CONFDIR; \
SENDMAIL_ALIASES='/etc/mail/sympa_aliases'; export SENDMAIL_ALIASES; \
MAILERPROGDIR='/etc/smrsh'; export MAILERPROGDIR; \
INITDIR='/etc/rc.d/init.d'; export INITDIR; \
SPOOLDIR='/var/sympa/spool'; export SPOOLDIR; \
BINDIR='/etc/smrsh'; export BINDIR; \
SBINDIR='/var/sympa/sbin'; export SBINDIR; \
DATADIR='/usr/share/sympa'; export DATADIR; \
EXPLDIR='/var/sympa/expl'; export EXPLDIR; \
LIBDIR='/usr/lib/sympa/bin'; export LIBDIR; \
CGIDIR='/var/www/cgi-bin'; export CGIDIR; \
NLSDIR='/usr/lib/sympa/nls'; export NLSDIR; \
SCRIPTDIR='/var/sympa/bin'; export SCRIPTDIR; \
LIBEXECDIR='/var/sympa/bin'; export LIBEXECDIR; \
SAMPLEDIR='/usr/share/sympa/examples'; export SAMPLEDIR; \
ETCDIR='/etc/sympa'; export ETCDIR; \
$(PERL) ../../../subst.pl sympa.spec \
)
@( \
......@@ -595,7 +614,7 @@ build_rh_rpm: clean
tar -cvf $(RPMTOPDIR)/SOURCES/sympa-$(SYMPA_VERSION).tar sympa-$(SYMPA_VERSION); \
gzip $(RPMTOPDIR)/SOURCES/sympa-$(SYMPA_VERSION).tar; \
)
rpm -ba $(RPMTOPDIR)/SPECS/sympa.spec
rpm -ba $(RPMTOPDIR)/SPECS/sympa.spec
build_mdk_rpm: clean
@echo "Building Mandrake RPM in $(RPMTOPDIR) ..."
......@@ -607,25 +626,27 @@ build_mdk_rpm: clean
SUFFIX='mdk'; export SUFFIX; \
ZIPEXT='bz2'; export ZIPEXT; \
APPGROUP='System/Servers'; export APPGROUP; \
MTA='MailTransportAgent'; export MTA; \
HOMEDIR='/var/lib/sympa'; export HOMEDIR; \
VERSION=$(SYMPA_VERSION); export VERSION; \
CONFDIR=$(CONFDIR); export CONFDIR; \
SENDMAIL_ALIASES=$(SENDMAIL_ALIASES); export SENDMAIL_ALIASES; \
MAILERPROGDIR=$(MAILERPROGDIR); export MAILERPROGDIR; \
PIDDIR=$(PIDDIR); export PIDDIR; \
INITDIR=$(INITDIR); export INITDIR; \
SPOOLDIR=$(SPOOLDIR); export SPOOLDIR; \
ICONSDIR=$(ICONSDIR); export ICONSDIR; \
BINDIR=$(BINDIR); export BINDIR; \
SBINDIR=$(SBINDIR); export SBINDIR; \
DATADIR=$(DATADIR); export DATADIR; \
EXPLDIR=$(EXPLDIR); export EXPLDIR; \
LIBDIR=$(LIBDIR); export LIBDIR; \
CGIDIR=$(CGIDIR); export CGIDIR; \
NLSDIR=$(NLSDIR); export NLSDIR; \
SCRIPTDIR=$(SCRIPTDIR); export SCRIPTDIR; \
SAMPLEDIR=$(SAMPLEDIR); export SAMPLEDIR; \
ETCDIR=$(ETCDIR); export ETCDIR; \
CONFDIR='/etc/sympa'; export CONFDIR; \
SENDMAIL_ALIASES='/etc/mail/sympa_aliases'; export SENDMAIL_ALIASES; \
MAILERPROGDIR='/usr/lib/sympa/bin'; export MAILERPROGDIR; \
PIDDIR='/var/run/sympa'; export PIDDIR; \
INITDIR='/etc/rc.d/init.d'; export INITDIR; \
SPOOLDIR='/var/spool/sympa'; export SPOOLDIR; \
ICONSDIR='/var/www/icons/sympa'; export ICONSDIR; \
BINDIR='/usr/lib/sympa/bin'; export BINDIR; \
SBINDIR='/usr/lib/sympa/bin'; export SBINDIR; \
DATADIR='/usr/share/sympa'; export DATADIR; \
EXPLDIR='/var/lib/sympa/expl'; export EXPLDIR; \
LIBDIR='/usr/lib/sympa/bin'; export LIBDIR; \
CGIDIR='/var/www/cgi-bin'; export CGIDIR; \
NLSDIR='/usr/lib/sympa/nls'; export NLSDIR; \
SCRIPTDIR='/usr/lib/sympa/bin'; export SCRIPTDIR; \
LIBEXECDIR='/usr/lib/sympa/bin'; export LIBEXECDIR; \
SAMPLEDIR='/usr/share/sympa/examples'; export SAMPLEDIR; \
ETCDIR='/etc/sympa'; export ETCDIR; \
$(PERL) ../../../subst.pl sympa.spec \
)
@( \
......
......@@ -16,7 +16,7 @@ Copyright: GPL
Group: --APPGROUP--
Source: http://www.sympa.org/distribution/%{name}-%{version}.tar.--ZIPEXT--
URL: http://www.sympa.org/
Requires: MailTransportAgent
Requires: --MTA--
Requires: perl >= 0:5.005
Requires: perl-MailTools >= 1.14
Requires: perl-MIME-Base64 >= 1.0
......@@ -68,12 +68,30 @@ rm -rf $RPM_BUILD_ROOT
%build
make sources languages CONFDIR=%{conf_s}
./configure \
--prefix=--HOMEDIR-- \
--with-confdir=--CONFDIR-- \
--with-etcdir=--ETCDIR-- \
--with-cgidir=--CGIDIR-- \
--with-iconsdir=--ICONSDIR-- \
--with-bindir=--BINDIR-- \
--with-sbindir=--SBINDIR-- \
--with-mandir=%{_mandir} \
--with-libexecdir=--SCRIPTDIR-- \
--with-libdir=--LIBDIR-- \
--with-datadir=--DATADIR-- \
--with-expldir=--EXPLDIR-- \
--with-piddir=--PIDDIR-- \
--with-nlsdir=--NLSDIR-- \
--with-scriptdir=--SCRIPTDIR-- \
--with-sampledir=--SAMPLEDIR-- \
--with-spooldir=--SPOOLDIR-- \
;make sources languages
%install
rm -rf $RPM_BUILD_ROOT
make INITDIR=--INITDIR-- HOST=MYHOST DIR=%{home_s} EXPL_DIR=--EXPLDIR-- PIDDIR=--PIDDIR-- BINDIR=--BINDIR-- SBINDIR=--SBINDIR-- LIBDIR=--LIBDIR-- MAILERPROGDIR=--BINDIR-- ETCDIR=--ETCDIR-- ETCBINDIR=%{data_s} DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} ICONSDIR=--ICONSDIR-- CGIDIR=--CGIDIR-- CONFDIR=--CONFDIR-- NLSDIR=--NLSDIR-- SCRIPTDIR=--SCRIPTDIR-- SAMPLEDIR=--SAMPLEDIR-- SPOOLDIR=%{spoo_s} install
make HOST=MYHOST DESTDIR=$RPM_BUILD_ROOT install
# Create bounce and archive directories
for dir in bounce wwsarchives wwsbounce ; do
......@@ -214,8 +232,8 @@ chmod 0640 /etc/mail/sympa_aliases
# reset the default cookie
typeset -x secret
secret=`perl -e "print int(rand(time))"`
perl -pi -e "s|'cookie',\n|'cookie',|" --BINDIR--/sympa_wizard.pl
perl -pi -e "s|'cookie',.*\n|'cookie', 'default' => '${secret}',\n|" --BINDIR--/sympa_wizard.pl
perl -pi -e "s|'cookie',\n|'cookie',|" --SBINDIR--/sympa_wizard.pl
perl -pi -e "s|'cookie',.*\n|'cookie', 'default' => '${secret}',\n|" --SBINDIR--/sympa_wizard.pl
%postun
......@@ -261,17 +279,16 @@ done
# Documentation
%doc %attr(-,root,root) INSTALL README AUTHORS COPYING NEWS ChangeLog
# A VOIR %doc %attr(-,root,root) INSTALL LICENSE README RELEASE_NOTES
%doc %attr(-,root,root) doc/sympa.tex doc/sympa.ps doc/sympa.pdf
%doc %attr(-,root,root) doc/sympa/*
%doc %attr(-,root,root) doc/html/
%attr(-,root,root) %{_mandir}/man8/*
# Spools
%dir %{spoo_s}
%dir %{spoo_s}/msg
%dir %{spoo_s}/bounce
%dir %{spoo_s}/wwsarchives
%dir %{spoo_s}/wwsbounce
#%dir %{spoo_s}/wwsarchives
#%dir %{spoo_s}/wwsbounce
%dir %{spoo_s}/digest
%dir %{spoo_s}/moderation
%dir %{spoo_s}/expire
......@@ -280,71 +297,73 @@ done
%dir %{spoo_s}/tmp
%dir %{spoo_s}/task
# PID directory
#%dir --PIDDIR--
# Config file
%dir %{conf_s}
#%dir %{conf_s}
%config(noreplace) %attr(0640,sympa,sympa) %{conf_s}/sympa.conf
%config(noreplace) %attr(0640,sympa,sympa) %{conf_s}/wwsympa.conf
# Config directories populated by the user
%dir %{etc_s}/create_list_templates
%dir %{etc_s}/scenari
%dir %{etc_s}/templates
%dir %{etc_s}/wws_templates
%dir %{etc_s}/general_task_models
%dir %{etc_s}/task_models
#%dir %{etc_s}/create_list_templates
#%dir %{etc_s}/scenari
#%dir %{etc_s}/templates
#%dir %{etc_s}/wws_templates
#%dir %{etc_s}/general_task_models
#%dir %{etc_s}/task_models
# Binaries
# We use a configure where BINDIR = SBINDIR = LIBDIR = LIBEXECDIR
# aliaswrapper is owned by root, don't change it
%dir --BINDIR--
#%dir --BINDIR--
%attr(-,-,-) --BINDIR--/*
--SBINDIR--/*
--LIBDIR--/*
--LIBEXECDIR--/*
# Locales
%dir --NLSDIR--
--NLSDIR--/*.cat
#%dir --NLSDIR--
--NLSDIR--/
# ATTENTION A VOIR %{_libdir}/sympa/nls/*.msg
# Data
%dir %{data_s}
%{data_s}/ca-bundle.crt
%{data_s}/create_list.conf
%{data_s}/edit_list.conf
%{data_s}/mhonarc-ressources
%{data_s}/list_aliases.tpl
%dir %{data_s}/create_list_templates
%{data_s}/create_list_templates/*
%dir %{data_s}/scenari
%{data_s}/scenari/*
%dir %{data_s}/templates
%{data_s}/templates/*
%dir %{data_s}/wws_templates
%{data_s}/wws_templates/*
%dir %{data_s}/list_task_models
%{data_s}/list_task_models/*
%dir %{data_s}/global_task_models
%{data_s}/global_task_models/*
%{data_s}/
#%dir %{data_s}
#%{data_s}/ca-bundle.crt
#%{data_s}/create_list.conf
#%{data_s}/edit_list.conf
#%{data_s}/mhonarc-ressources
#%{data_s}/list_aliases.tpl
#%dir %{data_s}/create_list_templates
#%{data_s}/create_list_templates/*
#%dir %{data_s}/scenari
#%{data_s}/scenari/*
#%dir %{data_s}/templates
#%{data_s}/templates/*
#%dir %{data_s}/wws_templates
#%{data_s}/wws_templates/*
#%dir %{data_s}/list_task_models
#%{data_s}/list_task_models/*
#%dir %{data_s}/global_task_models
#%{data_s}/global_task_models/*
# Icons and binaries for Apache
--CGIDIR--/wwsympa.fcgi
%dir --ICONSDIR--
--ICONSDIR--/*
--ICONSDIR--/
# Init scripts
%config(noreplace) %attr(0755,root,root) --INITDIR--/sympa
# Examples
%dir --SAMPLEDIR--
--SAMPLEDIR--/*
#%dir --SAMPLEDIR--/sample-list
#--SAMPLEDIR--/sample-list/*
#%dir --SAMPLEDIR--
--SAMPLEDIR--/
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Feb 17 2003 Guy Paressant - Academie de Nantes - <net@ac-nantes.fr> 3.4.3.1-8
- Rebuilt for 3.4.3.1
- Adding doc and sample
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment