-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMkpmfile
85 lines (69 loc) · 2.15 KB
/
Mkpmfile
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
# File: /Mkpmfile
# Project: linux-factory
# File Created: 12-05-2023 06:06:17
# Author: Clay Risser
# -----
# BitSpur (c) Copyright 2021 - 2023
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
include $(MKPM)/mkpm
include $(MKPM)/gnu
include $(MKPM)/chain
include $(MKPM)/envcache
include $(MKPM)/dotenv
include $(MKPM)/python
export EXPORT_GPG_KEY := sh $(SCRIPTS_PATH)/export-gpg-key.sh
CLOC ?= cloc
ACTIONS += deps
DEPS_TARGETS := $(VENV)/bin/python
$(ACTION)/deps: pyproject.toml poetry.lock
@$(call poetry_install_dev)
@$(call done,$@)
ACTIONS += format~deps ##
$(ACTION)/format: $(call git_deps,\.(py)$$)
@$(call black_format,$?,$(FORMAT_ARGS))
@$(call done,$@)
.PHONY: build
build: sudo ~deps ##
@$(SUDO) $(PYTHON) src/main.py $(ARGS)
@$(CP) .build/lb/*.iso .
.PHONY: clean
clean: sudo
@$(MKCHAIN_CLEAN)
@$(SUDO) $(GIT) clean -fXd \
$(MKPM_GIT_CLEAN_FLAGS)
.PHONY: purge
purge: clean
@$(GIT) clean -fXd
.PHONY: test-lang
test-lang: ##
@grep-dctrl -Ftest-lang $(ARGS) /usr/share/tasksel/descs/debian-tasks.desc -sTask
.PHONY: enhances
enhances: ##
@grep-dctrl -FEnhances $(ARGS) /usr/share/tasksel/descs/debian-tasks.desc -sTask
.PHONY: layouts
layouts: ##
@egrep -i '(^!|$(ARGS))' /usr/share/X11/xkb/rules/base.lst
.PHONY: trust-gpg-key
trust-gpg-key: ##
@$(EXPORT_GPG_KEY) $(ARGS) config-overrides/archives/$(ARGS).key.chroot
.PHONY: count
count:
@$(CLOC) $(shell ($(GIT) ls-files && ($(GIT) lfs ls-files | $(CUT) -d' ' -f3)) | $(SORT) | $(UNIQ) -u | $(GREP) -vE '\.tar(\.gz)?$$')
.PHONY: fix-permissions
fix-permissions:
@$(SUDO) $(CHOWN) -R $(USER):$(USER) .build
.PHONY: lb/%
lb/%:
@$(MAKE) -sC .build/lb $(subst lb/,,$@) ARGS=$(ARGS)
-include $(call chain)