@@ -12,7 +12,7 @@ librestclient_cpp_la_SOURCES=source/restclient.cpp
1212librestclient_cpp_la_CXXFLAGS =-fPIC
1313librestclient_cpp_la_LDFLAGS =-version-info 1:0:1
1414
15- .PHONY : test check clean-coverage-files coverage-html
15+ .PHONY : test check clean-coverage-files coverage-html docs clean-docs deploy-docs doxygen jekyll packages rpm deb
1616
1717test : check
1818 ./test-program
@@ -26,3 +26,57 @@ coverage.info: test
2626
2727coverage-html : coverage.info
2828 ./utils/lcov-1.11/bin/genhtml -t " restclient-cpp coverage report" --legend --show-details coverage.info --output-directory html
29+
30+ local-install :
31+ $(MAKE ) install PREFIX=usr
32+
33+ NAME =restclient-cpp
34+ VERSION = $(shell git describe --tags --always --dirty)
35+ BUILDER = $(shell echo "`git config user.name` <`git config user.email`>")
36+ PKG_RELEASE ?= 1
37+ PROJECT_URL ="https://github.com/mrtazz/$(NAME ) "
38+ FPM_FLAGS = --name $(NAME ) --version $(VERSION ) --iteration $(PKG_RELEASE ) --epoch 1 --license MIT --maintainer "$(BUILDER ) " --url $(PROJECT_URL ) --vendor mrtazz usr
39+
40+ rpm :
41+ fpm -t rpm -s dir $(FPM_FLAGS )
42+
43+ deb :
44+ fpm -t deb -s dir $(FPM_FLAGS )
45+
46+ packages : local-install rpm deb
47+
48+ include/snyder/version.h :
49+ m4 -I m4 --define=M4_SNYDER_VERSION=$(VERSION ) version.h.m4 > $@
50+
51+
52+ GAUGES_CODE ="539c6c8de32bb442640005f3"
53+
54+ doxygen :
55+ doxygen doxygen.config
56+
57+ jekyll :
58+ echo " gaugesid: $( GAUGES_CODE) " > docs/_config.yml
59+ echo " projecturl: $( PROJECT_URL) " >> docs/_config.yml
60+ echo " basesite: http://www.unwiredcouch.com" >> docs/_config.yml
61+ echo " markdown: redcarpet" >> docs/_config.yml
62+ echo " ---" > docs/index.md
63+ echo " layout: project" >> docs/index.md
64+ echo " title: restclient-cpp" >> docs/index.md
65+ echo " ---" >> docs/index.md
66+ cat README.md >> docs/index.md
67+
68+ docs : doxygen jekyll
69+
70+ clean-docs :
71+ rm -rf ./docs
72+
73+ deploy-docs : docs
74+ cd docs && git init && git remote add upstream " https://${GH_TOKEN} @github.com/mrtazz/$( NAME) .git" && \
75+ git submodule add https://github.com/mrtazz/jekyll-layouts.git ./_layouts && \
76+ git submodule update --init && \
77+ git fetch upstream && git reset upstream/gh-pages && \
78+ git config user.name ' Daniel Schauenberg' && git config user.email d@unwiredcouch.com && \
79+ touch . && git add -A . && \
80+ git commit -m " rebuild pages at $( VERSION) " && \
81+ git push upstream HEAD:gh-pages
82+
0 commit comments