diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2022-10-26 16:21:08 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2022-10-26 17:52:24 +0200 |
commit | 6a55eb5a2a7fe87a086e0a37013934b56e46ef19 (patch) | |
tree | cc46b0d6e68122f5648180c7e956ed93515075d7 /debian/rules | |
download | celestia-data-debian-master.tar.gz |
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b806bd7 --- /dev/null +++ b/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +%: + dh $@ + +PACKAGE := celestia-data +GIT_REPO := https://github.com/CelestiaProject/CelestiaContent.git +DEBIAN_PATH := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) +SRC_VERSION := $(shell dpkg-parsechangelog -l$(DEBIAN_PATH)/changelog | awk '/^Version:/ {sub(/-[^-]*/, "", $$2); print $$2}') +GIT_REVISION := $(shell echo $(SRC_VERSION) | sed -r 's,.+git\.(\w+).*,\1,') +TARBALL := $(PACKAGE)_$(SRC_VERSION).orig.tar.xz +.PHONY: get-orig-source +get-orig-source: + rm -rf get-orig-source $(TARBALL) && mkdir get-orig-source + git clone $(GIT_REPO) get-orig-source/$(PACKAGE)-$(SRC_VERSION) + git -C get-orig-source/$(PACKAGE)-$(SRC_VERSION) checkout $(GIT_REVISION) + find get-orig-source/$(PACKAGE)-$(SRC_VERSION) -name '.*' -print0 | xargs -0 --no-run-if-empty rm -rfv + cd get-orig-source/$(PACKAGE)-$(SRC_VERSION) && \ + rm -rf debian + tar cJf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION) + rm -rf get-orig-source + @echo " "$(TARBALL)" created; move it to the right destination to build the package" |