diff options
| author | Marc Vertes <mvertes@free.fr> | 2022-01-15 15:11:21 +0000 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2022-01-15 15:11:21 +0000 |
| commit | 91ab9920cae1b0d80e6d108001b03a706f5ef2ba (patch) | |
| tree | 4cce3b2826c805873268fdcf4513eb55a93c737d | |
| parent | 76fb383a3f6426be3190947ebf808a17e51a4ddf (diff) | |
add patch command, add sntpc
| -rw-r--r-- | build.mk | 10 | ||||
| -rw-r--r-- | sntpc/.patch | 0 | ||||
| -rw-r--r-- | sntpc/Makefile | 6 | ||||
| -rw-r--r-- | sntpc/sntpc.service | 9 |
4 files changed, 23 insertions, 2 deletions
@@ -10,6 +10,7 @@ arc ?= $(notdir $(url)) configure_cmd ?= ./configure build_cmd ?= make +inflate_cmd ?= gunzip install_cmd ?= sudo make install uninstall_cmd ?= sudo make uninstall @@ -19,7 +20,7 @@ ifdef git_url dir ?= $(notdir $(git_url)) else fetch_cmd = curl -L $(url) -o $(arc) - extract_cmd = gunzip < $(arc) | tar xf - + extract_cmd = $(inflate_cmd) < $(arc) | tar xf - dir ?= $(basename $(basename $(arc))) endif @@ -37,6 +38,7 @@ uninstall: .install install: .install build: .build configure: .configure +patch: .patch extract: .extract fetch: .fetch @@ -48,10 +50,14 @@ fetch: .fetch cd $(dir) && $(build_cmd) @touch $@ -.configure: .extract +.configure: .patch cd $(dir) && $(configure_cmd) $(configure_flags) @touch $@ +.patch: .extract + cd $(dir) && for f in ../*.patch; do patch -p1 < $$f || break; done + @touch $@ + .extract: .fetch $(extract_cmd) @touch $@ diff --git a/sntpc/.patch b/sntpc/.patch new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/sntpc/.patch diff --git a/sntpc/Makefile b/sntpc/Makefile new file mode 100644 index 0000000..2b8472d --- /dev/null +++ b/sntpc/Makefile @@ -0,0 +1,6 @@ +url = https://dev.alpinelinux.org/archive/sntpc/sntpc-0.9.tar.xz +configure_cmd = : +inflate_cmd = xz -cd +install_cmd = : + +include ../build.mk diff --git a/sntpc/sntpc.service b/sntpc/sntpc.service new file mode 100644 index 0000000..3c99322 --- /dev/null +++ b/sntpc/sntpc.service @@ -0,0 +1,9 @@ +[Unit] +Description=A simple NTP client for VMs + +[Service] +Type=simple +ExecStart=/usr/local/bin/sntpc -i 30 pool.ntp.org + +[Install] +WantedBy=multi-user.target |
