3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
8 Summary: Mail::SRS - Perl implementation of SRS
9 Summary(pl): Mail::SRS - perlowa implementacja SRS
15 Group: Development/Languages/Perl
16 Source0: http://www.anarres.org/projects/srs/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5: 042c49598e0a71b8dfeb78d9e642e032
19 URL: http://www.anarres.org/projects/srs/
20 BuildRequires: perl-DB_File
21 BuildRequires: perl-Digest-HMAC
22 BuildRequires: perl-MLDBM
23 BuildRequires: perl-Storable
24 BuildRequires: perl-devel >= 1:5.8.0
25 BuildRequires: rpm-perlprov >= 4.1-13
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This module implements a library to rewrite sender addresses according
31 to the SRS rewriting scheme, to let forwarders work in a
32 sender-authenticated SMTP world.
35 Ten modu³ jest implementacj± biblioteki przepisuj±cej adresy nadawcy
36 zgodnie ze schematem przepisywania SRS, aby pozwoliæ przekazuj±cym
37 dzia³aæ w ¶wiecie z SMTP z uwierzytelnieniem nadawcy.
40 Summary: SRS address rewriting daemon
41 Summary(pl): Demon przepisuj±cy adresy SRS
42 Group: Networking/Daemons
43 Requires: %{name} = %{version}-%{release}
46 SRS address rewriting daemon, operating as a local process on
49 %description -n srsd -l pl
50 Demon przepisuj±cy adresy SRS, dzia³aj±cy jako lokalny proces na
54 %setup -q -n %{pdir}-%{pnam}-%{version}
57 (echo y; echo y) | %{__perl} Makefile.PL \
61 %{?with_tests:%{__make} test}
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
68 DESTDIR=$RPM_BUILD_ROOT
70 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/srsd
71 touch $RPM_BUILD_ROOT/%{_sysconfdir}/srsd.secret
72 touch $RPM_BUILD_ROOT/%{_sysconfdir}/srsd.secret.1
75 rm -rf $RPM_BUILD_ROOT
78 if [ ! -f /etc/srsd.secret ] ; then
79 echo "Generating SRS secret..."
81 perl -e 'open R,"/dev/urandom"; read R,$r,16;
82 printf "%02x",ord(chop $r) while($r);' > /etc/srsd.secret
84 /sbin/chkconfig --add srsd
86 if [ -f /var/lock/subsys/srsd ]; then
87 /etc/rc.d/init.d/srsd restart 1>&2
89 echo "Run \"/etc/rc.d/init.d/srsd start\" to start SRS daemon."
94 if [ "$1" = "0" ]; then
95 if [ -f /var/lock/subsys/srsd ]; then
96 /etc/rc.d/init.d/srsd stop 1>&2
98 /sbin/chkconfig --del srsd
102 %defattr(644,root,root,755)
103 %doc README.pobox eg TODO README
104 %attr(755,root,root) %{_bindir}/srs
105 %dir %{perl_vendorlib}/Mail/SRS
106 %{perl_vendorlib}/Mail/SRS/*.pm
107 %{perl_vendorlib}/Mail/SRS.pm
112 %defattr(644,root,root,755)
113 %attr(755,root,root) %{_bindir}/srsd
114 %attr(754,root,root) /etc/rc.d/init.d/srsd
115 %attr(600,root,root) %ghost %{_sysconfdir}/srsd.secret
116 %attr(600,root,root) %ghost %{_sysconfdir}/srsd.secret.1