-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathupload_rules.mk
More file actions
47 lines (36 loc) · 823 Bytes
/
upload_rules.mk
File metadata and controls
47 lines (36 loc) · 823 Bytes
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