premier commit

tags/0.1.1
Daniel Berteaud 13 years ago
commit 468ec6b575
  1. 12
      createlinks
  2. 59
      ipasserelle-listes.spec
  3. 47
      root/etc/e-smith/events/actions/ipasserelle-mailman-init-domain
  4. 1
      root/etc/e-smith/templates/usr/lib/mailman/Mailman/mm_cfg.py/15Language
  5. 18
      root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/060mailman
  6. 7
      root/var/service/mailman/qrunner
  7. 3
      root/var/service/mailman/run

@ -0,0 +1,12 @@
#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/mailman');
safe_symlink("/var/service/mailman" , 'root/service/mailman');
safe_touch("root/var/service/mailman/down");
foreach my $event (qw/webapps-update ipasserelle-update bootstrap-ldap-save/){
event_link("ipasserelle-mailman-init-domain", "$event", "55");
}

@ -0,0 +1,59 @@
%define version 0.1.1
%define release 1
%define name ipasserelle-listes
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
Summary: iPasserelle mailing list module
Group: System Environment/Applications
License: GPLv3+
URL: http://www.ipasserelle.com
Source0: %{name}-%{version}.tar.gz
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch
BuildRequires: e-smith-devtools
Requires: ipasserelle-base
Requires: smeserver-mailman
%description
iPasserelle module for the mailing list service
Uses smeserver-mailman
%changelog
* Sat Jun 9 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.1.1-1.sme
- Build for noarch
- Migrate to GIT
* Thu Sep 12 2011 Daniel Berteaud <daniel@firewall-services.com> - 0.1-1.sme
- Initial release
%prep
%setup -q
%build
perl ./createlinks
%install
rm -rf $RPM_BUILD_ROOT
rm -f %{name}-%{version}-filelist
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
/sbin/e-smith/genfilelist \
--file /var/service/mailman/qrunner 'attr(0755,root,root)' \
--file /var/service/mailman/run 'attr(0755,root,root)' \
$RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist
echo "%doc CHANGELOG.git" >> %{name}-%{version}-%{release}-filelist
%files -f %{name}-%{version}-%{release}-filelist
%clean
rm -rf $RPM_BUILD_ROOT
%post
%postun

@ -0,0 +1,47 @@
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# copyright (C) 2010-2011 Firewall-Services
# daniel@firewall-services.com
#
# 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
#
#----------------------------------------------------------------------
use strict;
use warnings;
use esmith::DomainsDB;
use esmith::ConfigDB;
my $d = esmith::DomainsDB->open or die "Couldn't open DomainsDB\n";
my $c = esmith::ConfigDB->open_ro() or die "Couldn't open ConfigDB\n";
my $domain = $c->get('DomainName')->value;
my $vhost;
$vhost = $d->get("listes.$domain");
if (!$vhost){
$d->new_record("listes.$domain",{
type => 'domain',
Content => 'Primary',
Description => "Mailinglist",
Nameservers => 'internet',
});
unless ( system("/sbin/e-smith/signal-event", "domain-create", "listes.$domain") == 0 ){
die "Failed to create domain listes.$domain\n";
}
}

@ -0,0 +1 @@
DEFAULT_SERVER_LANGUAGE = '{$mailman{'Language'} || 'fr'}'

@ -0,0 +1,18 @@
{
$conf->{'applicationList'}->{'010apps'}->{'mailman'} = {
'options' => {
'logo' => 'mailappt.png',
'name' => 'Mailman',
'description' => 'Liste de diffusion',
'uri' => "http://listes.$domain/mailman",
'display' => 'on'
},
'type' => 'application'
} unless ($conf->{'applicationList'}->{'010apps'}->{'mailman'});
$OUT = '';
}

@ -0,0 +1,7 @@
#!/bin/sh
while `/bin/true`; do
/usr/lib/mailman/bin/qrunner --runner=All --once
sleep 10
done

@ -0,0 +1,3 @@
#!/bin/sh
exec setuidgid mailman ./qrunner
Loading…
Cancel
Save