#!/bin/sh PKGNAM=dhcpcd VERSION=2.0.4 BUILD=2 . /etc/pkghelpers pkghelpers_env rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf dhcpcd-$VERSION tar xjvf $CWD/dhcpcd-$VERSION.tar.bz2 cd dhcpcd-$VERSION # This changes the default location where the .pid and # other files are written from /var/run to /etc/dhcpc. # The latter directory was long traditional, and (more # importantly) you can't be sure that /var is mounted # yet when dhcpcd is invoked. zcat $CWD/dhcpcd.etc.dhcpc.diff.gz | patch -p1 --verbose || exit 1 chown -R root:root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sbindir=/sbin \ --sysconfdir=/etc \ --localstatedir=/var make -j12 || exit 1 make install DESTDIR=$PKG # This script has been installed non-executable for several dhcpcd # releases leading me to believe this is intentional on the part of # the developers. Indeed, the script is called a "sample" in the # included comments, and there's been at least one security issue # related to its use in the past, so it's probably a safer bet to # not install it so that it works "out of the box". However, making # it non-executable is not the best solution for this as it leads # to error messages in the system logs which I hear about from time # to time. Instead, we'll make it executable, but will give it a # suffix of -sample so that dhcpcd won't attempt to run it. # # As far as I can tell it does nothing more than add some extra # verbosity to the logs anyway, and rc.inet1 already does that. # There's really no need that I can see to enable the script. mv $PKG/etc/dhcpc/dhcpcd.exe $PKG/etc/dhcpc/dhcpcd.exe-sample chmod 755 $PKG/etc/dhcpc/dhcpcd.exe-sample mkdir -p $PKG/usr/doc/dhcpcd-$VERSION cp -a \ AUTHORS COPYING ChangeLog INSTALL NEWS README \ $PKG/usr/doc/dhcpcd-$VERSION gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG pkghelpers_fixup pkghelpers_makepkg