Compare commits
3 Commits
0858a49636
...
3a62f23db5
Author | SHA1 | Date | |
---|---|---|---|
3a62f23db5 | |||
d9d85b4943 | |||
877fba8767 |
42
Makefile
42
Makefile
@ -1,38 +1,26 @@
|
|||||||
SHELL = /bin/bash
|
# Installation paths
|
||||||
|
PREFIX ?= /usr/local
|
||||||
|
BINDIR ?= $(PREFIX)/bin
|
||||||
|
SYSCONFDIR := $(PREFIX)/etc
|
||||||
|
|
||||||
ifeq ($(PREFIX),)
|
# Compilers and tools
|
||||||
PREFIX := /usr/local
|
GO ?= $(shell which go)
|
||||||
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/
|
||||||
mkdir -p $(DESTDIR)$(BINDIR)
|
# Create directories
|
||||||
mkdir -p $(DESTDIR)$(SYSCONFDIR)
|
install -dm755 $(DESTDIR)$(BINDIR)
|
||||||
cp build/bpm $(DESTDIR)$(BINDIR)/bpm
|
install -dm755 $(DESTDIR)$(SYSCONFDIR)
|
||||||
cp config/bpm.conf $(DESTDIR)$(SYSCONFDIR)/bpm.conf
|
# Install files
|
||||||
|
install -Dm755 build/bpm $(DESTDIR)$(BINDIR)/bpm
|
||||||
|
install -Dm644 config/bpm.conf $(DESTDIR)$(SYSCONFDIR)/bpm.conf
|
||||||
|
|
||||||
compress: build/bpm config/
|
uninstall:
|
||||||
mkdir -p bpm/$(BINDIR)
|
rm $(DESTDIR)$(BINDIR)/bpm
|
||||||
mkdir -p bpm/$(SYSCONFDIR)
|
rm $(DESTDIR)$(SYSCONFDIR)/bpm.conf
|
||||||
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/
|
||||||
|
@ -14,12 +14,13 @@ 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
|
||||||
- Run the following command to compile the project
|
- Download `which` from your package manager
|
||||||
```
|
- 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
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -55,7 +56,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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user