# SliTaz package receipt. PACKAGE="dhcp" VERSION="4.4.3" CATEGORY="network" SHORT_DESC="Dynamic Host Configuration Protocol server." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="ISC" WEB_SITE="https://www.isc.org/dhcp/" TARBALL="$PACKAGE-$VERSION.tar.gz" WGET_URL="https://ftp.isc.org/isc/dhcp/$VERSION/$TARBALL" DEPENDS="libcrypto" BUILD_DEPENDS="file perl" CONFIG_FILES="/etc/dhcpd.conf" # What is the latest version available today? current_version() { wget -O - http://ftp.isc.org/isc/dhcp 2>/dev/null | \ sed '/DIR/!d;/href="[0-9]/!d;s|.*href="||;s|/.*||;/\./!d' | sort -Vr | sed q } # Rules to configure and make the package. compile_rules() { grep -q MYEOL includes/dhctoken.h || sed -i "s/SEMI/MYEOL = '\\\\n',\n\tQUESTION = '?',\n\t&/" \ includes/dhctoken.h sed -i 's/== NOERROR/== (isc_result_t) NOERROR/' \ server/ddns.c ./configure \ --prefix=/usr \ --infodir=/usr/share/info \ --disable-dhcpv6 \ --sysconfdir=/etc \ --mandir=/usr/share/man \ $CONFIGURE_ARGS && make -j 1 && make -j 1 DESTDIR=$DESTDIR install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr/sbin mkdir -p $fs/etc/init.d cp $install/etc/dhcpd.conf.example $fs/etc/dhcpd.conf cp $install/usr/sbin/dhcpd $fs/usr/sbin cp $stuff/dhcpd $fs/etc/init.d }