forked from mrtazz/restclient-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.packaging.mk
28 lines (22 loc) · 918 Bytes
/
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
# make tasks to create and publish packages
.PHONY: rpm deb packages deploy-packages
local-install:
$(MAKE) install PREFIX=usr
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" \
--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/wheezy *.deb
package_cloud push mrtazz/$(NAME)/ubuntu/trusty *.deb