Summary: The PPP (Point-to-Point Protocol) daemon.
Summary(ja): PPP (Point-to-Point Protocol) デーモン
Name: ppp
Version: 2.4.4
Release: 4%{?_dist_release}
License: distributable
Group: System Environment/Daemons
Source0: ftp://ftp.samba.org/pub/ppp/ppp-%{version}.tar.gz
Source1: ppp-2.4.4-pamd.conf
Patch0: ppp-2.4.3-makefile.patch
Patch1: ppp-2.3.6-sample.patch
Patch8: ppp-2.4.3-fix.patch
Patch9: ppp-2.4.3-fix64.patch
Patch13: ppp-2.4.4-no_strip2.patch
Patch16: ppp-2.4.2-pppoatm-mtu.patch
Patch17: ppp-2.4.2-pppoatm-make.patch
Patch19: ppp-2.4.3-local.patch
Patch22: ppp-2.4.4-cbcp.patch
Patch24: ppp-2.4.4-closelog.patch
Patch25: ppp-2.4.4-response_len.patch
Patch26: ppp-2.4.4-new_speeds.patch

URL: http://ppp.samba.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildPreReq: libpcap >= 0.8.3, pam-devel
#Requires: glibc >= 2.0.6, /etc/pam.d/system-auth
Requires: glibc >= 2.0.6, pam >= 1.0

%description
The ppp package contains the PPP (Point-to-Point Protocol) daemon and
documentation for PPP support.  The PPP protocol provides a method for
transmitting datagrams over serial point-to-point links. PPP is
usually used to dial in to an ISP (Internet Service Provider) or other
organization over a modem and phone line.

%description -l ja
ppp パッケージには PPP (Point-to-Point Protocol) デーモンと
PPP を使う為のドキュメントが収められています．PPP プロトコルを
使うとシリアルな point-to-point 接続上でデータグラムを転送する
事が出来ます．この PPP は一般的には ISP (Internet Service Provider) 等に
モデムを介した電話回線で接続する際に使われます．


%package devel
Summary: Headers for ppp plugin development
SUmmary(ja): ppp プラグイン開発用ヘッダファイル
Group: Development/Libraries

%description devel
This package contains the header files for building plugins for ppp.

%description -l ja devel
このパッケージには ppp のプラグインを開発するためのヘッダファイルが
含まれています。

%prep
%setup  -q

%patch0 -p1 -b .makefile
%patch1 -p1 -b .sample
%patch8 -p1 -b .fix
%patch9 -p1 -b .fix64
%patch13 -p1 -b .no_strip2
%patch16 -p1 -b .atm-mtu
%patch17 -p1 -b .atm-make
%patch19 -p1 -b .local
%patch22 -p1 -b .cbcp
%patch24 -p1 -b .closelog
%patch25 -p1 -b .response_len
%patch26 -p1 -b .new_speeds

find . -type f -name "*.sample" | xargs rm -f 

%build
./configure
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"


%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
export INSTROOT=$RPM_BUILD_ROOT
%ifarch x86_64
make install install-etcppp LIBDIR=$RPM_BUILD_ROOT%{_libdir}/pppd/%{version}
%else
make install install-etcppp
%endif

## it shouldn't be SUID root be default
#chmod 755 %{buildroot}/usr/sbin/pppd

