]> git.pld-linux.org Git - packages/opendkim.git/blob - opendkim.spec
PLDize; default configs; init script; rel 0.2 (wip)
[packages/opendkim.git] / opendkim.spec
1 Summary:        A DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail
2 Name:           opendkim
3 Version:        2.10.3
4 Release:        0.2
5 License:        BSD and Sendmail
6 Group:          Daemons
7 Source0:        http://downloads.sourceforge.net/opendkim/%{name}-%{version}.tar.gz
8 Source1:        %{name}.conf
9 Source2:        %{name}.sysconfig
10 Source3:        %{name}.init
11 Source4:        signing.table
12 Source5:        key.table
13 Source6:        trusted.hosts
14 # Source0-md5:  916e691cdd16cfabd1cd6efe745323f9
15 URL:            http://opendkim.org/
16 BuildRequires:  db-devel
17 BuildRequires:  libbsd-devel
18 BuildRequires:  libmemcached-devel
19 BuildRequires:  libmilter-devel
20 BuildRequires:  openssl-devel
21 BuildRequires:  pkgconfig
22 BuildRequires:  unbound-devel
23 Requires:       %{name}-libs = %{version}-%{release}
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define no_install_post_check_tmpfiles 1
27
28 %description
29 OpenDKIM allows signing and/or verification of email through an open
30 source library that implements the DKIM service, plus a milter-based
31 filter application that can plug in to any milter-aware MTA, including
32 sendmail, Postfix, or any other MTA that supports the milter protocol.
33
34 %package libs
35 Summary:        An open source DKIM library
36 Group:          Libraries
37
38 %description libs
39 This package contains the library files required for running services
40 built using libopendkim.
41
42 %package libs-devel
43 Summary:        Development files for libopendkim
44 Group:          Development/Libraries
45 Requires:       %{name}-libs = %{version}-%{release}
46
47 %description libs-devel
48 This package contains the static libraries, headers, and other support
49 files required for developing applications against libopendkim.
50
51 %prep
52 %setup -q
53
54 %build
55 %configure \
56         --with-unbound \
57         --with-libmemcached \
58         --with-db \
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 %{__make} install \
63         DESTDIR=$RPM_BUILD_ROOT
64
65 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,%{name}/keys}
66 install -d $RPM_BUILD_ROOT%{_initrddir}
67 install -d $RPM_BUILD_ROOT%{systemdunitdir}
68 install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/%{name}
69 install -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
70 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
71 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/%{name}
72 cp -p %{SOURCE1} %{SOURCE4} %{SOURCE5} %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
73 #cp -p contrib/systemd/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
74 cp -p contrib/init/redhat/%{name}-default-keygen $RPM_BUILD_ROOT%{_sbindir}/%{name}-default-keygen
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %pre
80 %groupadd -g 322 -r %{name}
81 %useradd -r -u 322 -d /usr/share/empty -s /bin/false -c "OpenDKIM User" -g %{name} %{name}
82 # MTA group in general?
83 #%addusertogroup %{name} postfix
84
85 %preun
86 if [ "$1" = "0" ];then
87         %service %{name} stop
88         /sbin/chkconfig --del %{name}
89 fi
90 %systemd_preun %{name}.service
91
92 %postun
93 if [ "$1" = "0" ]; then
94         %userremove %{name}
95         %groupremove %{name}
96 fi
97 %systemd_reload
98
99 %files
100 %defattr(644,root,root,755)
101 %doc FEATURES KNOWNBUGS LICENSE LICENSE.Sendmail RELEASE_NOTES RELEASE_NOTES.Sendmail INSTALL
102 %doc contrib/convert/convert_keylist.sh %{name}/*.sample
103 %doc %{name}/%{name}.conf.simple-verify %{name}/%{name}.conf.simple
104 %doc %{name}/README
105 %attr(754,root,root) /etc/rc.d/init.d/%{name}
106 %config(noreplace) %attr(640,%{name},%{name}) %{_sysconfdir}/%{name}/%{name}.conf
107 %config(noreplace) %attr(640,%{name},%{name}) %{_sysconfdir}/%{name}/signing.table
108 %config(noreplace) %attr(640,%{name},%{name}) %{_sysconfdir}/%{name}/key.table
109 %config(noreplace) %attr(640,%{name},%{name}) %{_sysconfdir}/%{name}/trusted.hosts
110 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
111 %dir %attr(700,%{name},%{name}) %{_sysconfdir}/%{name}/keys
112 %attr(755,root,root) %{_sbindir}/%{name}*
113 %{_mandir}/man*/*
114 %dir %attr(-,%{name},%{name}) %{_localstatedir}/spool/%{name}
115 %dir %attr(770,root,%{name}) %{_localstatedir}/run/%{name}
116 %dir %attr(-,root,%{name}) %{_sysconfdir}/%{name}
117 #%{systemdunitdir}/%{name}.service
118
119 %files libs
120 %defattr(644,root,root,755)
121 %doc LICENSE LICENSE.Sendmail README
122 %{_libdir}/libopendkim.so.*
123
124 %files libs-devel
125 %defattr(644,root,root,755)
126 %doc LICENSE LICENSE.Sendmail
127 %doc libopendkim/docs/*.html
128 %{_includedir}/%{name}
129 %{_libdir}/*.so
130 %{_pkgconfigdir}/*.pc
This page took 0.340423 seconds and 3 git commands to generate.