File: upload_rules.mk

package info (click to toggle)
python-slip 0.6.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 252 kB
  • sloc: python: 951; makefile: 61
file content (47 lines) | stat: -rw-r--r-- 823 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# License: GPL v2 or later
# Copyright Red Hat Inc. 2008, 2015

ifndef UPLOAD_METHOD
UPLOAD_METHOD = scp
endif

PKGARCHIVE=$(PKGNAME)-$(PKGVERSION).tar.bz2

ifeq ($(UPLOAD_METHOD),scp)
ifdef UNSTABLE

upload:
	@echo Use of target \'$@\' not possible in unstable branch. >&2
	@exit 1

else ifdef UPLOAD_URL

upload:
	@url="$(UPLOAD_URL)"; \
	case "$$url" in \
	ssh://*) \
		url="$${url#ssh://}"; \
		userhostname="$${url%%/*}"; \
		path="$${url#*/}"; \
		echo Copying "$(PKGNAME)-$(PKGVERSION).tar.bz2" to "$$userhostname:$$path"; \
		scp "$(PKGNAME)-$(PKGVERSION).tar.bz2" "$$userhostname:$$path"; \
		;; \
	*) \
		echo Unknown method. >&2; \
		exit 1; \
		;; \
	esac

else

upload:
	@echo "UPLOAD_URL undefined!" >&2
	@false

endif
else ifeq ($(UPLOAD_METHOD),github)

include github_rules.mk
upload:	github-upload

endif