The slope language package manager https://slope.colorfield.space
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
slp/Makefile

37 lines
835 B

GOCMD := go
BINARY := slp
PREFIX := /usr/local
EXEC_PREFIX := ${PREFIX}
BINDIR := ${EXEC_PREFIX}/bin
DATAROOTDIR := ${PREFIX}/share
LIBDIR := ${PREFIX}/lib
MANDIR := ${DATAROOTDIR}/man
MAN1DIR := ${MANDIR}/man1
.PHONY: build
build:
${GOCMD} build -ldflags "-w -s" -o ${BINARY}
.PHONY: install
install: install-bin install-man install-module-dir clean
.PHONY: install-bin
install-bin: build
install -d ${DESTDIR}${BINDIR}
install -m 0755 ./${BINARY} ${DESTDIR}${BINDIR}
.PHONY: install-module-dir
install-module-dir:
-mkdir -p ${DESTDIR}${LIBDIR}/slope/modules
.PHONY: install-man
install-man: ${BINARY}.1
gzip -k ./${BINARY}.1
install -d ${DESTDIR}${MAN1DIR}
install -m 0644 ./${BINARY}.1.gz ${DESTDIR}${MAN1DIR}
.PHONY: clean
clean:
${GOCMD} clean
rm -f ./${BINARY}.1.gz 2> /dev/null
rm -f ./${BINARY}_* 2> /dev/null