|
Packit |
fc043f |
# Makefile.am for libgpg-error.
|
|
Packit |
fc043f |
# Copyright (C) 2003, 2006, 2007, 2013 g10 Code GmbH
|
|
Packit |
fc043f |
#
|
|
Packit |
fc043f |
# This file is part of libgpg-error.
|
|
Packit |
fc043f |
#
|
|
Packit |
fc043f |
# libgpg-error is free software; you can redistribute it and/or modify
|
|
Packit |
fc043f |
# it under the terms of the GNU Lesser General Public License as
|
|
Packit |
fc043f |
# published by the Free Software Foundation; either version 2.1 of the
|
|
Packit |
fc043f |
# License, or (at your option) any later version.
|
|
Packit |
fc043f |
#
|
|
Packit |
fc043f |
# libgpg-error is distributed in the hope that it will be useful,
|
|
Packit |
fc043f |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
fc043f |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
fc043f |
# GNU Lesser General Public License for more details.
|
|
Packit |
fc043f |
#
|
|
Packit |
fc043f |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
fc043f |
# License along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
# Location of the released tarball archives. Note that this is an
|
|
Packit |
fc043f |
# internal archive and before uploading this to the public server,
|
|
Packit |
fc043f |
# manual tests should be run and the git release tat set and pushed.
|
|
Packit |
fc043f |
# Adjust as needed.
|
|
Packit |
fc043f |
RELEASE_ARCHIVE_DIR = wk@vigenere:tarballs/libgpg-error/
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
# The key used to sign the released sources. Adjust as needed.
|
|
Packit |
fc043f |
RELEASE_SIGNING_KEY = D8692123C4065DEA5E0F3AB5249B39D24F25E3B6
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
# Autoconf flags
|
|
Packit |
fc043f |
ACLOCAL_AMFLAGS = -I m4
|
|
Packit |
fc043f |
DISTCHECK_CONFIGURE_FLAGS = --enable-doc
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
# (A suitable gitlog-to-changelog script can be found in GnuPG master.)
|
|
Packit |
fc043f |
GITLOG_TO_CHANGELOG=gitlog-to-changelog
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
EXTRA_DIST = autogen.sh autogen.rc libgpg-error.spec.in \
|
|
Packit |
fc043f |
VERSION COPYING COPYING.LIB potomo doc/HACKING ChangeLog-2011 \
|
|
Packit |
fc043f |
po/ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 \
|
|
Packit |
fc043f |
build-aux/git-log-footer build-aux/git-log-fix
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
if LANGUAGES_SOME
|
|
Packit |
fc043f |
lang_subdirs = lang
|
|
Packit |
fc043f |
else
|
|
Packit |
fc043f |
lang_subdirs =
|
|
Packit |
fc043f |
endif
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
#if BUILD_GPGSCM
|
|
Packit |
fc043f |
#doc = gpgscm
|
|
Packit |
fc043f |
#else
|
|
Packit |
fc043f |
#doc =
|
|
Packit |
fc043f |
#endif
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
if BUILD_DOC
|
|
Packit |
fc043f |
doc = doc
|
|
Packit |
fc043f |
else
|
|
Packit |
fc043f |
doc =
|
|
Packit |
fc043f |
endif
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
if BUILD_TESTS
|
|
Packit |
fc043f |
tests = tests
|
|
Packit |
fc043f |
else
|
|
Packit |
fc043f |
tests =
|
|
Packit |
fc043f |
endif
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
SUBDIRS = m4 src $(doc) $(tests) po $(lang_subdirs)
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
dist-hook: gen-ChangeLog
|
|
Packit |
fc043f |
sed -e 's/@pkg_version@/$(VERSION)/g' \
|
|
Packit |
fc043f |
$(top_srcdir)/libgpg-error.spec.in > $(distdir)/libgpg-error.spec
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
distcheck-hook:
|
|
Packit |
fc043f |
set -e; ( \
|
|
Packit |
fc043f |
pref="#+macro: $$(echo $(PACKAGE_NAME)|tr '-' '_')_" ;\
|
|
Packit |
fc043f |
reldate="$$(date -u +%Y-%m-%d)" ;\
|
|
Packit |
fc043f |
echo "$${pref}ver $(PACKAGE_VERSION)" ;\
|
|
Packit |
fc043f |
echo "$${pref}date $${reldate}" ;\
|
|
Packit |
fc043f |
list='$(DIST_ARCHIVES)'; for i in $$list; do \
|
|
Packit |
fc043f |
case "$$i" in *.tar.bz2) \
|
|
Packit |
fc043f |
echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
|
|
Packit |
fc043f |
echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
|
|
Packit |
fc043f |
echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
|
|
Packit |
fc043f |
esac;\
|
|
Packit |
fc043f |
done ) | tee $(distdir).swdb
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
gen_start_date = 2011-12-01T00:00:00
|
|
Packit |
fc043f |
.PHONY: gen-ChangeLog release sign-release
|
|
Packit |
fc043f |
gen-ChangeLog:
|
|
Packit |
fc043f |
set -e; \
|
|
Packit |
fc043f |
if test -d $(top_srcdir)/.git; then \
|
|
Packit |
fc043f |
(cd $(top_srcdir) && \
|
|
Packit |
fc043f |
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
|
|
Packit |
fc043f |
--amend=build-aux/git-log-fix --tear-off \
|
|
Packit |
fc043f |
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
|
|
Packit |
fc043f |
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
|
|
Packit |
fc043f |
rm -f $(distdir)/ChangeLog; \
|
|
Packit |
fc043f |
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
|
Packit |
fc043f |
fi
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
if HAVE_W32_SYSTEM
|
|
Packit |
fc043f |
install-data-hook:
|
|
Packit |
fc043f |
set -e; \
|
|
Packit |
fc043f |
for i in $$($(top_srcdir)/potomo --get-linguas $(top_srcdir)/po); do \
|
|
Packit |
fc043f |
$(MKDIR_P) "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES" || true; \
|
|
Packit |
fc043f |
rm -f "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/libgpg-error.mo" \
|
|
Packit |
fc043f |
2>/dev/null || true; \
|
|
Packit |
fc043f |
$(top_srcdir)/potomo $(top_srcdir)/po/$$i.po \
|
|
Packit |
fc043f |
"$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/libgpg-error.mo" ; \
|
|
Packit |
fc043f |
done
|
|
Packit |
fc043f |
endif
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
stowinstall:
|
|
Packit |
fc043f |
$(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgpg-error
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
# Macro to help the release target.
|
|
Packit |
fc043f |
RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
release:
|
|
Packit |
fc043f |
+(set -e;\
|
|
Packit |
fc043f |
if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \
|
|
Packit |
fc043f |
echo "error: build directory must not be the source directory" >&2;\
|
|
Packit |
fc043f |
exit 2;\
|
|
Packit |
fc043f |
fi ;\
|
|
Packit |
fc043f |
echo "/* Build started at $$(date -uIseconds) */" ;\
|
|
Packit |
fc043f |
cd $(top_srcdir); \
|
|
Packit |
fc043f |
./autogen.sh --force; \
|
|
Packit |
fc043f |
cd $(abs_top_builddir); \
|
|
Packit |
fc043f |
rm -rf dist; mkdir dist ; cd dist ; \
|
|
Packit |
fc043f |
$(abs_top_srcdir)/configure --enable-maintainer-mode; \
|
|
Packit |
fc043f |
$(MAKE) distcheck; \
|
|
Packit |
fc043f |
echo "/* Build finished at $$(date -uIseconds) */" ;\
|
|
Packit |
fc043f |
echo "/*" ;\
|
|
Packit |
fc043f |
echo " * Please run the final step interactivly:" ;\
|
|
Packit |
fc043f |
echo " * make sign-release" ;\
|
|
Packit |
fc043f |
echo " */" ;\
|
|
Packit |
fc043f |
) 2>&1 | tee "$(RELEASE_NAME).buildlog"
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
sign-release:
|
|
Packit |
fc043f |
+(set -e; \
|
|
Packit |
fc043f |
cd dist; \
|
|
Packit |
fc043f |
files1="$(RELEASE_NAME).tar.bz2 \
|
|
Packit |
fc043f |
$(RELEASE_NAME).tar.gz" ; \
|
|
Packit |
fc043f |
files2="$(RELEASE_NAME).tar.bz2.sig \
|
|
Packit |
fc043f |
$(RELEASE_NAME).tar.gz.sig \
|
|
Packit |
fc043f |
$(RELEASE_NAME).swdb \
|
|
Packit |
fc043f |
$(RELEASE_NAME).buildlog" ;\
|
|
Packit |
fc043f |
echo "/* Signing the source tarball ..." ;\
|
|
Packit |
fc043f |
gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.bz2 ;\
|
|
Packit |
fc043f |
gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.gz ;\
|
|
Packit |
fc043f |
cat $(RELEASE_NAME).swdb >swdb.snippet;\
|
|
Packit |
fc043f |
echo >>swdb.snippet ;\
|
|
Packit |
fc043f |
sha1sum $${files1} >>swdb.snippet ;\
|
|
Packit |
fc043f |
cat "../$(RELEASE_NAME).buildlog" swdb.snippet \
|
|
Packit |
fc043f |
| gzip >$(RELEASE_NAME).buildlog ;\
|
|
Packit |
fc043f |
echo "Copying to local archive ..." ;\
|
|
Packit |
fc043f |
scp -p $${files1} $${files2} $(RELEASE_ARCHIVE_DIR)/ || true;\
|
|
Packit |
fc043f |
echo '/*' ;\
|
|
Packit |
fc043f |
echo ' * All done; for checksums see dist/swdb.snippet' ;\
|
|
Packit |
fc043f |
echo ' */' ;\
|
|
Packit |
fc043f |
)
|