2008-01-10 22:07:42 +05:30
|
|
|
# rules to make a distribution tarball from a git repo
|
2015-12-05 04:22:19 +05:30
|
|
|
# Copyright (c) 2008-2015 The OpenRC Authors.
|
|
|
|
# See the Authors file at the top-level directory of this distribution and
|
2021-12-21 06:37:00 +05:30
|
|
|
# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
|
2015-12-05 04:22:19 +05:30
|
|
|
#
|
|
|
|
# This file is part of OpenRC. It is subject to the license terms in
|
|
|
|
# the LICENSE file found in the top-level directory of this
|
2021-12-21 06:37:00 +05:30
|
|
|
# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
|
2015-12-05 04:22:19 +05:30
|
|
|
# This file may not be copied, modified, propagated, or distributed
|
|
|
|
# except according to the terms contained in the LICENSE file.
|
2008-01-10 22:07:42 +05:30
|
|
|
|
2015-05-01 01:15:42 +05:30
|
|
|
GITREF?= ${VERSION}
|
2008-03-03 18:44:54 +05:30
|
|
|
DISTPREFIX?= ${NAME}-${VERSION}
|
2016-09-24 01:55:22 +05:30
|
|
|
DISTFILE?= ${DISTPREFIX}.tar.gz
|
2008-01-10 22:07:42 +05:30
|
|
|
|
2016-09-24 01:55:22 +05:30
|
|
|
CLEANFILES+= ${NAME}-*.tar.gz
|
2009-01-13 04:42:06 +05:30
|
|
|
|
2014-12-08 21:17:42 +05:30
|
|
|
CHANGELOG_LIMIT?= --after="1 year ago"
|
2014-12-08 04:46:48 +05:30
|
|
|
|
2009-01-13 04:42:06 +05:30
|
|
|
_SNAP_SH= date -u +%Y%m%d%H%M
|
2011-01-30 05:02:38 +05:30
|
|
|
_SNAP:= $(shell ${_SNAP_SH})
|
|
|
|
SNAP= ${_SNAP}
|
2009-01-13 04:42:06 +05:30
|
|
|
SNAPDIR= ${DISTPREFIX}-${SNAP}
|
2016-09-24 01:55:22 +05:30
|
|
|
SNAPFILE= ${SNAPDIR}.tar.gz
|
2008-01-10 22:07:42 +05:30
|
|
|
|
2014-12-08 04:46:48 +05:30
|
|
|
changelog:
|
2015-02-19 00:16:51 +05:30
|
|
|
git log ${CHANGELOG_LIMIT} --format=full > ChangeLog
|
2014-12-08 04:46:48 +05:30
|
|
|
|
2008-01-10 22:07:42 +05:30
|
|
|
dist:
|
2016-09-24 01:55:22 +05:30
|
|
|
git archive --prefix=${DISTPREFIX}/ ${GITREF} --output=${DISTFILE}
|
2009-01-13 04:42:06 +05:30
|
|
|
|
2011-01-17 14:33:25 +05:30
|
|
|
distcheck: dist
|
|
|
|
rm -rf ${DISTPREFIX}
|
|
|
|
tar xf ${DISTFILE}
|
|
|
|
MAKEFLAGS= $(MAKE) -C ${DISTPREFIX}
|
|
|
|
MAKEFLAGS= $(MAKE) -C ${DISTPREFIX} check
|
|
|
|
rm -rf ${DISTPREFIX}
|
|
|
|
|
2009-01-13 04:42:06 +05:30
|
|
|
snapshot:
|
|
|
|
rm -rf /tmp/${SNAPDIR}
|
|
|
|
mkdir /tmp/${SNAPDIR}
|
|
|
|
cp -RPp * /tmp/${SNAPDIR}
|
|
|
|
(cd /tmp/${SNAPDIR}; make clean)
|
2015-05-01 20:44:31 +05:30
|
|
|
rm -rf /tmp/${SNAPDIR}/.git 2>/dev/null || true
|
2016-09-24 01:55:22 +05:30
|
|
|
tar -cvzpf ${SNAPFILE} -C /tmp ${SNAPDIR}
|
2009-01-13 04:42:06 +05:30
|
|
|
rm -rf /tmp/${SNAPDIR}
|
|
|
|
ls -l ${SNAPFILE}
|
|
|
|
|
|
|
|
snap: snapshot
|
|
|
|
|