/[packages]/cauldron/opendkim/current/SPECS/opendkim.spec
ViewVC logotype

Contents of /cauldron/opendkim/current/SPECS/opendkim.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2036415 - (show annotations) (download)
Wed Jan 31 08:13:34 2024 UTC (3 months, 3 weeks ago) by rapsys
File size: 6395 byte(s)
Fix unreplaced values
1 %define major 11
2 %define libname %mklibname opendkim %{major}
3 %define develname %mklibname opendkim -d
4 %define bigname OpenDKIM
5 %define bigversion 2.11.0-Beta2
6 %define postfixdir %{_var}/spool/postfix
7
8 Name: opendkim
9 Version: 2.11.0
10 Release: %mkrel 0.beta2.5
11 Summary: DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail
12 Group: System/Servers
13 License: BSD and Sendmail
14 URL: http://www.opendkim.org/
15 Source0: https://github.com/trusteddomainproject/%{bigname}/archive/refs/tags/%{bigversion}.tar.gz
16 Source1: README.urpmi
17 Source2: external_hosts.conf
18 Source3: internal_hosts.conf
19 Source4: key_table.conf
20 Source5: signing_table.conf
21 Source6: opendkim.tmpfiles
22 Patch0: opendkim-2.10.3-fix-pidfile-path.patch
23 Patch1: opendkim-2.10.3-change-default-crypto-settings.patch
24 BuildRequires: sendmail-devel
25 BuildRequires: db-devel
26 BuildRequires: pkgconfig(openssl)
27 BuildRequires: pkgconfig(libbsd)
28 BuildRequires: pkgconfig(libmemcached)
29 BuildRequires: pkgconfig(opendbx)
30
31 %description
32 OpenDKIM allows signing and/or verification of email through an open source
33 library that implements the DKIM service, plus a milter-based filter
34 application that can plug in to any milter-aware MTA, including sendmail,
35 Postfix, or any other MTA that supports the milter protocol.
36
37 %package -n %{libname}
38 Summary: An open source DKIM library
39 Group: System/Servers
40
41 %description -n %{libname}
42 This package contains the library files required for running services built
43 using libopendkim.
44
45 %package -n %{develname}
46 Summary: Development files for lib%{name}
47 Group: Development/Other
48
49 %description -n %{develname}
50 This package contains the static libraries, headers, and other support files
51 required for developing applications against libopendkim.
52
53 %prep
54 %setup -q -D -n %{bigname}-%{bigversion}
55 %autopatch -p1
56
57 %build
58 autoreconf -f -i
59 # Always use system libtool instead of pacakge-provided one to
60 # properly handle 32 versus 64 bit detection and settings
61 #define LIBTOOL LIBTOOL=`which libtool`
62
63 %configure --with-libmemcached --with-db --with-odbx --enable-query_cache
64
65 # Remove rpath
66 %{__sed} -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
67 %{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
68 %make_build
69
70 %install
71 %make_install
72 install -d %{buildroot}%{_sysconfdir}
73 install -m 0755 contrib/init/redhat/%{name}-default-keygen %{buildroot}%{_sbindir}/%{name}-default-keygen
74
75 install -d -m 0755 %{buildroot}%{_unitdir}
76 install -m 0644 contrib/systemd/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
77 perl -pi -e 's|^(ExecReload=)|ExecStartPost=+%{_bindir}/systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf\n$1|' %{buildroot}%{_unitdir}/%{name}.service
78
79 install -m 0644 opendkim/%{name}.conf.sample %{buildroot}%{_sysconfdir}/%{name}.conf
80 perl -pi -e 's|^# (Canonicalization)(\t+)simple/simple|$1$2relaxed/relaxed|;
81 s|^# (PidFile\t+)filename|$1%{_rundir}/%{name}/%{name}.pid|;
82 s|^(KeyFile)(\t+)/var/db/dkim/example.private|$1$2%{_sysconfdir}/%{name}/keys/default.private|;
83 s|^(Selector)(\t+)my-selector-name|$1$2default|;
84 s|^(Socket)(\t+)inet:port\@localhost|# $1$2inet:8891\@localhost\n$1$2local:%{postfixdir}%{_rundir}/%{name}/%{name}.sock|;
85 s|^# (OverSignHeaders\t+)(header1,header2,...)|# $1$2\n$1\tFrom|;
86 s|^(# KeyTable\t+)dataset|$1%{_sysconfdir}/%{name}/key_table.conf|;
87 s|^(# SigningTable\t+)filename|$1refile:%{_sysconfdir}/%{name}/signing_table.conf|;
88 s|^(# ExternalIgnoreList\t+)filename|$1refile:%{_sysconfdir}/%{name}/external_hosts.conf|;
89 s|^# (InternalHosts\t+)dataset|$1refile:%{_sysconfdir}/%{name}/internal_hosts.conf|;
90 s|^(Syslog\t+Yes)|# $1|;
91 s|^(# UMask\t+)(022)$|${1}0${2}|;
92 ' %{buildroot}%{_sysconfdir}/%{name}.conf
93
94 install -m 0644 %{SOURCE1} README.urpmi
95
96 install -d %{buildroot}%{_sysconfdir}/%{name}
97 install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/external_hosts.conf
98 install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/internal_hosts.conf
99 install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{name}/key_table.conf
100 install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/%{name}/signing_table.conf
101
102 install -p -d %{buildroot}%{_tmpfilesdir}
103 install -m 0644 %{SOURCE6} %{buildroot}%{_tmpfilesdir}/%{name}.conf
104
105 rm -rf %{buildroot}%{_prefix}/share/doc/%{name}
106 rm -f %{buildroot}%{_libdir}/*.a
107 rm -f %{buildroot}%{_libdir}/*.la
108
109 install -d %{buildroot}%{_localstatedir}/spool/%{name}
110 install -d %{buildroot}/run/%{name}
111 install -d %{buildroot}%{_sysconfdir}/%{name}
112 install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/keys
113
114 install -m 0755 stats/%{name}-reportstats %{buildroot}%{_prefix}/sbin/%{name}-reportstats
115 sed -i \
116 -e 's|^OPENDKIMSTATSDIR="/var/db/%{name}"|OPENDKIMSTATSDIR="%{_localstatedir}/spool/%{name}"|g' \
117 -e 's|^OPENDKIMDATOWNER="mailnull:mailnull"|OPENDKIMDATOWNER="%{name}:%{name}"|g' \
118 %{buildroot}%{_prefix}/sbin/%{name}-reportstats
119
120 chmod 0644 contrib/convert/convert_keylist.sh
121
122 %pre
123 %_pre_useradd opendkim /run/opendkim /bin/false
124
125 %post
126 %_post_service %{name}
127 %_tmpfilescreate %{name}
128
129 # Generate default key on install
130 if [ "$1" -eq "1" ]; then
131 %{_sbindir}/opendkim-default-keygen > /dev/null 2>&1 || /bin/true
132 fi
133
134 %preun
135 %_preun_service %{name}
136
137 %files
138 %doc LICENSE LICENSE.Sendmail
139 %doc FEATURES KNOWNBUGS RELEASE_NOTES RELEASE_NOTES.Sendmail INSTALL
140 %doc contrib/convert/convert_keylist.sh %{name}/*.sample
141 %doc %{name}/%{name}.conf.simple-verify %{name}/%{name}.conf.simple
142 %doc %{name}/README contrib/lua/*.lua
143 %doc README.urpmi
144 %config(noreplace) %{_sysconfdir}/%{name}.conf
145 %config(noreplace) %{_tmpfilesdir}/%{name}.conf
146 %dir %{_sysconfdir}/%{name}
147 %dir %{_sysconfdir}/%{name}/keys
148 %config(noreplace) %attr(0640,root,opendkim) %{_sysconfdir}/%{name}/external_hosts.conf
149 %config(noreplace) %attr(0640,root,opendkim) %{_sysconfdir}/%{name}/internal_hosts.conf
150 %config(noreplace) %attr(0640,root,opendkim) %{_sysconfdir}/%{name}/key_table.conf
151 %config(noreplace) %attr(0640,root,opendkim) %{_sysconfdir}/%{name}/signing_table.conf
152 %{_sbindir}/*
153 %{_mandir}/*/*
154 %dir %attr(-,opendkim,opendkim) %{_localstatedir}/spool/%{name}
155 %{_unitdir}/%{name}.service
156
157 %files -n %{libname}
158 %doc LICENSE LICENSE.Sendmail
159 %doc README
160 %{_libdir}/lib%{name}.so.*
161
162 %files -n %{develname}
163 %doc LICENSE LICENSE.Sendmail
164 %doc lib%{name}/docs/*.html
165 %{_includedir}/%{name}
166 %{_libdir}/*.so
167 %{_libdir}/pkgconfig/*.pc

  ViewVC Help
Powered by ViewVC 1.1.30