Compare commits

..

No commits in common. "3a62f23db5b780596afe341d7244687a021498d8" and "0858a4963634206dff95674db9876fb2f4d358ae" have entirely different histories.

2 changed files with 31 additions and 20 deletions

View File

@ -1,26 +1,38 @@
# Installation paths SHELL = /bin/bash
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
SYSCONFDIR := $(PREFIX)/etc
# Compilers and tools ifeq ($(PREFIX),)
GO ?= $(shell which go) PREFIX := /usr/local
endif
ifeq ($(BINDIR),)
BINDIR := $(PREFIX)/bin
endif
ifeq ($(SYSCONFDIR),)
SYSCONFDIR := $(PREFIX)/etc
endif
ifeq ($(GO),)
GO := $(shell type -a -P go | head -n 1)
endif
build: build:
mkdir -p build mkdir -p build
cd src/bpm; $(GO) build -ldflags "-w" -o ../../build/bpm git.enumerated.dev/bubble-package-manager/bpm/src/bpm cd src/bpm; $(GO) build -ldflags "-w" -o ../../build/bpm git.enumerated.dev/bubble-package-manager/bpm/src/bpm
install: build/bpm config/ install: build/bpm config/
# Create directories mkdir -p $(DESTDIR)$(BINDIR)
install -dm755 $(DESTDIR)$(BINDIR) mkdir -p $(DESTDIR)$(SYSCONFDIR)
install -dm755 $(DESTDIR)$(SYSCONFDIR) cp build/bpm $(DESTDIR)$(BINDIR)/bpm
# Install files cp config/bpm.conf $(DESTDIR)$(SYSCONFDIR)/bpm.conf
install -Dm755 build/bpm $(DESTDIR)$(BINDIR)/bpm
install -Dm644 config/bpm.conf $(DESTDIR)$(SYSCONFDIR)/bpm.conf
uninstall: compress: build/bpm config/
rm $(DESTDIR)$(BINDIR)/bpm mkdir -p bpm/$(BINDIR)
rm $(DESTDIR)$(SYSCONFDIR)/bpm.conf mkdir -p bpm/$(SYSCONFDIR)
cp build/bpm bpm/$(BINDIR)/bpm
cp config/bpm.conf bpm/$(SYSCONFDIR)/bpm.conf
tar --owner=root --group=root -czf bpm.tar.gz bpm
rm -r bpm
run: build/bpm
build/bpm
clean: clean:
rm -r build/ rm -r build/

View File

@ -14,13 +14,12 @@ BPM is still in very early development. Do not install it without knowing what y
- Download `go` from your package manager or from the go website - Download `go` from your package manager or from the go website
- Download `make` from your package manager - Download `make` from your package manager
- Download `which` from your package manager - Run the following command to compile the project
- Run the following command to compile the project. You may need to set the `GO` environment variable if your Go installation is not in your PATH ```
```sh
make make
``` ```
- Run the following command to install BPM into your system. You may also append a DESTDIR variable at the end of this line if you wish to install in a different location - Run the following command to install BPM into your system. You may also append a DESTDIR variable at the end of this line if you wish to install in a different location
```sh ```
make install PREFIX=/usr SYSCONFDIR=/etc make install PREFIX=/usr SYSCONFDIR=/etc
``` ```
@ -56,7 +55,7 @@ bpm update
``` ```
For information on the rest of the commands simply use the help command or pass in no arguments at all For information on the rest of the commands simply use the help command or pass in no arguments at all
```sh ```
bpm help bpm help
``` ```