2018-10-20 16:41:04 +02:00
|
|
|
VERSION="2.80"
|
2018-01-22 18:16:33 +01:00
|
|
|
SRCDIR="dnsmasq-${VERSION}"
|
|
|
|
TARBALL="${SRCDIR}.tar.xz"
|
|
|
|
URL="http://www.thekelleys.org.uk/dnsmasq"
|
2018-10-20 16:41:04 +02:00
|
|
|
SHA256SUM="cdaba2785e92665cf090646cba6f94812760b9d7d8c8d0cfb07ac819377a63bb"
|
2018-02-15 23:47:54 +01:00
|
|
|
DEPENDS="toolchain"
|
2018-01-22 18:16:33 +01:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2018-02-16 23:22:04 +01:00
|
|
|
cp -r ${1}/* ${PKGBUILDDIR}
|
2018-01-22 18:16:33 +01:00
|
|
|
|
2018-10-19 13:02:06 +02:00
|
|
|
local cflags=""
|
|
|
|
local ldflags=""
|
|
|
|
|
|
|
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
|
|
|
cflags="-fstack-protector-all"
|
|
|
|
ldflags="-z noexecstack -z relro -z now"
|
|
|
|
fi
|
2018-10-14 18:47:20 +02:00
|
|
|
|
|
|
|
CFLAGS="-O2 $cflags" \
|
|
|
|
LDFLAGS="$ldflags" \
|
2018-01-22 18:16:33 +01:00
|
|
|
make CC=${TARGET}-gcc PREFIX="/" BINDIR="/bin" -j $NUMJOBS
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2018-01-22 18:16:33 +01:00
|
|
|
|
|
|
|
make CC=${TARGET}-gcc PREFIX="/" BINDIR="/bin" DESTDIR="$DEPLOY" install
|
|
|
|
mkdir -p "$DEPLOY/etc"
|
2018-02-20 21:30:34 +01:00
|
|
|
cat_file_override "dnsmasq.conf" > "$DEPLOY/etc/dnsmasq.conf"
|
2018-06-16 17:46:17 +02:00
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY"
|
2018-01-22 18:16:33 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
curl --silent -L "$URL" | grep -o ">dnsmasq-[0-9.]*tar.xz<" | \
|
|
|
|
sed 's/>dnsmasq-//g' | sed 's/.tar.xz<//g' | \
|
|
|
|
verson_find_greatest "$VERSION"
|
|
|
|
}
|