File ifplugd.spec of Package ifplugd
#
# spec file for package ifplugd (Version 0.28)
#
# Copyright (c) 2008 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/
#
# norootforbuild
Name: ifplugd
BuildRequires: gcc-c++ libdaemon-devel lynx pkgconfig
Version: 0.28
Release: 210
Summary: Daemon Activating Network Interfaces on Cable Plug
License: GPL v2 or later
Url: http://0pointer.de/lennart/projects/ifplugd/
Group: Productivity/Networking/Other
Source: %{name}-%{version}.tar.gz
Source1: README.initscript
Patch: ifplugd.dif
Patch1: ifplugd-0.28.dif
Patch2: ifplugd.action.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
ifplugd is a lightweight Linux daemon that configures the network
automatically when a cable is plugged in and unconfigures it when the
cable is pulled. It is primarily intended for use with laptops. It
relies on the distribution's native network configuration subsystem, so
is not very intrusive.
Authors:
--------
Lennard Poettering <mzvscyhtq (at) 0pointer (dot) de>
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q
%patch -p1
%patch1
%patch2
# %setup -n %{name}-%{version} -T -D -a 1
cp %{S:1} .
%build
export CFLAGS="$RPM_OPT_FLAGS -D__KERNEL_STRICT_NAMES -fno-strict-aliasing"
./configure --disable-xmltoman --disable-subversion --prefix=%{_prefix} --mandir=%{_mandir} --sbindir=/sbin --sysconfdir=%{_sysconfdir}
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
#will not work, can not combine "doc /" and "doc [^/]" ...
#mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/ifplugd/
#mv $RPM_BUILD_ROOT/etc/init.d/ifplugd $RPM_BUILD_DIR/%{name}-%{version}/doc/ifplugd.init
rm -fv $RPM_BUILD_ROOT/etc/init.d/ifplugd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-,root,root)
%doc LICENSE README doc/README.SuSE
%doc conf/ifplugd.init README.initscript
/sbin/*
%doc %{_mandir}/man5/ifplugd.conf.5.gz
%doc %{_mandir}/man8/ifplugd.8.gz
%doc %{_mandir}/man8/ifplugstatus.8.gz
%config %{_sysconfdir}/ifplugd
#%{_sysconfdir}/init.d/*
%changelog
* Thu Mar 09 2006 zoz@suse.de
- ifplugd.action now calls ifup/down with '-o ifplugd' (Bug 155358)
(Neccessary since sysconfig-0.50.5)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Sun Jan 15 2006 kukuk@suse.de
- Link static against libdaemon.
* Sun Jan 08 2006 kukuk@suse.de
- Define __KERNEL_STRICT_NAMES for linux/types.h inclusion
* Thu Sep 22 2005 seife@suse.de
- gag the compiler to fix the build
* Wed Sep 21 2005 seife@suse.de
- update to version 0.28 which incorporates our old patches
* Tue May 31 2005 kukuk@suse.de
- Remove wrong compiler options and fix compiler warnings
* Fri Apr 08 2005 seife@suse.de
- update to version 0.27, changes include: new option --no-startup
* Wed Jan 19 2005 seife@suse.de
- fix for new gcc4 warning (incorrect terminated va_list)
* Wed Jan 19 2005 seife@suse.de
- bump version to 0.26, no longer package libdaemon (is a separate
package now).
* Thu Sep 09 2004 ro@suse.de
- fixed handling of README.initscript in specfile
* Thu Sep 09 2004 seife@suse.de
- moved initscript to the documentation directory.
* Mon Aug 30 2004 hare@suse.de
- Removed udev agent again; ifplugd has been integrated in ifup.
* Fri Aug 13 2004 hare@suse.de
- Add udev agent; enables ifplugd only after
a device has been detected.
* Fri Aug 06 2004 seife@suse.de
- allow hardware descriptions for interface names
* Thu Aug 05 2004 seife@suse.de
- bump to version 0.25/libdaemon 0.6
* Thu Mar 18 2004 seife@suse.de
- fix initscript (return codes, status), removed "-w" from default
configuration.
* Mon Feb 16 2004 seife@suse.de
- tuned init-script, corrected README.SuSE
* Tue Feb 10 2004 seife@suse.de
- bump to version 0.22/libdaemon 0.5
* Tue Feb 10 2004 seife@suse.de
- initial check-in