2013-06-03 16:13:56 +00:00
|
|
|
#
|
|
|
|
# 2013 Nico Schottelius (nico-cdist at schottelius.org)
|
|
|
|
#
|
|
|
|
# This file is part of cdist.
|
|
|
|
#
|
|
|
|
# cdist is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# cdist is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
#
|
2013-06-03 15:34:03 +00:00
|
|
|
|
2013-06-07 19:14:51 +00:00
|
|
|
A2XM=a2x -f manpage --no-xmllint -a encoding=UTF-8
|
|
|
|
A2XH=a2x -f xhtml --no-xmllint -a encoding=UTF-8
|
|
|
|
helper=./build-helper
|
|
|
|
|
2013-06-03 20:29:49 +00:00
|
|
|
MANDIR=docs/man
|
|
|
|
MAN1DSTDIR=$(MANDIR)/man1
|
|
|
|
MAN7DSTDIR=$(MANDIR)/man7
|
|
|
|
MANREF=$(MAN7DSTDIR)/cdist-reference.text
|
|
|
|
MANREFSH=$(MANDIR)/cdist-reference.text.sh
|
|
|
|
|
|
|
|
CHECKS=check-version check-date
|
|
|
|
|
|
|
|
DIST=dist-tag dist-branch-merge
|
|
|
|
|
|
|
|
RELEASE=release-web release-man release-pypi release-archlinux-makepkg
|
2013-06-03 16:16:50 +00:00
|
|
|
RELEASE+=release-blog release-ml
|
2013-06-03 20:29:49 +00:00
|
|
|
RELEASE+=release-freecode release-archlinux-aur-upload
|
|
|
|
|
|
|
|
version=`git describe`
|
|
|
|
versionchangelog=`$(helper) changelog-version`
|
|
|
|
versionfile=cdist/version.py
|
|
|
|
|
|
|
|
archlinuxtar=cdist-${versionchangelog}-1.src.tar.gz
|
|
|
|
|
|
|
|
$(versionfile):
|
2013-06-07 19:14:51 +00:00
|
|
|
$(helper) version
|
2013-06-03 15:34:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
$(DIST): dist-check
|
2013-06-03 20:29:49 +00:00
|
|
|
$(RELEASE): $(DIST) $(CHECKS)
|
|
|
|
|
|
|
|
man: $(MANREF) mantype manbuild
|
2013-06-03 16:13:56 +00:00
|
|
|
|
2013-06-07 19:14:51 +00:00
|
|
|
$(MAN7DSTDIR)/cdist-type__motd.7: $(MAN7DSTDIR)/cdist-type__motd.text
|
|
|
|
$(A2XM) $^
|
|
|
|
|
|
|
|
$(MAN7DSTDIR)/cdist-type__motd.text: cdist/conf/type/__motd/man.text
|
|
|
|
echo ln -sf $@ $^
|
|
|
|
|
2013-06-03 20:29:49 +00:00
|
|
|
$(MANREF): $(MANREFSH)
|
|
|
|
$(MANREFSH)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# generic code
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# dist code
|
|
|
|
#
|
|
|
|
dist-check: man
|
2013-06-03 15:34:03 +00:00
|
|
|
|
|
|
|
dist: $(DIST)
|
|
|
|
echo "Run \"make release\" to release to the public"
|
|
|
|
|
2013-06-03 20:29:49 +00:00
|
|
|
dist-pypi: man version
|
|
|
|
python3 setup.py sdist upload
|
2013-06-03 16:13:56 +00:00
|
|
|
|
2013-06-03 20:29:49 +00:00
|
|
|
$(archlinuxtar): PKGBUILD dist-pypi
|
|
|
|
makepkg -c --source
|
2013-06-03 16:13:56 +00:00
|
|
|
|
2013-06-03 20:29:49 +00:00
|
|
|
################################################################################
|
|
|
|
# release code
|
|
|
|
#
|
|
|
|
release: pub $(RELEASE)
|
|
|
|
echo "Don't forget...: linkedin"
|
2013-06-03 16:16:50 +00:00
|
|
|
|
2013-06-03 16:13:56 +00:00
|
|
|
|
2013-06-03 20:29:49 +00:00
|
|
|
release-archlinux: $(archlinuxtar)
|
|
|
|
burp -c system $^
|
|
|
|
|
|
|
|
release-blog: blog
|
|
|
|
release-ml: release-blog
|
2013-06-03 16:16:50 +00:00
|
|
|
release-pub: man
|
|
|
|
|
2013-06-03 20:29:49 +00:00
|
|
|
release-web: web-doc
|
|
|
|
|
2013-06-03 16:13:56 +00:00
|
|
|
PKGBUILD: PKGBUILD.in
|
|
|
|
./PKGBUILD.in
|
|
|
|
|
2013-06-03 20:29:49 +00:00
|
|
|
################################################################################
|
|
|
|
# generic call
|
2013-06-03 16:13:56 +00:00
|
|
|
%:
|
2013-06-03 20:29:49 +00:00
|
|
|
$(helper) $@
|