From 5491100afa473c45f96667ce6f89703d42e01503 Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 22 Jul 2009 02:25:31 +0000 Subject: newsbeuter: adding newsbeuter; wyrd: adding wyrd; remind: adding remind; ddclient: adding ddclient; inadyn: adding inadyn git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2230 370017ae-e619-0410-ac65-c121f96126d4 --- net/dns/ddclient/Manifest | 24 ++++ net/dns/ddclient/ddclient.SlackBuild | 261 +++++++++++++++++++++++++++++++++++ net/dns/ddclient/slack-required | 4 + 3 files changed, 289 insertions(+) create mode 100644 net/dns/ddclient/Manifest create mode 100644 net/dns/ddclient/ddclient.SlackBuild create mode 100644 net/dns/ddclient/slack-required (limited to 'net/dns/ddclient') diff --git a/net/dns/ddclient/Manifest b/net/dns/ddclient/Manifest new file mode 100644 index 00000000..d6c72356 --- /dev/null +++ b/net/dns/ddclient/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST ddclient-3.8.0.tar.gz 45893 MD5 be5c08fee4a45468b8e41c3dcb79e360 RMD160 771ed13aa248c13af11e0466888513418bae98fb SHA1 ff889adacf916bebb25522d9cc1eda0e9593a7f4 SHA256 88f0f1cfafd2d7a813e72c3a3f1f2a08e9bf06ccd1d49ddb3f942dd4b9331fb3 SHA512 ea2c698ecea7b56c6019d19042003d4ee338dd492705883e13061f8cf9d342b211279e4a323b6ef3de6c61a584e6ae3153bcc9522ae5cabf6253492fd5480ee1 +MKBUILD ddclient.mkbuild 5481 MD5 9dc9002fc2f2affcf89c13dba4085835 RMD160 2dd582c7c7e732eefd106ac5af37a13425d1674e SHA1 9cc5600f9c84f6d9911ed504bf40afed98c6fffb SHA256 732e367050c67c9e98358c87a8c7858c0184fbb77b19acafac49c0d3d154b1aa SHA512 6abff3a7307335eb073ac97132fb1dcd51c116c7e6d7dad7b52efa5115bfc9a86facf3fa34795562be7bacbf9132f1292f19f4ff98b5977f842333e94f01659d +SLACK-REQUIRED slack-required 91 MD5 9002d04213e3803325fcec3bd662e4a4 RMD160 671957838804bba3c49bc2068ce2c417e8f8e3bf SHA1 48c5d004258b4f09fc954ae301aec0769b7fcd0c SHA256 df3749cdaabea83772a354cf8d034e54a7efb6ece2aba4e173f2f68abdb115dd SHA512 831329dc7ef54e51d0f3de157c94be03971649c7088e8276b3720641cd5831a69801812ca6ac0a84fdbb5b4da296850756f3fa6279cea2f2579aaca22dbdd485 +SLACKBUILD ddclient.SlackBuild 8124 MD5 236aae515292f5815effce847b471bf1 RMD160 741df45440464eef521a2976e17beb3546fdf45d SHA1 4ac51a5370acd42bdb7a9f30e3f50338a6dd9086 SHA256 5e2b032c5a5e3cceb4d7eb8ab58cae83df49503783dd0d67a813d3d02e301ade SHA512 62ee2930d126144b386d923dc464cac60e14bef0f19fcc208b0899e1cd6089c003085fd6075472f4fbf4be84ff3060accbd8f20b9c92079478c4b20f2d54c224 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJKY2KFAAoJEEHL93ESzgeiW70P/3KqujRqGVjkwP0ezXxS4j55 +PwKn6IBtFavFIWwa+qpwCc5efv7QngZpGUDm5gC+SuJElCiih7ZPFcmw+6epD84n +Y4ceH9zuzN8/HxmGTq+dlfFimaxZPXlp+Fv/FgjNh/hlPk5CsbXqZN62uM6g488Y +q8GqO/yFB0u4fAYrdYr6zjmXpikj1wpuB9iKLUKcbgr0wLY6Nmm0uL92HGNVlo0W +bo5DOPXSCoN+mdy5G3geQu6ICKrlRCkgg4ZBz0oH8kyXo1mmy39XnMbstNgKA3PW +AFzV+0hmVwb7R4+1t13DPbR1iKwMh4sOr66IbyHdvTQdqH24c1KHbh863xqDHjeu +6Bss5VNLQ4Xgp8gQbSiKVCiqSqzLc7Ao9DuTze/AE3usonsWjHY27tdIEW7Ib65F +CWsLICOvKAu2uhNegvNiVGyNu4E1dEwVwCWqioe2iOUS+g74YEOBfNt8TGzFm6WX +xsT30+0mOVVLf8T/HDeYQo3TYjyCtoyEikIQhZL9pzg7GKEOS+39SdBW5CH5VZ4s +JFaIDQX1eEisOpKaOFmhlPtyudiD9ypMDN9F4N2g4yKPZP+Syc/P8nilRduweeCf +c4XrlpukIEK1Bf/YesduxxsMrPDtYT3UAg3W1Ok9JDbgDgx3RKJXxHRNAmgXUGbs +95e8X7zT6wLsRxA8Sjb8 +=olJE +-----END PGP SIGNATURE----- diff --git a/net/dns/ddclient/ddclient.SlackBuild b/net/dns/ddclient/ddclient.SlackBuild new file mode 100644 index 00000000..7102b62c --- /dev/null +++ b/net/dns/ddclient/ddclient.SlackBuild @@ -0,0 +1,261 @@ +#!/bin/bash +# +# ddclient.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# ddclient.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for ddclient, by Silvio Rhatto +# requires: +# tested: ddclient-3.8.0 +# model: generic.mkSlackBuild $Rev: 805 $ +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="ddclient" +PKG_NAME="ddclient" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=3.8.0} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +SLACKBUILD_PATH=${SLACKBUILD_PATH:="net/dns/ddclient"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 +ERROR_MANIFEST=43; + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://downloads.sourceforge.net/sourceforge/ddclient/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Check Manifest file +if [ -e "$CWD/Manifest" ]; then + + # Manifest signature checking + if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then + echo "Checking Manifest signature..." + gpg --verify $CWD/Manifest + if [ "$?" != "0" ]; then + exit $ERROR_MANIFEST + fi + fi + + MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`" + + for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do + + MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`" + MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`" + MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`" + + if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then + MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE" + else + MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`" + fi + + if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then + continue + fi + + echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..." + + SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`" + SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`" + + # Check source code size + if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then + echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC" + exit $ERROR_MANIFEST + else + echo "Size match." + fi + + # Check source code integrity + for ALGO in md5 rmd160 sha1 sha256 sha512; do + if [ $ALGO = "rmd160" ]; then + ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`" + else + ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`" + fi + ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`" + ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }') + if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then + echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC" + exit $ERROR_MANIFEST + else + echo "$ALGO match." + fi + done + + done + +else + exit $ERROR_MANIFEST +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Install +mkdir -p $PKG/{usr/sbin,etc/ddclient,var/cache/ddclient,etc/rc.d} +cp ddclient $PKG/usr/sbin/ +cp sample-etc_ddclient.conf $PKG/etc/ddclient/ddclient.conf.new +cp sample-etc_rc.d_init.d_ddclient $PKG/etc/rc.d/rc.ddclient.new +chmod 600 $PKG/etc/ddclient/ddclient.conf.new + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="COPYING COPYRIGHT ChangeLog Changelog README README.cisco README.ssl RELEASENOTE TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-----------------------------------------------------| +ddclient: ddclient +ddclient: +ddclient: Ddclient is a Perl client used to update dynamic DNS entries for +ddclient: accounts on 'Dynamic DNS Network Services' free DNS service. +ddclient: It currently supports a lot of different routers and a few +ddclient: different services. +ddclient: +ddclient: +ddclient: +ddclient: +ddclient: +EODESC + +# Add a post-installation script (doinst.sh) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EOSCRIPT > "$PKG/install/doinst.sh" +config() { + NEW="\$1" + OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" + OLD="\$(dirname \$NEW)/\$(basename \$OLD .sample)" + OLD="\$(dirname \$NEW)/\$(basename \$OLD .dist)" + + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +mkgroup() { + GROUP="\$1" + if ! grep -qe "^\$GROUP:" etc/group; then + echo Creating group \$GROUP... + chroot . /usr/sbin/groupadd \$GROUP + fi +} + +mkuser() { + USER="\$1" + if [ ! -z "\$2" ]; then + GROUP="\$2" + else + GROUP="\$USER" + fi + if ! grep -qe "^\$USER:" etc/passwd; then + echo Creating user \$USER... + chroot . /usr/sbin/useradd \$USER -g \$GROUP + fi +} + +config etc/rc.d/rc.ddclient.new; config etc/ddclient/ddclient.conf.new +EOSCRIPT + +# Build the package +cd "$PKG" +mkdir -p $REPOS/$SLACKBUILD_PATH +makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/net/dns/ddclient/slack-required b/net/dns/ddclient/slack-required new file mode 100644 index 00000000..28ae7a13 --- /dev/null +++ b/net/dns/ddclient/slack-required @@ -0,0 +1,4 @@ +# Dependency list to ddclient +# +# dependency [condition] [version]] +perl-io-socket-ssl -- cgit v1.2.3