Bug #248 » bip-0.8.8-make-dist.patch
Makefile.am | ||
---|---|---|
bin_PROGRAMS = src/bip src/bipmkpw
|
||
src_bip_SOURCES = src/conf.y src/lex.l src/bip.c src/connection.c src/irc.c src/line.c src/log.c src/md5.c src/util.c
|
||
src_bip_SOURCES = src/conf.y src/lex.l \
|
||
src/bip.c src/bip.h \
|
||
src/connection.c src/connection.h \
|
||
src/defaults.h \
|
||
src/irc.c src/irc.h \
|
||
src/line.c src/line.h \
|
||
src/log.c src/log.h \
|
||
src/md5.c src/md5.h \
|
||
src/moduli.h \
|
||
src/tuple.h \
|
||
src/util.c src/util.h
|
||
src_bipmkpw_SOURCES = src/bipmkpw.c src/md5.c src/util.c
|
||
AM_YFLAGS= -d
|
||
BUILT_SOURCES = src/conf.c src/conf.h src/lex.c
|
||
... | ... | |
endif
|
||
man_MANS = bip.1 bip.conf.5
|
||
dist_man_MANS = bip.1 bip.conf.5 bipmkpw.1
|
||
examplesdir = $(prefix)/share/doc/bip/examples/
|
||
examples_DATA = samples/bip.conf samples/bip.vim
|
||
dist_examples_DATA = samples/bip.conf samples/bip.vim
|
||
EXTRA_DIST = \
|
||
BUGS \
|
||
scripts/bip-release \
|
||
scripts/bipgenconfig
|
configure.ac | ||
---|---|---|
AC_PREREQ([2.64])
|
||
AC_INIT([bip], [0.8.2], [nohar@t1r.net])
|
||
AC_INIT([bip], [0.8.8-git], [https://projects.duckcorp.org/issues], [], [http://bip.milkypond.org/])
|
||
AM_INIT_AUTOMAKE([subdir-objects])
|
||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
|
||
AC_CONFIG_SRCDIR([src/bip.h])
|
scripts/bip-release | ||
---|---|---|
fi
|
||
release="$1"
|
||
: ${MAKEOPTS:=-j -l4}
|
||
if [ -n "$release" ]
|
||
then
|
||
git log > ChangeLog
|
||
echo '#define BIP_VERSION "'$release'"' > src/version.h
|
||
git commit -a -m "Update src/version.h and Changelog for release."
|
||
set_version() {
|
||
local release
|
||
release="${1}"
|
||
sed -i -e '/^AC_INIT/s/\(, \[\)[^]]*/\1'${release}'/' configure.ac
|
||
}
|
||
get_version() {
|
||
grep -e '^AC_INIT' configure.ac | cut -d [ -f 3 | cut -d ] -f 1
|
||
}
|
||
make_distcheck() {
|
||
if ! make ${MAKEOPTS} distcheck; then
|
||
echo "'make distcheck' fails, please try again." >&2
|
||
return 1
|
||
else
|
||
true
|
||
fi
|
||
}
|
||
git log > ChangeLog
|
||
if [ -n "$release" ]; then
|
||
set_version "${release}"
|
||
make_distcheck || exit 1
|
||
git commit -a -m "Update version and ChangeLog for bip-${release} release."
|
||
git tag release-$release
|
||
prefix=bip-$release
|
||
set_version "${release}-git"
|
||
git commit -a -m "Add -git to version string."
|
||
echo "See bip-${release}.tar.gz"
|
||
else
|
||
make_distcheck || exit 1
|
||
tarname=bip-$(get_version)
|
||
prefix=bip-$(date +%y%m%d)
|
||
fi
|
||
olddir=$(pwd)
|
||
tmpdir=$(mktemp -d /var/tmp/bip-XXXXXX)
|
||
git archive --format=tar --prefix=$prefix/ HEAD > $tmpdir/$prefix.tar
|
||
cd $tmpdir
|
||
tar xf $prefix.tar
|
||
cd $prefix
|
||
./bootstrap
|
||
rm -rf autom4te.cache
|
||
cd ..
|
||
tar czf $olddir/../$prefix.tar.gz $prefix
|
||
cd $olddir
|
||
rm -rf $tmpdir
|
||
echo "See ../$prefix.tar.gz"
|
||
if [ -n "$release" ]
|
||
then
|
||
echo '#define BIP_VERSION "'$release'-git"' > src/version.h
|
||
git commit -a -m "Add -git to version string."
|
||
fi
|
||
rm -rf "${tarname}" "${prefix}"
|
||
tar -xzf "${tarname}".tar.gz
|
||
rm -rf "${tarname}".tar.gz
|
||
mv "${tarname}" "${prefix}"
|
||
tar -czf "${prefix}".tar.gz "${prefix}"
|
||
rm -rf "${prefix}"
|
||
# Revert the ChangeLog.
|
||
git checkout HEAD -- ChangeLog
|
||
echo "See ${prefix}.tar.gz"
|
||
fi
|
src/bip.c | ||
---|---|---|
#include "log.h"
|
||
#include "bip.h"
|
||
#include "line.h"
|
||
#include "version.h"
|
||
#include "defaults.h"
|
||
int sighup = 0;
|
||
... | ... | |
static void version()
|
||
{
|
||
printf(
|
||
"Bip IRC Proxy - %s\n"
|
||
"Bip IRC Proxy - " PACKAGE_VERSION "\n"
|
||
"Copyright © Arnaud Cornet and Loïc Gomez (2004 - 2008)\n"
|
||
"Distributed under the GNU Public License Version 2\n", BIP_VERSION);
|
||
"Distributed under the GNU Public License Version 2\n");
|
||
}
|
||
bip_t *_bip;
|
src/irc.c | ||
---|---|---|
#include "log.h"
|
||
#include "connection.h"
|
||
#include "md5.h"
|
||
#include "version.h"
|
||
#define S_CONN_DELAY (10)
|
||
... | ... | |
nick = nick_from_ircmask(line->origin);
|
||
if (irc_line_elem_equals(line, 2, "\001VERSION\001")) {
|
||
WRITE_LINE2(CONN(server), NULL, "NOTICE", nick,
|
||
"\001VERSION bip-" BIP_VERSION "\001");
|
||
"\001VERSION bip-" PACKAGE_VERSION "\001");
|
||
}
|
||
free(nick);
|
||
}
|
src/version.h | ||
---|---|---|
#define BIP_VERSION "0.8.8-git"
|