File smpppd.spec of Package smpppd

# spec file for package smpppd
# Copyright (c) 2011 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

# norootforbuild

%if 0%{?suse_version < 1120}
%bcond_with policykit
%bcond_without policykit

Name:           smpppd
BuildRequires:  gcc-c++ openslp-devel openssl-devel
%if %{with policykit}
BuildRequires:  PolicyKit-devel
License:        GPLv2+
Group:          Productivity/Networking/PPP
Summary:        SuSE Meta PPP Daemon
Requires:       ppp /usr/bin/killall
Version:        1.60.52
Release:        1
Source0:        smpppd-%version.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %fillup_prereq %insserv_prereq
Recommends:     wvdial 
Recommends:     pptp 

The SuSE Meta PPP Daemon is the back-end for kinternet. It is required
for modem, ISDN, and DSL connections.

    Arvin Schnell
    Ludwig Nussel

%setup -q
%if 0
if [ -e  $RPM_SOURCE_DIR/devel.diff ]; then
	patch -p1 < $RPM_SOURCE_DIR/devel.diff

test configure -nt || autoreconf -i
./configure \
	--prefix=%_prefix \
	--sysconf=/etc \
	--mandir=%{_mandir} \
%if %{with policykit}
	--without-polkit1 \
	--with-policykit \
make %{?_smp_mflags}

make check

make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}/etc/init.d
install misc/smpppd.conf %{buildroot}/etc/
install misc/smpppd-c.conf %{buildroot}/etc/
install misc/rc.smpppd %{buildroot}/etc/init.d/smpppd
ln -sf ../../etc/init.d/smpppd %{buildroot}/usr/sbin/rcsmpppd
install -d %{buildroot}/var/lib/smpppd
install -d %{buildroot}/var/log/smpppd
install -d %{buildroot}/var/run/smpppd

rm -rf %{buildroot}

%defattr (-, root, root)
%attr (600, root, root) %config(noreplace) /etc/smpppd.conf
%attr (644, root, dialout) %config(noreplace) /etc/smpppd-c.conf
%config /etc/init.d/smpppd
%if %{with policykit}
%dir %{_datadir}/PolicyKit
%dir %{_datadir}/PolicyKit/policy
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
%attr (700, root, root) %dir /var/lib/smpppd
%attr (750, root, dialout) %dir /var/log/smpppd
%ghost %attr (755, root, root) %dir /var/run/smpppd
%doc %_defaultdocdir/smpppd

%{fillup_and_insserv smpppd}

%{stop_on_removal smpppd}

%{restart_on_update smpppd}

openSUSE Build Service is sponsored by