chmod go+r scripts/*
mkdir -p %{buildroot}/etc/pam.d
install -m 644 %{SOURCE1} %{buildroot}/etc/pam.d/ppp

mkdir -p %{buildroot}/etc/ppp
cp etc.ppp/* %{buildroot}/etc/ppp
chmod 600 %{buildroot}/etc/ppp/*-secrets

mkdir -p %{buildroot}/etc/radiusclient
cp pppd/plugins/radius/etc/* %{buildroot}/etc/radiusclient
mv %{buildroot}/etc/radiusclient/radiusclient.conf %{buildroot}/etc/
perl -pi -e 's|/usr/local||g' %{buildroot}/etc/radiusclient/radiusclient.conf

find scripts -type f | xargs chmod 644

%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%{_sbindir}/*
%{_libdir}/pppd
%{_mandir}/man8/chat.8*
%{_mandir}/man8/pppd.8*
%{_mandir}/man8/pppdump.8*
%{_mandir}/man8/pppstats.8*
%{_mandir}/man8/pppd-radattr.8*
%{_mandir}/man8/pppd-radius.8*
%dir /etc/ppp
%config(noreplace) /etc/ppp/*
%config(noreplace) /etc/pam.d/ppp
%config(noreplace) /etc/radiusclient/*
%config(noreplace) /etc/radiusclient.conf
%doc README README.linux scripts sample

%files devel
%defattr(-,root,root)
%{_includedir}/pppd
%doc PLUGINS


%changelog
* Sun Aug 23 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.4.4-4
- update pam.d/ppp to fix pam-1.0

* Thu Aug 14 2008 Shu KONNO <owa@bg.wakwak.com> 2.4.4-3
- added option LIBDIR at makeinstall for x86_64

* Thu Jul 31 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.4-2
- add -devel subpackage to develop ppp plugins

* Wed Jun 25 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.4.4-1
- update Source1 for pam-1.0.1
- import several patches from Fedora 2.4.4-7

* Sat Jul  7 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.4-0vl1
- new upstream release
- rebuilt with new toolchain and environment
- added URL (also URL of Source0)

* Fri Nov 17 2006 NAKAMURA Kenta <kenta@vinelinux.org> 2.4.3-0vl2
- use License: instead of Copyright:

* Mon Jan 24 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 2.4.3-0vl1
- new upstream release.
- replace patch0.

* Wed Aug 11 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 2.4.2-0vl0
- new upstream release.
- remove patch 2-4 (no longer needed).

* Sat Mar 15 2003 <ryo1@bc.wakwak.com> 2.4.1-0vl2
- rebuild with new toolchains

* Sun Jun 10 2001 <sagami@vinelinux.org>
- 2.4.1-0vl1: update to 2.4.1

* Thu Jan 25 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 2.4.0-2vl1
- based on 2.4.0-2 from Rawhide
- added Japanese summary and description
- Requires: /etc/pam.d/system-auth -> pam >= 0.72
  (for better compatibility with apt for rpm)

* Fri Dec  1 2000 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new environment

* Thu Nov  9 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 2.4.0

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Mon Jun  5 2000 Nalin Dahyabhai <nalin@redhat.com>
- move man pages to %{_mandir}

* Thu Jun  1 2000 Nalin Dahyabhai <nalin@redhat.com>
- change perms using defattr
- modify PAM setup to use system-auth

* Sun Mar 26 2000 Florian La Roche <Florian.La Roche@redhat.com>
- change to root:root perms

* Mon Mar 06 2000 Nalin Dahyabhai <nalin@redhat.com>
- reaper bugs verified as fixed
- check pam_open_session result code (bug #9966)

* Mon Feb 07 2000 Nalin Dahyabhai <nalin@redhat.com>
- take a shot at the wrong reaper bugs (#8153, #5290)

* Thu Feb 03 2000 Nalin Dahyabhai <nalin@redhat.com>
- free ride through the build system (release 2)

* Tue Jan 18 2000 Nalin Dahyabhai <nalin@redhat.com>
- Update to 2.3.11

* Sat Nov 06 1999 Michael K. Johnson <johnsonm@redhat.com>
- Better fix for both problems

* Fri Nov 05 1999 Michael K. Johnson <johnsonm@redhat.com>
- fix for double-dial problem
- fix for requiring a controlling terminal problem

* Sun Sep 19 1999 Preston Brown <pbrown@redhat.com>
- 2.3.10 bugfix release

* Fri Aug 13 1999 Michael K. Johnson <johnsonm@redhat.com>
- New version 2.3.9 required for kernel 2.3.13 and will be required
  for new initscripts.  auth patch removed; 2.3.9 does the same thing
  more readably than the previous patch.

* Thu Jun 24 1999 Cristian Gafton <gafton@redhat.com>
- add pppdump

* Fri Apr 09 1999 Cristian Gafton <gafton@redhat.com>
- force pppd use the glibc's logwtmp instead of implementing its own

* Wed Apr 01 1999 Preston Brown <pbrown@redhat.com>
- version 2.3.7 bugfix release

* Tue Mar 23 1999 Cristian Gafton <gafton@redhat.com>
- version 2.3.6

* Mon Mar 22 1999 Michael Johnson <johnsonm@redhat.com>
- auth patch

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 3)

* Thu Jan 07 1999 Cristian Gafton <gafton@redhat.com>
- build for glibc 2.1

* Fri Jun  5 1998 Jeff Johnson <jbj@redhat.com>
- updated to 2.3.5.

* Tue May 19 1998 Prospector System <bugs@redhat.com>
- translations modified for de

* Fri May  8 1998 Jakub Jelinek <jj@ultra.linux.cz>
- make it run with kernels 2.1.100 and above.

* Fri Apr 24 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Wed Mar 18 1998 Cristian Gafton <gafton@redhat.com>
- requires glibc 2.0.6 or later

* Wed Mar 18 1998 Michael K. Johnson <johnsonm@redhat.com>
- updated PAM patch to not turn off wtmp/utmp/syslog logging.

* Wed Jan  7 1998 Cristian Gafton <gafton@redhat.com>
- added the /etc/pam.d config file
- updated PAM patch to include session support

* Tue Jan  6 1998 Cristian Gafton <gafton@redhat.com>
- updated to ppp-2.3.3, build against glibc-2.0.6 - previous patches not
  required any more.
- added buildroot
- fixed the PAM support, which was really, completely broken and against any
  standards (session support is still not here... :-( )
- we build against running kernel and pray that it will work
- added a samples patch; updated glibc patch

* Thu Dec 18 1997 Erik Troan <ewt@redhat.com>
- added a patch to use our own route.h, rather then glibc's (which has 
  alignment problems on Alpha's) -- I only applied this patch on the Alpha,
  though it should be safe everywhere

* Fri Oct 10 1997 Erik Troan <ewt@redhat.com>
- turned off the execute bit for scripts in /usr/doc

* Fri Jul 18 1997 Erik Troan <ewt@redhat.com>
- built against glibc

* Tue Mar 25 1997 Erik Troan <ewt@redhat.com>
- Integrated new patch from David Mosberger
- Improved description

