diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 39 |
1 files changed, 20 insertions, 19 deletions
@@ -1,25 +1,26 @@ +BIN?=jnfilter +PREFIX?=/usr/local +BINDIR?=$(PREFIX)/bin -rpm: rpm_dist - rpmbuild -bb \ - ./build/bdist.linux-x86_64/rpm/SPECS/jnfilter.spec \ - --define "_topdir $(PWD)/build/bdist.linux-x86_64/rpm/" +OUT=./bin/$(BIN) +SERVER=./main.go -rpm_dist: - python setup.py bdist_rpm +GO_BUILD=go build -v -ldflags '-w -s' +GO_RUN=go run -v +all: build -clean: - python setup.py clean --all - rm -rf dist jnfilter.egg-info +install: build + install -Dm755 $(OUT) $(BINDIR)/$(BIN) -docs: - pandoc -s \ - --include-in-header=docs/bamboo.min.css \ - --metadata title="Filtro para Nerdcast" \ - --template docs/template.html \ - -s README.md \ - -o index.html +build: + $(GO_BUILD) -o $(OUT) $(SERVER) -install_deps: - dnf install -y rpmdevtools rpmlint python +compress: build + upx -1 $(OUT) + +compress_into_oblivion: build + upx --best --ultra-brute $(OUT) + +run: sass tmpl + $(GO_RUN) $(SERVER) -.PHONY: docs |