summaryrefslogtreecommitdiff
path: root/masqmail.spec
blob: 8222c808d37fe5312aa1192d2721ae574617b55c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Summary:	An offline mail server with pop3 client support
Summary(pl.UTF-8):	Serwer pocztowy offline ze wsparciem dla pop3
Name:		masqmail
Version:	0.2.21
Release:	2
License:	GPL
Group:		Networking/Daemons
Source0:	http://ftp.debian.org/debian/pool/main/m/masqmail/%{name}_%{version}.orig.tar.gz
# Source0-md5:	7e989a8b0562054aea22c654507f2cb5
Source1:	%{name}.aliases
Source2:	%{name}.conf
Source3:	%{name}.default.route
Patch0:		%{name}-resolv.patch
URL:		http://packages.debian.org/masqmail
BuildRequires:	autoconf >= 2.59
BuildRequires:	automake
BuildRequires:	glib2-devel
BuildRequires:	libident-devel
BuildRequires:	openssl-devel
Provides:	smtpdaemon
Obsoletes:	smtpdaemon
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%define		specflags_ia32	 -fomit-frame-pointer
%define		_sysconfdir		/etc/mail

%description
MasqMail is a mail server designed for hosts that do not have a
permanent internet connection eg. a home network or a single host at
home. It has special support for connections to different ISPs. It
replaces sendmail or other MTAs such as qmail or exim.

%description -l pl.UTF-8
MasqMail jest serwerem pocztowym zaprojektowanym dla maszyn nie
posiadających stałego dostępu do Internetu, jak domowe sieci czy
pojedyncze komputery domowe. Wspiera połączenia z różnymi ISP.
Zastępuje sendmaila oraz inne MTA jak qmail czy exim.

%prep
%setup -q
%patch0 -p1

%build
%{__aclocal}
%{__autoconf}
%{__autoheader}
%{__automake}
%configure \
	--%{!?debug:dis}%{?debug:en}able-debug \
	--with-confdir=%{_sysconfdir} \
	--enable-auth \
	--enable-maildir \
	--enable-ident \
	--enable-mserver \
	--with-libcrypto \
	--with-user=mail \
	--with-group=mail \
	--with-logdir=/var/log \
	--with-spooldir=/var/spool/masqmail
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},/usr/lib} \
	$RPM_BUILD_ROOT{%{_sbindir},%{_datadir}/masqmail/tpl,%{_mandir}/man{5,8}} \
	$RPM_BUILD_ROOT/var/spool/masqmail/{input,lock,popuidl}

install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/default.route
install src/mservdetect $RPM_BUILD_ROOT%{_bindir}
install src/masqmail $RPM_BUILD_ROOT%{_sbindir}
install tpl/* $RPM_BUILD_ROOT%{_datadir}/masqmail/tpl
install docs/man/masqmail.*.5 $RPM_BUILD_ROOT%{_mandir}/man5
install docs/man/masqmail.8 $RPM_BUILD_ROOT%{_mandir}/man8
install debian/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
install debian/newaliases $RPM_BUILD_ROOT%{_bindir}
ln -sf ../sbin/masqmail $RPM_BUILD_ROOT%{_bindir}/mailq
ln -sf ../sbin/masqmail $RPM_BUILD_ROOT/usr/lib/sendmail
ln -sf masqmail $RPM_BUILD_ROOT%{_sbindir}/sendmail

%triggerpostun -- %{name} < 0.2.20-4.1
if [ -f /etc/masqmail/masqmail.conf.rpmsave ]; then
	cp -f  %{_sysconfdir}/masqmail.conf{,.rpmnew}
	mv -f /etc/masqmail/masqmail.conf.rpmsave %{_sysconfdir}/masqmail.conf
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README TODO examples/example.*
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) /usr/lib/sendmail
%attr(4755,root,root) %{_sbindir}/masqmail
%attr(755,root,root) %{_sbindir}/sendmail
%dir %{_sysconfdir}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/masqmail.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/default.route
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/aliases
%dir %{_datadir}/masqmail
%dir %{_datadir}/masqmail/tpl
%{_datadir}/masqmail/tpl/*.tpl
%lang(de) %{_datadir}/masqmail/tpl/*.tpl.de
%lang(fr) %{_datadir}/masqmail/tpl/*.tpl.fr
%lang(it) %{_datadir}/masqmail/tpl/*.tpl.it
%{_mandir}/man[58]/*
%defattr(644,mail,mail,755)
%dir /var/spool/masqmail
%dir /var/spool/masqmail/input
%dir /var/spool/masqmail/lock
%dir /var/spool/masqmail/popuidl