public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/fifo-cronolog:master commit in: /
Date: Wed, 13 Mar 2024 04:52:01 +0000 (UTC)	[thread overview]
Message-ID: <1710305497.80ac76208eade31ad0df6b347481049c20608a39.robbat2@gentoo> (raw)

commit:     80ac76208eade31ad0df6b347481049c20608a39
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 13 04:51:37 2024 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Mar 13 04:51:37 2024 +0000
URL:        https://gitweb.gentoo.org/proj/fifo-cronolog.git/commit/?id=80ac7620

build: add hacky dist rule

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 .gitignore | 4 +++-
 Makefile   | 8 ++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 29b8ac9..718dc26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
-
 *.o
 fifo-cronolog
+*.tgz
+*.tar.gz
+*.tar

diff --git a/Makefile b/Makefile
index 7894e74..74c132a 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,14 @@ BINDIR = /usr/sbin/
 SYSTEMD_TARGET = /usr/lib/systemd/system/
 SYSTEMD_UNIT = systemd/fifo-cronolog@.service
 
+VERSION = $(shell awk -F'"' '/#define VERSION/{print $$2}' $(SRC) )
+DISTFILE_EXT = tar.gz
+DISTFILE = $(BIN)-$(VERSION).$(DISTFILE_EXT)
+
+dist:
+	if test -e $(DISTFILE) ; then echo "$(DISTFILE) already exists" ; exit 1 ; fi
+	git archive --format $(DISTFILE_EXT) --prefix $(BIN)-$(VERSION)/ v$(VERSION) >$(DISTFILE).tmp && mv $(DISTFILE).tmp $(DISTFILE)
+
 all: $(BIN)
 
 $(BIN): $(OBJ)


             reply	other threads:[~2024-03-13  4:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  4:52 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-12 18:14 [gentoo-commits] proj/fifo-cronolog:master commit in: / Robin H. Johnson
2024-03-12 18:14 Robin H. Johnson
2024-03-12 18:14 Robin H. Johnson
2024-03-12 18:14 Robin H. Johnson

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1710305497.80ac76208eade31ad0df6b347481049c20608a39.robbat2@gentoo \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox