-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
126 lines (100 loc) · 2.69 KB
/
Makefile
File metadata and controls
126 lines (100 loc) · 2.69 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# This file is auto generated by rsdk infra-package-update.
# DO NOT EDIT IT DIRECTLY!
# Custom rules should be placed in .github/local/Makefile.local
-include .github/local/Makefile.local
-include Makefile.extra
PROJECT ?= rsetup
CUSTOM_DEBUILD_ENV ?= DEB_BUILD_OPTIONS='parallel=1'
CUSTOM_DEBUILD_ARG ?=
.DEFAULT_GOAL := all
.PHONY: all
all: build
.PHONY: devcontainer_setup
devcontainer_setup: pre_build_dep main_build_dep post_build_dep
.PHONY: pre_build_dep
pre_build_dep:
.PHONY: main_build_dep
main_build_dep:
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install -y crossbuild-essential-arm64 binfmt-support qemu-user-static
sudo apt-get build-dep . -y
.PHONY: post_build_dep
post_build_dep:
.PHONY: arm64_crossbuild_dep
arm64_crossbuild_dep:
sudo apt-get build-dep . -y --host-architecture arm64
#
# Test
#
.PHONY: test
test:
#
# Build
#
.PHONY: build
build: pre_build main_build post_build
.PHONY: pre_build
pre_build:
# Fix file permissions when created from template
chmod +x debian/rules
.PHONY: main_build
main_build:
.PHONY: post_build
post_build:
#
# Documentation
#
.PHONY: serve
serve:
mdbook serve
.PHONY: serve_zh-CN
serve_zh-CN:
MDBOOK_BOOK__LANGUAGE=zh-CN mdbook serve -d book/zh-CN
PO_LOCALE := zh-CN
.PHONY: translate
translate:
MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' mdbook build -d po
cd po; \
for i in $(PO_LOCALE); \
do \
if [ ! -f $$i.po ]; \
then \
msginit -l $$i --no-translator; \
else \
msgmerge --update $$i.po messages.pot; \
fi \
done
#
# Clean
#
.PHONY: distclean
distclean: clean
.PHONY: clean
clean: clean-deb
.PHONY: clean-deb
clean-deb:
rm -rf debian/.debhelper debian/$(PROJECT)*/ debian/tmp/ debian/debhelper-build-stamp debian/files debian/*.debhelper.log debian/*.*.debhelper debian/*.substvars
#
# Release
#
.PHONY: dch
dch: debian/changelog
gbp dch --ignore-branch --multimaint-merge --release --spawn-editor=never \
--git-log='--no-merges --perl-regexp --invert-grep --grep=^(chore:\stemplates\sgenerated)' \
--dch-opt=--upstream --commit --commit-msg="feat: release %(version)s"
.PHONY: deb
deb: debian pre_debuild debuild post_debuild
.PHONY: pre_debuild
pre_debuild:
.PHONY: debuild
debuild:
$(CUSTOM_DEBUILD_ENV) debuild --no-lintian --lintian-hook "lintian --fail-on error,warning --suppress-tags-from-file $(PWD)/debian/common-lintian-overrides -- %p_%v_*.changes" --no-sign -b $(CUSTOM_DEBUILD_ARG)
.PHONY: post_debuild
post_debuild:
.PHONY: release
release:
gh workflow run .github/workflows/new_version.yaml --ref $(shell git branch --show-current)
# This file is auto generated by rsdk infra-package-update.
# DO NOT EDIT IT DIRECTLY!
# Custom rules should be placed in .github/local/Makefile.local