File rp-pppoe.spec of Package rp-pppoe

#
# spec file for package rp-pppoe
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%if %{?rel:0}%{!?rel:1}
%define rel 1
%endif

Name:           rp-pppoe
Summary:        A PPP Over Ethernet Redirector for PPPD
License:        GPL-2.0+
Group:          Productivity/Networking/PPP
Version:        3.11
Release:        0
Source:         http://www.roaringpenguin.com/pppoe/rp-pppoe-%{version}.tar.bz2
Url:            http://www.roaringpenguin.com/pppoe
#Patch0:         init-suse.diff
Patch1:         docdir.diff
Patch2:         nonrfc-modems.diff
Patch3:         logger-path.diff
Patch5:         release-buildsystem.diff
Patch6:         resolve-conf.diff
Patch8:         strip.diff
Patch10:        %{name}-3.10-init.patch
Patch11:        %{name}-3.10-config.patch
Patch12:        rp-pppoe-pie.patch
Requires:       ppp >= 2.3.7
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %insserv_prereq %fillup_prereq
BuildRequires:  ppp
#----------------------------------------------------------------------------------

%description
rp-pppoe is a user-space redirector which permits the use of PPPoE
(Point-to-Point Protocol Over Ethernet) with Linux. PPPoE is used by
many ADSL service providers.



Authors:
--------
    David F. Skoll <http://www.roaringpenguin.com>

%prep
#----------------------------------------------------------------------------------
%setup -q
#%patch0
%patch1
%patch2
%patch3
%patch5
%patch6
%patch8
%patch10 -p1
%patch11 -p1
%patch12
#----------------------------------------------------------------------------------

%build
#----------------------------------------------------------------------------------
cd src
CFLAGS=$RPM_OPT_FLAGS \
%configure
%{__make}
cd ../gui
%{__make}
#----------------------------------------------------------------------------------

%install
#----------------------------------------------------------------------------------
cd src
%{__make} install DESTDIR=$RPM_BUILD_ROOT
%{__ln_s} -f ../../etc/init.d/pppoe $RPM_BUILD_ROOT%{_sbindir}/rcpppoe
cd ../gui
%{__make} install DESTDIR=$RPM_BUILD_ROOT
%{__install} -d  $RPM_BUILD_ROOT%_defaultdocdir/rp-pppoe
%{__mv} $RPM_BUILD_ROOT/etc/ppp/plugins/README $RPM_BUILD_ROOT%_defaultdocdir/rp-pppoe/README.plugins
%{__rm} -rf $RPM_BUILD_ROOT/etc/ppp/plugins
#----------------------------------------------------------------------------------

%clean
#----------------------------------------------------------------------------------
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %{__rm} -rf $RPM_BUILD_ROOT
#----------------------------------------------------------------------------------

%preun
#----------------------------------------------------------------------------------
%stop_on_removal pppoe
#----------------------------------------------------------------------------------

%post
#----------------------------------------------------------------------------------
%{fillup_and_insserv pppoe}
#----------------------------------------------------------------------------------

%postun
#----------------------------------------------------------------------------------
%restart_on_update pppoe
%{insserv_cleanup}
#----------------------------------------------------------------------------------

%files
#----------------------------------------------------------------------------------
%defattr(-,root,root)
%dir %_defaultdocdir/rp-pppoe
%doc %_defaultdocdir/rp-pppoe/*
%config(noreplace) /etc/ppp/pppoe.conf
%config(noreplace) /etc/ppp/pppoe-server-options
%config(noreplace) /etc/ppp/firewall-masq
%config(noreplace) /etc/ppp/firewall-standalone
%{_bindir}/tkpppoe
%{_sbindir}/pppoe
%{_sbindir}/pppoe-server
%{_sbindir}/pppoe-sniff
%{_sbindir}/pppoe-relay
%{_sbindir}/pppoe-connect
%{_sbindir}/pppoe-start
%{_sbindir}/pppoe-stop
%{_sbindir}/pppoe-setup
%{_sbindir}/pppoe-status
%attr (4750,root,dialout) %{_sbindir}/pppoe-wrapper
%{_sbindir}/rcpppoe
%{_mandir}/man5/pppoe.conf.5*
%{_mandir}/man8/pppoe.8*
%{_mandir}/man8/pppoe-server.8*
%{_mandir}/man8/pppoe-relay.8*
%{_mandir}/man8/pppoe-sniff.8*
%{_mandir}/man8/pppoe-connect.8*
%{_mandir}/man8/pppoe-start.8*
%{_mandir}/man8/pppoe-stop.8*
%{_mandir}/man8/pppoe-status.8*
%{_mandir}/man8/pppoe-setup.8*
/etc/init.d/pppoe
%dir /etc/ppp/rp-pppoe-gui
%{_mandir}/man1/tkpppoe.1*
%{_mandir}/man1/pppoe-wrapper.1*
%dir /usr/share/tkpppoe
/usr/share/tkpppoe/tkpppoe.html
/usr/share/tkpppoe/mainwin-busy.png
/usr/share/tkpppoe/mainwin-nonroot.png
/usr/share/tkpppoe/mainwin.png
/usr/share/tkpppoe/props-advanced.png
/usr/share/tkpppoe/props-basic.png
/usr/share/tkpppoe/props-nic.png
/usr/share/tkpppoe/props-options.png
/usr/share/tkpppoe/en.msg
/usr/share/tkpppoe/ja.msg
#----------------------------------------------------------------------------------
#----------------------------------------------------------------------------------

%changelog
openSUSE Build Service is sponsored by