From: Nils Gillmann <ng0@n0.is>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: 32114@debbugs.gnu.org
Subject: [bug#32114] [PATCH] gnu: Add ddclient.
Date: Wed, 11 Jul 2018 06:27:58 +0000 [thread overview]
Message-ID: <20180711062758.hk6ehmh3szh7viyv@abyayala> (raw)
In-Reply-To: <20180710162955.10895-1-go.wigust@gmail.com>
Oleg Pykhalov transcribed 4.8K bytes:
> * gnu/packages/dns.scm (ddclient): New variable.
> ---
> gnu/packages/dns.scm | 85 +++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 84 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
> index 78479b2d3..b17016909 100644
> --- a/gnu/packages/dns.scm
> +++ b/gnu/packages/dns.scm
> @@ -9,6 +9,7 @@
> ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
> ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
> ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
> +;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -29,7 +30,9 @@
> #:use-module (gnu packages admin)
> #:use-module (gnu packages autotools)
> #:use-module (gnu packages base)
> + #:use-module (gnu packages bash)
> #:use-module (gnu packages databases)
> + #:use-module (gnu packages compression)
> #:use-module (gnu packages crypto)
> #:use-module (gnu packages datastructures)
> #:use-module (gnu packages flex)
> @@ -55,7 +58,8 @@
> #:use-module (guix packages)
> #:use-module (guix download)
> #:use-module (guix utils)
> - #:use-module (guix build-system gnu))
> + #:use-module (guix build-system gnu)
> + #:use-module (guix build-system trivial))
>
> (define-public dnsmasq
> (package
> @@ -576,3 +580,82 @@ synthesis, and on-the-fly re-configuration.")
> license:lgpl2.0+ ; parts of scr/contrib/ucw
> license:public-domain ; src/contrib/fnv and possibly murmurhash3
> license:gpl3+)))) ; everything else
> +
> +(define-public ddclient
> + (package
> + (name "ddclient")
> + (version "3.8.3")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "mirror://sourceforge/ddclient/ddclient/ddclient-"
> + version "/ddclient-" version ".tar.gz"))
> + (sha256
> + (base32
> + "1j8zdn7fy7i0bjk3jf0hxnbnshc2yf054vxq64imxdpfd7n5zgfy"))))
> + (build-system trivial-build-system)
> + (native-inputs
> + `(("bash" ,bash)
> + ("gzip" ,gzip)
> + ("perl" ,perl)
> + ("tar" ,tar)))
> + (inputs
> + `(("net-tools" ,net-tools)
> + ("perl-io-socket-ssl" ,perl-io-socket-ssl)
> + ("perl-digest-sha1" ,perl-digest-sha1)))
> + (arguments
> + `(#:modules ((guix build utils)
> + (ice-9 match)
> + (srfi srfi-26))
> + #:builder
> + (begin
> + (use-modules (guix build utils)
> + (ice-9 match)
> + (srfi srfi-26))
> + ;; bootstrap
> + (setenv "PATH" (string-append
> + (assoc-ref %build-inputs "bash") "/bin" ":"
> + (assoc-ref %build-inputs "tar") "/bin" ":"
> + (assoc-ref %build-inputs "gzip") "/bin" ":"
> + (assoc-ref %build-inputs "perl") "/bin"))
> + ;; extract source
> + (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
> + ;; package
> + (with-directory-excursion (string-append ,name "-" ,version)
> + (let* ((out (assoc-ref %outputs "out"))
> + (bin (string-append out "/bin")))
> + (let ((file "ddclient"))
> + (substitute* file
> + (("/usr/bin/perl") (which "perl")))
> + (install-file file bin)
> + (wrap-program (string-append bin "/" file)
> + `("PATH" ":" =
> + ("$PATH"
> + ,@(map (lambda (input)
> + (match input
> + ((name . store)
> + (string-append store "/bin"))))
> + %build-inputs)))
> + `("PERL5LIB" ":" =
> + ,(delete
> + ""
> + (map (match-lambda
> + (((? (cut string-prefix? "perl-" <>) name) . dir)
> + (string-append dir "/lib/perl5/site_perl"))
> + (_ ""))
> + %build-inputs)))))
> + (for-each (cut install-file <> (string-append out
> + "/share/ddclient"))
> + (find-files "." "sample.*$")))))))
> + (home-page "https://sourceforge.net/projects/ddclient/")
> + (synopsis "Address updating utility for dynamic DNS services")
> + (description "This package provides a client to update dynamic IP
> +addresses with several dynamic DNS service providers, such as
> +@uref{https://www.dyndns.com/account/login.html,DynDNS.com}.
> +
> +This makes it possible to use a fixed hostname (such as myhost.dyndns.org) to
> +access a machine with a dynamic IP address.
> +
> +This client supports both dynamic and (near) static services, as well as MX
> +record and alternative name management. It caches the address, and only
> +attempts the update when it has changed.")
> + (license license:gpl2+)))
> --
> 2.18.0
Looks good to me. maybe replace the "This" repetition in the description?
next prev parent reply other threads:[~2018-07-11 6:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 16:29 [bug#32114] [PATCH] gnu: Add ddclient Oleg Pykhalov
2018-07-11 6:27 ` Nils Gillmann [this message]
2018-07-11 19:09 ` Leo Famulari
2018-07-12 5:13 ` Nils Gillmann
2018-07-13 15:01 ` bug#32114: " Oleg Pykhalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180711062758.hk6ehmh3szh7viyv@abyayala \
--to=ng0@n0.is \
--cc=32114@debbugs.gnu.org \
--cc=go.wigust@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).