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