From 1dd23a28cb4179551337421bb177f0c96aa54a11 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Wed, 4 Feb 2015 16:17:24 -0800 Subject: openntpd: More build fixes --- pkgs/tools/networking/openntpd/default.nix | 6 +++--- pkgs/tools/networking/openntpd/no-install.patch | 26 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 pkgs/tools/networking/openntpd/no-install.patch (limited to 'pkgs/tools/networking/openntpd') diff --git a/pkgs/tools/networking/openntpd/default.nix b/pkgs/tools/networking/openntpd/default.nix index db1a5b5ae09..167fea80622 100644 --- a/pkgs/tools/networking/openntpd/default.nix +++ b/pkgs/tools/networking/openntpd/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { sha256 = "4f417c8a4c21ed7ec3811107829f931404f9bf121855b8571a2ca3355695343a"; }; - postPatch = '' - sed -i -e '/^install:/,/^$/{/@if.*PRIVSEP_PATH/,/^$/d}' Makefile.in - ''; + patches = [ ./no-install.patch ]; configureFlags = [ "--with-privsep-path=${privsepPath}" "--with-privsep-user=${privsepUser}" + "--sysconfdir=/etc" + "--localstatedir=/var" ]; buildInputs = [ openssl ]; diff --git a/pkgs/tools/networking/openntpd/no-install.patch b/pkgs/tools/networking/openntpd/no-install.patch new file mode 100644 index 00000000000..0194e414062 --- /dev/null +++ b/pkgs/tools/networking/openntpd/no-install.patch @@ -0,0 +1,26 @@ +diff --git a/Makefile.in b/Makefile.in +index 81549cf..1262bbf 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1740,21 +1740,6 @@ uninstall-man: uninstall-man5 uninstall-man8 + + install-exec-hook: + @ln -f "$(DESTDIR)$(sbindir)/ntpd" "$(DESTDIR)$(sbindir)/ntpctl" +- @if [ ! -d "$(DESTDIR)$(sysconfdir)" ]; then \ +- $(INSTALL) -m 755 -d "$(DESTDIR)$(sysconfdir)"; \ +- fi +- @if [ ! -d "$(DESTDIR)$(localstatedir)/run" ]; then \ +- $(INSTALL) -m 755 -d "$(DESTDIR)$(localstatedir)/run"; \ +- fi +- @if [ ! -d "$(DESTDIR)$(localstatedir)/db" ]; then \ +- $(INSTALL) -m 755 -d "$(DESTDIR)$(localstatedir)/db"; \ +- fi +- @if [ ! -f "$(DESTDIR)$(sysconfdir)/ntpd.conf" ]; then \ +- $(INSTALL) -m 644 "$(srcdir)/ntpd.conf" "$(DESTDIR)$(sysconfdir)/ntpd.conf"; \ +- else \ +- echo; \ +- echo " $(DESTDIR)$(sysconfdir)/ntpd.conf already exists, install will not overwrite"; \ +- fi + @if [ ! -d "$(PRIVSEP_PATH)" ]; then \ + echo; \ + echo " Please created a privilege separation directory for ntpd." ; \ -- cgit 1.4.1