### this file is sourced not run
PKGVER=0.28.debian19
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=ifplugd-0.28.tar.gz
MD5SUM=df6f4bab52f46ffd6eb1f5912d4ccee3
SRC_URL=http://0pointer.de/lennart/projects/ifplugd/$TARBALL
BUNDLE=

PATCHES=ifplugd_0.28-19.5.debian.tar.xz

SLACKREQ= # libdaemon - build-time only
SLACKDESC="ifplugd: ifplugd $PKGVER (Auto-configure wired ethernet)  
ifplugd:  
ifplugd: ifplugd is a Linux daemon which will automatically configure your 
ifplugd: ethernet device when a cable is plugged in and automatically 
ifplugd: unconfigure it if the cable is pulled. This is useful on laptops with 
ifplugd: onboard network adapters, since it will only configure the interface 
ifplugd: when a cable is really connected.  
ifplugd: 
ifplugd: https://0pointer.de/lennart/projects/
ifplugd: 
ifplugd: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/ifplugd* &&
	tar -xf $CHROOT_DIR/tmp/pkg/$PATCHES &&
	for p in $(cat debian/patches/series); do
		patch -Np1 -i debian/patches/$p
	done
}

### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --with-initdir=/etc/init.d \
	--disable-lynx --disable-xmltoman --disable-subversion"
	pkg_build_autoconf && pkg_build_slackdesc &&
	chmod -x /etc/init.d/ifplugd && # don't run by default
	mv /etc/init.d/ifplugd /etc/init.d/55-ifplugd
}


