3 %bcond_without tests # do not perform "make test"
7 Summary: Mail::SRS - Perl implementation of SRS
8 Summary(pl.UTF-8): Mail::SRS - perlowa implementacja SRS
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.anarres.org/projects/srs/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 1440999563a7b25d5fb03204b03e1060
18 URL: http://www.anarres.org/projects/srs/
19 BuildRequires: perl-DB_File
20 BuildRequires: perl-Digest-HMAC
21 BuildRequires: perl-MLDBM
22 BuildRequires: perl-devel >= 1:5.8.0
23 BuildRequires: rpm-perlprov >= 4.1-13
24 BuildRequires: rpmbuild(macros) >= 1.268
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This module implements a library to rewrite sender addresses according
30 to the SRS rewriting scheme, to let forwarders work in a
31 sender-authenticated SMTP world.
33 %description -l pl.UTF-8
34 Ten moduł jest implementacją biblioteki przepisującej adresy nadawcy
35 zgodnie ze schematem przepisywania SRS, aby pozwolić przekazującym
36 działać w świecie z SMTP z uwierzytelnieniem nadawcy.
39 Summary: SRS address rewriting daemon
40 Summary(pl.UTF-8): Demon przepisujący adresy SRS
41 Group: Networking/Daemons
42 Requires(post): /usr/bin/perl
43 Requires(post,preun): /sbin/chkconfig
44 Requires: %{name} = %{version}-%{release}
48 SRS address rewriting daemon, operating as a local process on
51 %description -n srsd -l pl.UTF-8
52 Demon przepisujący adresy SRS, działający jako lokalny proces na
56 %setup -q -n %{pdir}-%{pnam}-%{version}
59 (echo y; echo y) | %{__perl} Makefile.PL \
63 %{?with_tests:%{__make} test}
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
70 DESTDIR=$RPM_BUILD_ROOT
72 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/srsd
73 touch $RPM_BUILD_ROOT%{_sysconfdir}/srsd.secret
74 touch $RPM_BUILD_ROOT%{_sysconfdir}/srsd.secret.1
77 rm -rf $RPM_BUILD_ROOT
80 if [ ! -f %{_sysconfdir}/srsd.secret ] ; then
81 echo "Generating SRS secret..."
83 perl -e 'open R,"/dev/urandom"; read R,$r,16;
84 printf "%02x",ord(chop $r) while($r);' > %{_sysconfdir}/srsd.secret
86 /sbin/chkconfig --add srsd
87 %service srsd restart "SRS daemon"
90 if [ "$1" = "0" ]; then
92 /sbin/chkconfig --del srsd
96 %defattr(644,root,root,755)
97 %doc README.pobox eg TODO README
98 %attr(755,root,root) %{_bindir}/srs
99 %dir %{perl_vendorlib}/Mail/SRS
100 %{perl_vendorlib}/Mail/SRS/*.pm
101 %{perl_vendorlib}/Mail/SRS.pm
106 %defattr(644,root,root,755)
107 %attr(755,root,root) %{_bindir}/srsd
108 %attr(754,root,root) /etc/rc.d/init.d/srsd
109 %attr(600,root,root) %ghost %{_sysconfdir}/srsd.secret
110 %attr(600,root,root) %ghost %{_sysconfdir}/srsd.secret.1