refine make system for packages

这个提交包含在:
Hal Emmerich 2020-06-12 20:23:04 -05:00
父节点 833b9a16d3
当前提交 1c4edc13b7
共有 10 个文件被更改,包括 69 次插入18 次删除

查看文件

@ -23,13 +23,9 @@ endif
OUTNAME=PrawnOS-$(PRAWNOS_SUITE)-c201.img OUTNAME=PrawnOS-$(PRAWNOS_SUITE)-c201.img
BASE=$(OUTNAME)-BASE BASE=$(OUTNAME)-BASE
PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
include $(PRAWNOS_ROOT)/scripts/common.mk
PRAWNOS_ROOT := $(shell pwd)
PBUILDER_CHROOT=$(PRAWNOS_ROOT)/build/prawnos-pbuilder-armhf-base.tgz
PBUILDER_RC=$(PRAWNOS_ROOT)/resources/BuildResources/pbuilder/prawnos-pbuilder.rc
# Otherwise errors are ignored when output is piped to tee:
SHELL=/bin/bash -o pipefail
#Usage: #Usage:
#run make image #run make image
@ -123,6 +119,11 @@ filesystem:
[ -f $(BASE) ] || ./scripts/buildFilesystem.sh $(KVER) $(DEBIAN_SUITE) $(BASE) 2>&1 | tee build/logs/fs-log.txt [ -f $(BASE) ] || ./scripts/buildFilesystem.sh $(KVER) $(DEBIAN_SUITE) $(BASE) 2>&1 | tee build/logs/fs-log.txt
#:::::::::::::::::::::::::::::: packages ::::::::::::::::::::::::::::::::
.PHONY: packages
packages:
cd packages && $(MAKE)
#:::::::::::::::::::::::::::::: image management :::::::::::::::::::::::::: #:::::::::::::::::::::::::::::: image management ::::::::::::::::::::::::::
.PHONY: kernel_inject .PHONY: kernel_inject
@ -152,7 +153,7 @@ image:
pbuilder_create: pbuilder_create:
$(MAKE) $(PBUILDER_CHROOT) $(MAKE) $(PBUILDER_CHROOT)
$(PBUILDER_CHROOT): $(PBUILDER_RC) $(PBUILDER_CHROOT):
pbuilder create --basetgz $(PBUILDER_CHROOT) --configfile $(PBUILDER_RC) pbuilder create --basetgz $(PBUILDER_CHROOT) --configfile $(PBUILDER_RC)
#TODO: should only update if not updated for a day #TODO: should only update if not updated for a day

查看文件

@ -1,7 +1,11 @@
all: font-source-code-pro-deb #import all shared make vars
PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
include $(PRAWNOS_ROOT)/scripts/common.mk
.PHONY: font-source-code-pro-deb VERSION := $(shell cd src/; dpkg-parsechangelog --show-field Version)
font-source-code-pro-deb:
font-source-code-pro_$(VERSION)_all.deb:
@echo Building $@
cd src/; debuild -us -uc cd src/; debuild -us -uc
.PHONY: clean .PHONY: clean

查看文件

@ -1,3 +1,6 @@
PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
include $(PRAWNOS_ROOT)/scripts/common.mk
SUBDIRS = $(shell ls -d */) SUBDIRS = $(shell ls -d */)
all: all:
@ -9,4 +12,4 @@ all:
clean: clean:
for dir in $(SUBDIRS) ; do \ for dir in $(SUBDIRS) ; do \
make clean -C $$dir ; \ make clean -C $$dir ; \
done done

查看文件

@ -1,12 +1,12 @@
SHELL := /bin/bash #import all shared make vars
PRAWNOS_ROOT := $(shell cd ../../../; pwd) PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
PBUILDER_CHROOT=$(PRAWNOS_ROOT)/build/prawnos-pbuilder-armhf-base.tgz include $(PRAWNOS_ROOT)/scripts/common.mk
PBUILDER_RC=$(PRAWNOS_ROOT)/resources/BuildResources/pbuilder/prawnos-pbuilder.rc
all: xsecurelock-deb
.PHONY: xsecurelock-deb VERSION := $(shell cd src/; dpkg-parsechangelog --show-field Version)
xsecurelock-deb:
xsecurelock_$(VERSION)_armhf.deb:
@echo Building $@
cd src/; pdebuild --configfile $(PBUILDER_RC) \ cd src/; pdebuild --configfile $(PBUILDER_RC) \
--buildresult .. \ --buildresult .. \
-- \ -- \

查看文件

@ -0,0 +1,5 @@
PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
include $(PRAWNOS_ROOT)/scripts/common.mk
all:
@echo TODO

5
packages/kernel/makefile 普通文件
查看文件

@ -0,0 +1,5 @@
PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
include $(PRAWNOS_ROOT)/scripts/common.mk
all:
@echo TODO

15
packages/makefile 普通文件
查看文件

@ -0,0 +1,15 @@
PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
include $(PRAWNOS_ROOT)/scripts/common.mk
SUBDIRS = $(shell ls -d */)
all:
for dir in $(SUBDIRS) ; do \
make -C $$dir ; \
done
clean:
for dir in $(SUBDIRS) ; do \
make clean -C $$dir ; \
done

查看文件

@ -42,6 +42,12 @@ make
``` ```
the resulting .deb will be in that same folder when the build is complete the resulting .deb will be in that same folder when the build is complete
All packages can be built by running
```
make
```
from the packages directory
### Uploading packages ### Uploading packages
New packages, and package updates can upload to `deb.prawnos.com` by maintainers New packages, and package updates can upload to `deb.prawnos.com` by maintainers
first by building and then running first by building and then running

查看文件

@ -248,6 +248,7 @@ chroot $outmnt apt install -y libinput-tools xdotool build-essential
PRAWN_ROOT=$(pwd) PRAWN_ROOT=$(pwd)
cd $XSECURELOCK_PATH && make cd $XSECURELOCK_PATH && make
cd $PRAWN_ROOT cd $PRAWN_ROOT
#TODO: replace with cd packages && make install $outmnt/var/cache/apt/archives/
cp $XSECURELOCK_PATH/xsecurelock_*_armhf.deb $outmnt/var/cache/apt/archives/ cp $XSECURELOCK_PATH/xsecurelock_*_armhf.deb $outmnt/var/cache/apt/archives/
chroot $outmnt apt install -y -d xsecurelock chroot $outmnt apt install -y -d xsecurelock

11
scripts/common.mk 可执行文件
查看文件

@ -0,0 +1,11 @@
ifndef COMMON_MK
COMMON_MK := 1
#Place all shared make vars below
#=========================================================================================
PBUILDER_CHROOT := $(PRAWNOS_ROOT)/build/prawnos-pbuilder-armhf-base.tgz
PBUILDER_RC := $(PRAWNOS_ROOT)/resources/BuildResources/pbuilder/prawnos-pbuilder.rc
# Otherwise errors are ignored when output is piped to tee:
SHELL := /bin/bash -o pipefail
#=========================================================================================
endif # COMMON_MK