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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2036415 - (hide annotations) (download)
Wed Jan 31 08:13:34 2024 UTC (4 months, 2 weeks ago) by rapsys
File size: 6395 byte(s)
Fix unreplaced values
1 rapsys 1999970 %define major 11
2 guillomovitch 910227 %define libname %mklibname opendkim %{major}
3     %define develname %mklibname opendkim -d
4 rapsys 1963124 %define bigname OpenDKIM
5 rapsys 1999970 %define bigversion 2.11.0-Beta2
6 rapsys 1963120 %define postfixdir %{_var}/spool/postfix
7 guillomovitch 910227
8     Name: opendkim
9 rapsys 1999970 Version: 2.11.0
10 rapsys 2036415 Release: %mkrel 0.beta2.5
11 guillomovitch 910227 Summary: DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail
12 guillomovitch 910229 Group: System/Servers
13 guillomovitch 910227 License: BSD and Sendmail
14 rapsys 2036397 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 rapsys 1999970 Patch0: opendkim-2.10.3-fix-pidfile-path.patch
23     Patch1: opendkim-2.10.3-change-default-crypto-settings.patch
24 guillomovitch 910227 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 guillomovitch 1661243 OpenDKIM allows signing and/or verification of email through an open source
33 guillomovitch 910227 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 guillomovitch 910231 Group: System/Servers
40 guillomovitch 910227
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 guillomovitch 910231 Group: Development/Other
48 guillomovitch 910227
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 rapsys 1999970 %setup -q -D -n %{bigname}-%{bigversion}
55     %autopatch -p1
56 guillomovitch 910227
57     %build
58     autoreconf -f -i
59 guillomovitch 1661219 # Always use system libtool instead of pacakge-provided one to
60 guillomovitch 910227 # properly handle 32 versus 64 bit detection and settings
61 guillomovitch 1661219 #define LIBTOOL LIBTOOL=`which libtool`
62 guillomovitch 910227
63 guillomovitch 1661245 %configure --with-libmemcached --with-db --with-odbx --enable-query_cache
64 guillomovitch 910227
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 ovitters 1579222 %make_build
69 guillomovitch 910227
70     %install
71 wally 1471389 %make_install
72 guillomovitch 910227 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 rapsys 1963120 perl -pi -e 's|^(ExecReload=)|ExecStartPost=+%{_bindir}/systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf\n$1|' %{buildroot}%{_unitdir}/%{name}.service
78 guillomovitch 910227
79 rapsys 1999970 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 rapsys 1999981 s|^(# ExternalIgnoreList\t+)filename|$1refile:%{_sysconfdir}/%{name}/external_hosts.conf|;
89     s|^# (InternalHosts\t+)dataset|$1refile:%{_sysconfdir}/%{name}/internal_hosts.conf|;
90 rapsys 1999970 s|^(Syslog\t+Yes)|# $1|;
91 rapsys 2036413 s|^(# UMask\t+)(022)$|${1}0${2}|;
92 rapsys 1999970 ' %{buildroot}%{_sysconfdir}/%{name}.conf
93 guillomovitch 910227
94 rapsys 2036397 install -m 0644 %{SOURCE1} README.urpmi
95    
96 rapsys 1999970 install -d %{buildroot}%{_sysconfdir}/%{name}
97 rapsys 2036397 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 guillomovitch 910227
102 guillomovitch 910231 install -p -d %{buildroot}%{_tmpfilesdir}
103 rapsys 2036397 install -m 0644 %{SOURCE6} %{buildroot}%{_tmpfilesdir}/%{name}.conf
104 guillomovitch 910227
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 guillomovitch 1418617 install -d %{buildroot}/run/%{name}
111 guillomovitch 910227 install -d %{buildroot}%{_sysconfdir}/%{name}
112 rapsys 2036397 install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/keys
113 guillomovitch 910227
114 rapsys 2036397 install -m 0755 stats/%{name}-reportstats %{buildroot}%{_prefix}/sbin/%{name}-reportstats
115 guillomovitch 910230 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 guillomovitch 910227 %{buildroot}%{_prefix}/sbin/%{name}-reportstats
119    
120 guillomovitch 910230 chmod 0644 contrib/convert/convert_keylist.sh
121 guillomovitch 910227
122     %pre
123 guillomovitch 1661233 %_pre_useradd opendkim /run/opendkim /bin/false
124 guillomovitch 910227
125     %post
126 guillomovitch 1661232 %_post_service %{name}
127 guillomovitch 910227 %_tmpfilescreate %{name}
128    
129 guillomovitch 1661297 # 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 guillomovitch 910227 %preun
135 guillomovitch 1661232 %_preun_service %{name}
136 guillomovitch 910227
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 guillomovitch 910233 %config(noreplace) %{_tmpfilesdir}/%{name}.conf
146 guillomovitch 1661237 %dir %{_sysconfdir}/%{name}
147 rapsys 1963810 %dir %{_sysconfdir}/%{name}/keys
148 rapsys 1999981 %config(noreplace) %attr(0640,root,opendkim) %{_sysconfdir}/%{name}/external_hosts.conf
149     %config(noreplace) %attr(0640,root,opendkim) %{_sysconfdir}/%{name}/internal_hosts.conf
150 rapsys 1999970 %config(noreplace) %attr(0640,root,opendkim) %{_sysconfdir}/%{name}/key_table.conf
151     %config(noreplace) %attr(0640,root,opendkim) %{_sysconfdir}/%{name}/signing_table.conf
152 guillomovitch 910227 %{_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