refine make system for packages
This commit is contained in:
parent
833b9a16d3
commit
1c4edc13b7
15
makefile
15
makefile
@ -23,13 +23,9 @@ endif
|
||||
OUTNAME=PrawnOS-$(PRAWNOS_SUITE)-c201.img
|
||||
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:
|
||||
#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
|
||||
|
||||
|
||||
#:::::::::::::::::::::::::::::: packages ::::::::::::::::::::::::::::::::
|
||||
.PHONY: packages
|
||||
packages:
|
||||
cd packages && $(MAKE)
|
||||
|
||||
#:::::::::::::::::::::::::::::: image management ::::::::::::::::::::::::::
|
||||
|
||||
.PHONY: kernel_inject
|
||||
@ -152,7 +153,7 @@ image:
|
||||
pbuilder_create:
|
||||
$(MAKE) $(PBUILDER_CHROOT)
|
||||
|
||||
$(PBUILDER_CHROOT): $(PBUILDER_RC)
|
||||
$(PBUILDER_CHROOT):
|
||||
pbuilder create --basetgz $(PBUILDER_CHROOT) --configfile $(PBUILDER_RC)
|
||||
|
||||
#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
|
||||
font-source-code-pro-deb:
|
||||
VERSION := $(shell cd src/; dpkg-parsechangelog --show-field Version)
|
||||
|
||||
font-source-code-pro_$(VERSION)_all.deb:
|
||||
@echo Building $@
|
||||
cd src/; debuild -us -uc
|
||||
|
||||
.PHONY: clean
|
||||
|
@ -1,3 +1,6 @@
|
||||
PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
|
||||
include $(PRAWNOS_ROOT)/scripts/common.mk
|
||||
|
||||
SUBDIRS = $(shell ls -d */)
|
||||
|
||||
all:
|
@ -1,12 +1,12 @@
|
||||
SHELL := /bin/bash
|
||||
PRAWNOS_ROOT := $(shell cd ../../../; pwd)
|
||||
PBUILDER_CHROOT=$(PRAWNOS_ROOT)/build/prawnos-pbuilder-armhf-base.tgz
|
||||
PBUILDER_RC=$(PRAWNOS_ROOT)/resources/BuildResources/pbuilder/prawnos-pbuilder.rc
|
||||
#import all shared make vars
|
||||
PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
|
||||
include $(PRAWNOS_ROOT)/scripts/common.mk
|
||||
|
||||
all: xsecurelock-deb
|
||||
|
||||
.PHONY: xsecurelock-deb
|
||||
xsecurelock-deb:
|
||||
VERSION := $(shell cd src/; dpkg-parsechangelog --show-field Version)
|
||||
|
||||
xsecurelock_$(VERSION)_armhf.deb:
|
||||
@echo Building $@
|
||||
cd src/; pdebuild --configfile $(PBUILDER_RC) \
|
||||
--buildresult .. \
|
||||
-- \
|
||||
|
5
packages/initramfs/makefile
Normal file
5
packages/initramfs/makefile
Normal file
@ -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
Normal file
5
packages/kernel/makefile
Normal file
@ -0,0 +1,5 @@
|
||||
PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel)
|
||||
include $(PRAWNOS_ROOT)/scripts/common.mk
|
||||
|
||||
all:
|
||||
@echo TODO
|
15
packages/makefile
Normal file
15
packages/makefile
Normal file
@ -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
|
||||
|
||||
All packages can be built by running
|
||||
```
|
||||
make
|
||||
```
|
||||
from the packages directory
|
||||
|
||||
### Uploading packages
|
||||
New packages, and package updates can upload to `deb.prawnos.com` by maintainers
|
||||
first by building and then running
|
||||
|
@ -248,6 +248,7 @@ chroot $outmnt apt install -y libinput-tools xdotool build-essential
|
||||
PRAWN_ROOT=$(pwd)
|
||||
cd $XSECURELOCK_PATH && make
|
||||
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/
|
||||
chroot $outmnt apt install -y -d xsecurelock
|
||||
|
||||
|
11
scripts/common.mk
Executable file
11
scripts/common.mk
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user