]> git.pld-linux.org Git - packages/perl-Mail-SRS.git/blob - perl-Mail-SRS.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Mail-SRS.git] / perl-Mail-SRS.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 #
5 %define         pdir    Mail
6 %define         pnam    SRS
7 Summary:        Mail::SRS - Perl implementation of SRS
8 Summary(pl.UTF-8):      Mail::SRS - perlowa implementacja SRS
9 Name:           perl-Mail-SRS
10 Version:        0.31
11 Release:        3
12 # same as perl
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
17 Source1:        srsd.init
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
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
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.
32
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.
37
38 %package -n srsd
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}
45 Requires:       rc-scripts
46
47 %description -n srsd
48 SRS address rewriting daemon, operating as a local process on
49 UNIX-domain sockets.
50
51 %description -n srsd -l pl.UTF-8
52 Demon przepisujący adresy SRS, działający jako lokalny proces na
53 gniazdach uniksowych.
54
55 %prep
56 %setup -q -n %{pdir}-%{pnam}-%{version}
57
58 %build
59 (echo y; echo y) | %{__perl} Makefile.PL \
60         INSTALLDIRS=vendor
61 %{__make}
62
63 %{?with_tests:%{__make} test}
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
68
69 %{__make} install \
70         DESTDIR=$RPM_BUILD_ROOT
71
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
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %post -n srsd
80 if [ ! -f %{_sysconfdir}/srsd.secret ] ; then
81         echo "Generating SRS secret..."
82         umask 066
83         perl -e 'open R,"/dev/urandom"; read R,$r,16;
84                 printf "%02x",ord(chop $r) while($r);' > %{_sysconfdir}/srsd.secret
85 fi
86 /sbin/chkconfig --add srsd
87 %service srsd restart "SRS daemon"
88
89 %preun -n srsd
90 if [ "$1" = "0" ]; then
91         %service srsd stop
92         /sbin/chkconfig --del srsd
93 fi
94
95 %files
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
102 %{_mandir}/man1/*
103 %{_mandir}/man3/*
104
105 %files -n srsd
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
This page took 0.066987 seconds and 4 git commands to generate.