new: MTSC_VERSION variable

This commit is contained in:
ngn 2024-08-18 21:49:31 +03:00
parent a9057cb874
commit e753a86325
10 changed files with 19 additions and 10 deletions

View File

@ -1,9 +1,9 @@
SUBDIRS := $(wildcard */.)
prefix = /usr
VERSION = 24.04
install:
@for dir in $(SUBDIRS) ; do \
$(MAKE) -C "$$dir" install ; \
$(MAKE) -C "$$dir" VERSION=\"$(VERSION)\" install ; \
done
uninstall:

View File

@ -1,7 +1,7 @@
PREFIX = /usr
install:
install -m755 "main.sh" $(DESTDIR)/$(PREFIX)/bin/matter-base
install -Dm755 "main.sh" $(DESTDIR)/$(PREFIX)/bin/matter-base
uninstall:
rm $(DESTDIR)/$(PREFIX)/lib/matter-base

View File

@ -1,7 +1,7 @@
PREFIX = /usr
install:
install -m755 "main.sh" $(DESTDIR)/$(PREFIX)/bin/matter-chroot
install -Dm755 "main.sh" $(DESTDIR)/$(PREFIX)/bin/matter-chroot
uninstall:
rm $(DESTDIR)/$(PREFIX)/lib/matter-chroot

View File

@ -1,7 +1,7 @@
PREFIX = /usr
install:
install -m755 "main.sh" $(DESTDIR)/$(PREFIX)/bin/matter-iso
install -Dm755 "main.sh" $(DESTDIR)/$(PREFIX)/bin/matter-iso
uninstall:
rm $(DESTDIR)/$(PREFIX)/lib/matter-iso

View File

@ -4,7 +4,7 @@ PREFIX = /usr
install:
@for s in $(SCRIPTS) ; do \
echo "installing script: $$s" ; \
install -m755 "scripts/$$s.sh" $(DESTDIR)/$(PREFIX)/bin/$$s ; \
install -Dm755 "scripts/$$s.sh" $(DESTDIR)/$(PREFIX)/bin/$$s ; \
done
uninstall:

View File

@ -83,7 +83,7 @@ check_hash() {
# prints the help info
help_cmd() {
info "MatterLinux package build script"
info "MatterLinux package build script (mtsc ${MTSC_VERSION})" # sourced from mtsc-common
info "Usage: ${0} <options> [package directory]"
info "Options:"
echo_color " $BOLD--no-depend$RESET: don't check depends"

View File

@ -4,7 +4,7 @@ PREFIX = /usr
install:
@for s in $(SCRIPTS) ; do \
echo "installing script: $$s" ; \
install -m755 "scripts/$$s.sh" $(DESTDIR)/$(PREFIX)/bin/$$s ; \
install -Dm755 "scripts/$$s.sh" $(DESTDIR)/$(PREFIX)/bin/$$s ; \
done
uninstall:

View File

@ -35,7 +35,7 @@ fi
####################
# prints the help info
help_cmd() {
info "MatterLinux pool build script"
info "MatterLinux pool build script (mtsc ${MTSC_VERSION})" # sourced from mtsc-common
info "Usage: ${0} <options> [pool directory] <packages>"
info "Options:"
echo_color " $BOLD--skip-fail$RESET: skip if a package build fails"

View File

@ -1,7 +1,11 @@
PREFIX = /usr
# set by mtsc Makefile
VERSION = 0
install:
install -m755 "common.sh" $(DESTDIR)/$(PREFIX)/lib/mtsc-common.sh
install -Dm755 "common.sh" $(DESTDIR)/$(PREFIX)/lib/mtsc-common.sh
sed 's/MTSC_VERSION_HOLDER/$(VERSION)/g' -i $(DESTDIR)/$(PREFIX)/lib/mtsc-common.sh
uninstall:
rm $(DESTDIR)/$(PREFIX)/lib/mtsc-common.sh

View File

@ -24,6 +24,11 @@ if [ $? -eq 1 ]; then
exit 1
fi
#############
## version ##
#############
MTSC_VERSION="MTSC_VERSION_HOLDER"
############################
## logging functions/vars ##
############################