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 */.) SUBDIRS := $(wildcard */.)
prefix = /usr VERSION = 24.04
install: install:
@for dir in $(SUBDIRS) ; do \ @for dir in $(SUBDIRS) ; do \
$(MAKE) -C "$$dir" install ; \ $(MAKE) -C "$$dir" VERSION=\"$(VERSION)\" install ; \
done done
uninstall: uninstall:

View File

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

View File

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

View File

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

View File

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

View File

@ -83,7 +83,7 @@ check_hash() {
# prints the help info # prints the help info
help_cmd() { 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 "Usage: ${0} <options> [package directory]"
info "Options:" info "Options:"
echo_color " $BOLD--no-depend$RESET: don't check depends" echo_color " $BOLD--no-depend$RESET: don't check depends"

View File

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

View File

@ -35,7 +35,7 @@ fi
#################### ####################
# prints the help info # prints the help info
help_cmd() { 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 "Usage: ${0} <options> [pool directory] <packages>"
info "Options:" info "Options:"
echo_color " $BOLD--skip-fail$RESET: skip if a package build fails" echo_color " $BOLD--skip-fail$RESET: skip if a package build fails"

View File

@ -1,7 +1,11 @@
PREFIX = /usr PREFIX = /usr
# set by mtsc Makefile
VERSION = 0
install: 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: uninstall:
rm $(DESTDIR)/$(PREFIX)/lib/mtsc-common.sh rm $(DESTDIR)/$(PREFIX)/lib/mtsc-common.sh

View File

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