source: projects/specs/trunk/q/qpopper/qpopper-vl.spec @ 521

Revision 521, 8.2 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
1%define USE_DRACD 0
2
3Summary: POP3 daemon from Qualcomm
4Summary(ja): POP3 デーモン
5Name: qpopper
6Version: 4.0.18
7Release: 3%{?_dist_release}
8License: BSD
9Group: System Environment/Daemons
10URL: http://www.eudora.com/qpopper/
11Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/%{name}%{version}.tar.gz
12Source2: qpopper.xinetd.vine
13Source10: qpopper.pamd_vl4
14Source11: qpopper.pamd
15
16%if %{_dist_release}=="vl4"
17# for Vine 4.x
18Requires: pam >= 0.59
19BuildPreReq: pam-devel >= 0.59
20%else
21Requires: pam >= 1.0
22BuildPreReq: pam-devel >= 1.0
23%endif
24
25Requires: gdbm, openssl
26BuildPreReq: gdbm-devel, openssl-devel
27
28%if %{USE_DRACD}
29Requires: dracd
30BuildPreReq: dracd
31%endif
32
33PreReq: gawk grep shadow-utils
34BuildRoot: %{_tmppath}/%{name}-%{version}-root
35Distribution: Vine Linux
36Vendor: Project Vine
37
38%description
39POP3 server from QUALCOMM, with the following features: lower memory
40requirements, thus faster UIDL assists POP clients which "leave mail
41on server" in determining which messages are new. Implements some
42other extended POP3 commands.
43
44%prep
45%setup -q -n %{name}%{version}
46
47%build
48%if %{USE_DRACD}
49CFLAGS="$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
59CFLAGS="$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}
70make
71
72%install
73rm -rf $RPM_BUILD_ROOT
74mkdir -p $RPM_BUILD_ROOT%{_sbindir}
75mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
76install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/
77install -m 755 -s popper/popper $RPM_BUILD_ROOT%{_sbindir}/in.qpopper
78sed -e 's#/usr/local/lib/popper#%{_sbindir}/in.qpopper#g' < man/popper.8 > $RPM_BUILD_ROOT%{_mandir}/man8/in.qpopper.8
79chmod 644 $RPM_BUILD_ROOT%{_mandir}/man8/in.qpopper.8
80install -m 755 -s popper/popauth $RPM_BUILD_ROOT%{_sbindir}/popauth
81install -m 644 man/popauth.8 $RPM_BUILD_ROOT%{_mandir}/man8/popauth.8
82install -m 755 -d $RPM_BUILD_ROOT%{_var}/spool/mail/bulletins
83install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d
84install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/qpopper
85
86%if %{_dist_release}=="vl4"
87# for Vine 4.x
88install -m 664 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/qpopper
89%else
90install -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 || :
99exit 0
100
101%post
102chown pop /usr/sbin/popauth
103chmod u+s /usr/sbin/popauth
104
105%postun
106inetdconf_del () {
107if [ -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
136fi
137}
138if [ $1 = 0 ] ; then
139  inetdconf_del "pop-3   stream  tcp     nowait  root    /usr/sbin/tcpd in.qpopper"
140fi
141
142%triggerin -- inetd
143inetdconf_add () {
144if [ -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
183fi
184}
185echo "Added pop3 entry to inetd.conf by qpopper package"
186inetdconf_add "pop-3   stream  tcp     nowait  root    /usr/sbin/tcpd   in.qpopper"
187
188%clean
189rm -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
Note: See TracBrowser for help on using the repository browser.