summaryrefslogtreecommitdiff
path: root/packaging/debs/apt-repository/Makefile
diff options
context:
space:
mode:
authordcorbacho <dparracorbacho@piotal.io>2020-11-18 14:27:41 +0000
committerdcorbacho <dparracorbacho@piotal.io>2020-11-18 14:27:41 +0000
commitf23a51261d9502ec39df0f8db47ba6b22aa7659f (patch)
tree53dcdf46e7dc2c14e81ee960bce8793879b488d3 /packaging/debs/apt-repository/Makefile
parentafa2c2bf6c7e0e9b63f4fb53dc931c70388e1c82 (diff)
parent9f6d64ec4a4b1eeac24d7846c5c64fd96798d892 (diff)
downloadrabbitmq-server-git-stream-timestamp-offset.tar.gz
Merge remote-tracking branch 'origin/master' into stream-timestamp-offsetstream-timestamp-offset
Diffstat (limited to 'packaging/debs/apt-repository/Makefile')
-rw-r--r--packaging/debs/apt-repository/Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/packaging/debs/apt-repository/Makefile b/packaging/debs/apt-repository/Makefile
new file mode 100644
index 0000000000..dbf8871a51
--- /dev/null
+++ b/packaging/debs/apt-repository/Makefile
@@ -0,0 +1,31 @@
+PACKAGES_DIR ?= ../../../PACKAGES
+REPO_DIR ?= debian
+
+SIGNING_KEY ?= default
+
+ifeq "$(UNOFFICIAL_RELEASE)" ""
+HOME_ARG = HOME=$(GNUPG_PATH)
+endif
+
+all: debian_apt_repository
+
+clean:
+ rm -rf $(REPO_DIR)
+
+CAN_HAS_REPREPRO=$(shell [ -f /usr/bin/reprepro ] && echo true)
+ifeq ($(CAN_HAS_REPREPRO), true)
+debian_apt_repository: clean
+ mkdir -p $(REPO_DIR)/conf
+ cp -a distributions $(REPO_DIR)/conf
+ifeq "$(UNOFFICIAL_RELEASE)" ""
+ echo SignWith: $(SIGNING_KEY) >> $(REPO_DIR)/conf/distributions
+endif
+ for FILE in $(PACKAGES_DIR)/*.changes ; do \
+ $(HOME_ARG) reprepro --ignore=wrongdistribution \
+ -Vb $(REPO_DIR) include kitten $${FILE} ; \
+ done
+ reprepro -Vb $(REPO_DIR) createsymlinks
+else
+debian_apt_repository:
+ @echo Not building APT repository as reprepro could not be found
+endif