1 | %define USE_DRACD 0 |
---|
2 | |
---|
3 | Summary: POP3 daemon from Qualcomm |
---|
4 | Summary(ja): POP3 デーモン |
---|
5 | Name: qpopper |
---|
6 | Version: 4.0.18 |
---|
7 | Release: 3%{?_dist_release} |
---|
8 | License: BSD |
---|
9 | Group: System Environment/Daemons |
---|
10 | URL: http://www.eudora.com/qpopper/ |
---|
11 | Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/%{name}%{version}.tar.gz |
---|
12 | Source2: qpopper.xinetd.vine |
---|
13 | Source10: qpopper.pamd_vl4 |
---|
14 | Source11: qpopper.pamd |
---|
15 | |
---|
16 | %if %{_dist_release}=="vl4" |
---|
17 | # for Vine 4.x |
---|
18 | Requires: pam >= 0.59 |
---|
19 | BuildPreReq: pam-devel >= 0.59 |
---|
20 | %else |
---|
21 | Requires: pam >= 1.0 |
---|
22 | BuildPreReq: pam-devel >= 1.0 |
---|
23 | %endif |
---|
24 | |
---|
25 | Requires: gdbm, openssl |
---|
26 | BuildPreReq: gdbm-devel, openssl-devel |
---|
27 | |
---|
28 | %if %{USE_DRACD} |
---|
29 | Requires: dracd |
---|
30 | BuildPreReq: dracd |
---|
31 | %endif |
---|
32 | |
---|
33 | PreReq: gawk grep shadow-utils |
---|
34 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
35 | Distribution: Vine Linux |
---|
36 | Vendor: Project Vine |
---|
37 | |
---|
38 | %description |
---|
39 | POP3 server from QUALCOMM, with the following features: lower memory |
---|
40 | requirements, thus faster UIDL assists POP clients which "leave mail |
---|
41 | on server" in determining which messages are new. Implements some |
---|
42 | other extended POP3 commands. |
---|
43 | |
---|
44 | %prep |
---|
45 | %setup -q -n %{name}%{version} |
---|
46 | |
---|
47 | %build |
---|
48 | %if %{USE_DRACD} |
---|
49 | CFLAGS="$RPM_OPT_FLAGS" ./configure \ |
---|
50 | --prefix=/usr \ |
---|
51 | --enable-bulletins=/var/spool/mail/bulletins \ |
---|
52 | --enable-specialauth \ |
---|
53 | --with-pam=qpopper \ |
---|
54 | --with-openssl=/usr/share/ssl \ |
---|
55 | --with-popuid=pop \ |
---|
56 | --enable-drac \ |
---|
57 | --enable-apop=/etc/pop.auth |
---|
58 | %else |
---|
59 | CFLAGS="$RPM_OPT_FLAGS" ./configure \ |
---|
60 | --prefix=/usr \ |
---|
61 | --enable-bulletins=/var/spool/mail/bulletins \ |
---|
62 | --enable-specialauth \ |
---|
63 | --with-pam=qpopper \ |
---|
64 | --with-openssl=/usr/share/ssl \ |
---|
65 | --with-popuid=pop \ |
---|
66 | --enable-apop=/etc/pop.auth |
---|
67 | %endif |
---|
68 | # smp flag makes make trouble... |
---|
69 | # make %{?_smp_mflags} |
---|
70 | make |
---|
71 | |
---|
72 | %install |
---|
73 | rm -rf $RPM_BUILD_ROOT |
---|
74 | mkdir -p $RPM_BUILD_ROOT%{_sbindir} |
---|
75 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8 |
---|
76 | install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/ |
---|
77 | install -m 755 -s popper/popper $RPM_BUILD_ROOT%{_sbindir}/in.qpopper |
---|
78 | sed -e 's#/usr/local/lib/popper#%{_sbindir}/in.qpopper#g' < man/popper.8 > $RPM_BUILD_ROOT%{_mandir}/man8/in.qpopper.8 |
---|
79 | chmod 644 $RPM_BUILD_ROOT%{_mandir}/man8/in.qpopper.8 |
---|
80 | install -m 755 -s popper/popauth $RPM_BUILD_ROOT%{_sbindir}/popauth |
---|
81 | install -m 644 man/popauth.8 $RPM_BUILD_ROOT%{_mandir}/man8/popauth.8 |
---|
82 | install -m 755 -d $RPM_BUILD_ROOT%{_var}/spool/mail/bulletins |
---|
83 | install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d |
---|
84 | install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/qpopper |
---|
85 | |
---|
86 | %if %{_dist_release}=="vl4" |
---|
87 | # for Vine 4.x |
---|
88 | install -m 664 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/qpopper |
---|
89 | %else |
---|
90 | install -m 664 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/qpopper |
---|
91 | %endif |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | %pre |
---|
96 | # Add the "pop" user |
---|
97 | /usr/sbin/useradd -c "Pop Account" -u 110 \ |
---|
98 | -s /bin/false -r -d /var/spool/mail pop 2> /dev/null || : |
---|
99 | exit 0 |
---|
100 | |
---|
101 | %post |
---|
102 | chown pop /usr/sbin/popauth |
---|
103 | chmod u+s /usr/sbin/popauth |
---|
104 | |
---|
105 | %postun |
---|
106 | inetdconf_del () { |
---|
107 | if [ -f /etc/inetd.conf ]; then |
---|
108 | TMP=`echo "$*" | sed 's/[ ]\+/\[ ]\\\+/g'` |
---|
109 | if !(grep "^[ ]*$TMP" /etc/inetd.conf > /dev/null) then |
---|
110 | return 0; |
---|
111 | fi |
---|
112 | |
---|
113 | cp /etc/inetd.conf /etc/inetd.conf.rpmsave |
---|
114 | echo "create backup /etc/inetd.conf.rpmsave" |
---|
115 | |
---|
116 | LANG=C awk -vline="$TMP" ' |
---|
117 | BEGIN { |
---|
118 | state = 0; |
---|
119 | key = "^[#]*[ ]*" line; |
---|
120 | } |
---|
121 | { |
---|
122 | if ($0 ~ /^# Added by rpm install script of /) { |
---|
123 | state = 1; |
---|
124 | comment = $0; |
---|
125 | next; |
---|
126 | } |
---|
127 | if ($0 ~ key) |
---|
128 | next; |
---|
129 | if (state == 1) { |
---|
130 | print comment; |
---|
131 | state = 0; |
---|
132 | } |
---|
133 | print $0; |
---|
134 | } |
---|
135 | ' < /etc/inetd.conf.rpmsave > /etc/inetd.conf |
---|
136 | fi |
---|
137 | } |
---|
138 | if [ $1 = 0 ] ; then |
---|
139 | inetdconf_del "pop-3 stream tcp nowait root /usr/sbin/tcpd in.qpopper" |
---|
140 | fi |
---|
141 | |
---|
142 | %triggerin -- inetd |
---|
143 | inetdconf_add () { |
---|
144 | if [ -f /etc/inetd.conf ]; then |
---|
145 | TMP=`echo "$*" | sed 's/[ ]\+/\[ ]\\\+/g'` |
---|
146 | if (grep "^[ ]*$TMP" /etc/inetd.conf > /dev/null) then |
---|
147 | return 0; |
---|
148 | fi |
---|
149 | |
---|
150 | cp /etc/inetd.conf /etc/inetd.conf.rpmsave |
---|
151 | echo "create backup /etc/inetd.conf.rpmsave" |
---|
152 | |
---|
153 | LANG=C awk -vline="$*" -vpackage=%{name} ' |
---|
154 | BEGIN { |
---|
155 | done = 0; |
---|
156 | split(line, field); |
---|
157 | key = "^[#]*[ ]*" field[1]; |
---|
158 | lastline = ""; |
---|
159 | } |
---|
160 | { |
---|
161 | if (($0 ~ key)) { |
---|
162 | if ($0 !~ /^#/) |
---|
163 | printf("#"); |
---|
164 | printf($0 "\n"); |
---|
165 | if (done == 0) { |
---|
166 | printf(line "\n"); |
---|
167 | done = 1; |
---|
168 | } |
---|
169 | } else { |
---|
170 | print $0; |
---|
171 | lastline = $0; |
---|
172 | } |
---|
173 | } |
---|
174 | END { |
---|
175 | if (done == 0) { |
---|
176 | if (lastline != "") |
---|
177 | printf("\n"); |
---|
178 | printf("# Added by rpm install script of " package " at " strftime() "\n"); |
---|
179 | printf(line "\n"); |
---|
180 | } |
---|
181 | } |
---|
182 | ' < /etc/inetd.conf.rpmsave > /etc/inetd.conf |
---|
183 | fi |
---|
184 | } |
---|
185 | echo "Added pop3 entry to inetd.conf by qpopper package" |
---|
186 | inetdconf_add "pop-3 stream tcp nowait root /usr/sbin/tcpd in.qpopper" |
---|
187 | |
---|
188 | %clean |
---|
189 | rm -rf $RPM_BUILD_ROOT |
---|
190 | |
---|
191 | %files |
---|
192 | %defattr(-,root,root) |
---|
193 | %doc GUIDE.pdf License.txt README doc |
---|
194 | %attr(-,root,mail) %dir %{_var}/spool/mail/bulletins |
---|
195 | %{_sbindir}/in.qpopper |
---|
196 | %{_sbindir}/popauth |
---|
197 | %{_mandir}/man*/* |
---|
198 | %defattr(644,root,root) |
---|
199 | %config(noreplace) %{_sysconfdir}/xinetd.d/qpopper |
---|
200 | %config %{_sysconfdir}/pam.d/qpopper |
---|
201 | |
---|
202 | %changelog |
---|
203 | * Thu Aug 20 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.18-3 |
---|
204 | - merge spec for Vine4.x and Vine5.x |
---|
205 | - disable smp flag |
---|
206 | |
---|
207 | * Wed Aug 19 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.18-2 |
---|
208 | - update pam.d/qpopper again |
---|
209 | |
---|
210 | * Tue Aug 18 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.18-1 |
---|
211 | - new upstream release. |
---|
212 | - fix pam.d/qpopper file & module path in x86_64 env. |
---|
213 | - change R:/BR: pam >= 1.0 |
---|
214 | - use smp_flag in make section |
---|
215 | |
---|
216 | * Wed Oct 22 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.14-1 |
---|
217 | - new upstream release. |
---|
218 | |
---|
219 | * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 4.0.9-1vl5 |
---|
220 | - applied new versioning policy, spec in utf-8 |
---|
221 | |
---|
222 | * Sun May 27 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.0.9-0vl6 |
---|
223 | - rebuilt with new toolchain |
---|
224 | |
---|
225 | * Sun Mar 11 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.9-0vl5 |
---|
226 | - fix qpopper.xinetd again |
---|
227 | |
---|
228 | * Wed Feb 07 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.9-0vl4 |
---|
229 | - fix qpopper.xinetd |
---|
230 | - add %triggerin -- inetd section |
---|
231 | - remove inetdconf_add function from %post section |
---|
232 | - add LANG=C into inetdconf_add/del function |
---|
233 | |
---|
234 | * Sun Sep 17 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0.9-0vl3 |
---|
235 | - add xinetd config file. |
---|
236 | - check /etc/inetd.conf availability in %%post/%%postun script. |
---|
237 | |
---|
238 | * Sun Sep 17 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.9-0vl2 |
---|
239 | - Build for Vine 4.0/Seed |
---|
240 | - disable dracd for POP before SMTP |
---|
241 | |
---|
242 | * Mon Mar 27 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.9-0vl1 |
---|
243 | - new upstream release. |
---|
244 | - Build for Vine 3.2 |
---|
245 | - enable dracd for POP before SMTP |
---|
246 | - enable openssl for pop3s |
---|
247 | |
---|
248 | * Wed Aug 17 2005 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.8-0vl1 |
---|
249 | - new upstream release fix security bug. |
---|
250 | |
---|
251 | * Sat May 28 2005 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.0.5-0vl2 |
---|
252 | - add Patch1 for fix CAN-2005-1151 |
---|
253 | - add Patch2 for fix CAN-2005-1152 |
---|
254 | - add Patch3 for fix compilers warnings "tempnam() are unsafe" |
---|
255 | |
---|
256 | * Sat Mar 15 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0.5-0vl1 |
---|
257 | - new upstream release fix security bug. |
---|
258 | - http://archives.neohapsis.com/archives/bugtraq/2003-03/0152.html |
---|
259 | |
---|
260 | * Sun Sep 29 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0.4-0vl1 |
---|
261 | - new upstream release |
---|
262 | - use more rpmmacros |
---|
263 | |
---|
264 | * Wed Mar 13 2002 Toru Sagami <sagami@vinelinux.org> 4.0.3-0vl2 |
---|
265 | - modify %%pre to create "pop" user as system account with uid 110 (< 500) |
---|
266 | - add shadow-utils(/usr/sbin/useradd) for PreReq |
---|
267 | |
---|
268 | * Sat Aug 4 2001 Jun Nishii <jun@vinelinux.org> 4.0.3-0vl1 |
---|
269 | - ver.up |
---|
270 | |
---|
271 | * Tue Jul 10 2001 Jun Nishii <jun@vinelinux.org> 3.1.2-0vl2 |
---|
272 | - add pop account for apop |
---|
273 | |
---|
274 | * Sun May 27 2001 <sagami@vinelinux.org> |
---|
275 | - 3.1.2-0vl1: install manpage into %%{_mandir} |
---|
276 | |
---|
277 | * Sun Jul 09 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org> |
---|
278 | - 3.0.2-0vl3 |
---|
279 | - fixed %files section to handle compressed man pages |
---|
280 | |
---|
281 | * Mon May 29 2000 Yasuyuki Furukawa <furukawa@vinelinux.org> |
---|
282 | - fixed postun for upgrade. |
---|
283 | |
---|
284 | * Fri May 19 2000 Yasuyuki Furukawa <furukawa@vinelinux.org> |
---|
285 | - updated to 3.0.2 |
---|
286 | |
---|
287 | * Wed May 10 2000 Yasuyuki Furukawa <furukawa@vinelinux.org> |
---|
288 | - rewrite SPEC for Vine. |
---|
289 | - add %post and unpost to modify /etc/inetd.conf |
---|
290 | |
---|
291 | * Sat May 6 2000 Kazutoshi Morioka <aab36830@pop07.odn.ne.jp> |
---|
292 | - Upgrade to qpopper-3.0.1 |
---|
293 | |
---|
294 | * Thu Feb 24 2000 Shingo Akagaki <dora@kondara.org> |
---|
295 | - check spec file |
---|
296 | |
---|
297 | * Sun Nov 7 1999 Toru Hoshina <t@kondara.org> |
---|
298 | - be a NoSrc :-P |
---|
299 | |
---|
300 | * Sun Aug 1 1999 Norihito Ohmori <ohmori@flatout.org> |
---|
301 | - rebuild for glibc-2.1.x |
---|
302 | |
---|
303 | * Fri Jul 9 1999 Norihito Ohmori <ohmori@flatout.org> |
---|
304 | - fix APOP bug |
---|