]> git.pld-linux.org Git - packages/perl-Mail-SRS.git/blob - perl-Mail-SRS.spec
1bd0af744c3e63bac04a8602f9e2d86622e6415d
[packages/perl-Mail-SRS.git] / perl-Mail-SRS.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 #
5 %include        /usr/lib/rpm/macros.perl
6 %define pdir    Mail
7 %define pnam    SRS
8 Summary:        Mail::SRS - Perl implementation of SRS
9 Summary(pl):    Mail::SRS - perlowa implementacja SRS
10 Name:           perl-Mail-SRS
11 Version:        0.30
12 Release:        0.1
13 # Same as perl
14 License:        GPL/Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://www.anarres.org/projects/srs/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5:  042c49598e0a71b8dfeb78d9e642e032
18 Source1:        srsd.init
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
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
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.
33
34 %description -l pl
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.
38
39 %package -n srsd
40 Summary:        SRS address rewriting daemon
41 Summary(pl):    Demon przepisuj±cy adresy SRS
42 Group:          Networking/Daemons
43 Requires:       %{name} = %{version}-%{release}
44
45 %description -n srsd
46 SRS address rewriting daemon, operating as a local process on
47 UNIX-domain sockets.
48
49 %description -n srsd -l pl
50 Demon przepisuj±cy adresy SRS, dzia³aj±cy jako lokalny proces na
51 gniazdach uniksowych.
52
53 %prep
54 %setup -q -n %{pdir}-%{pnam}-%{version}
55
56 %build
57 (echo y; echo y) | %{__perl} Makefile.PL \
58         INSTALLDIRS=vendor
59 %{__make}
60
61 %{?with_tests:%{__make} test}
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
66
67 %{__make} install \
68         DESTDIR=$RPM_BUILD_ROOT
69
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
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %post -n srsd
78 if [ ! -f /etc/srsd.secret ] ; then
79         echo "Generating SRS secret..."
80         umask 066
81         perl -e 'open R,"/dev/urandom"; read R,$r,16;
82                  printf "%02x",ord(chop $r) while($r);' > /etc/srsd.secret
83 fi
84 /sbin/chkconfig --add srsd
85 umask 137
86 if [ -f /var/lock/subsys/srsd ]; then
87         /etc/rc.d/init.d/srsd restart 1>&2
88 else
89         echo "Run \"/etc/rc.d/init.d/srsd start\" to start SRS daemon."
90 fi
91
92  
93 %preun -n srsd
94 if [ "$1" = "0" ]; then
95         if [ -f /var/lock/subsys/srsd ]; then
96                 /etc/rc.d/init.d/srsd stop 1>&2
97         fi
98         /sbin/chkconfig --del srsd
99 fi
100
101 %files
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
108 %{_mandir}/man1/*
109 %{_mandir}/man3/*
110
111 %files -n srsd
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
This page took 0.051069 seconds and 2 git commands to generate.