-
Notifications
You must be signed in to change notification settings - Fork 378
/
Makefile.packaging.mk
31 lines (25 loc) · 1.11 KB
/
Makefile.packaging.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# make tasks to create and publish packages
.PHONY: rpm deb packages deploy-packages
local-install:
$(MAKE) install PREFIX=usr DESTDIR="$(CURDIR)"
NAME=restclient-cpp
VERSION = $(shell git describe --tags --always --dirty)
BUILDER = $(shell echo "`git config user.name` <`git config user.email`>")
PKG_RELEASE ?= 1
PROJECT_URL="https://github.com/mrtazz/$(NAME)"
FPM_FLAGS= --name $(NAME) --version $(VERSION) --iteration $(PKG_RELEASE) \
--epoch 1 --license MIT --maintainer "$(BUILDER)" --url $(PROJECT_URL) \
--vendor mrtazz --description "C++ client for making HTTP/REST requests" \
--after-install utils/runldconfig.sh --after-remove utils/runldconfig.sh \
--depends curl usr
rpm:
fpm -t rpm -s dir $(FPM_FLAGS)
deb:
fpm -t deb -s dir $(FPM_FLAGS)
packages: local-install rpm deb
deploy-packages: packages
package_cloud push mrtazz/$(NAME)/el/7 *.rpm
package_cloud push mrtazz/$(NAME)/debian/stretch *.deb
package_cloud push mrtazz/$(NAME)/debian/buster *.deb
package_cloud push mrtazz/$(NAME)/ubuntu/xenial *.deb
package_cloud push mrtazz/$(NAME)/ubuntu/bionic *.deb