2011-08-30 16:24:58 +02:00
i n c l u d e $( top_srcdir ) / s e t u p - v a r i a b l e s . a m
i n c l u d e $( top_srcdir ) / a u t o t r o l l . a m
i n c l u d e $( top_srcdir ) / b u i l d / b u i l d . a m
AUTOMAKE_OPTIONS = subdir-objects
2005-10-08 14:03:24 +02:00
## Process this file with automake to produce Makefile.in
2011-08-30 16:24:58 +02:00
ACLOCAL_AMFLAGS = -I m4 -I m4-repo ${ ACLOCAL_FLAGS }
i f C O N D _ C O R E
SUBDIRS += $( SYNTHESIS_SUBDIR)
e l s e
SUBDIRS += $( SYNTHESIS_SUBDIR_INCLUDES)
e n d i f
SUBDIRS += .
2011-12-21 14:25:09 +01:00
# choose D-Bus implementation
i f C O N D _ G I O _ G D B U S
gdbus_dir = $( top_srcdir) /src/gdbusxx
gdbus_build_dir = src/gdbusxx
e l s e
gdbus_dir = $( top_srcdir) /src/gdbus
gdbus_build_dir = src/gdbus
e n d i f
2011-08-30 16:24:58 +02:00
disted_docs =
distbin_docs =
2005-12-10 20:16:02 +01:00
2010-04-28 21:23:22 +02:00
man_MANS =
2011-08-30 16:24:58 +02:00
i n c l u d e s r c / s r c . a m
2010-03-23 18:59:01 +01:00
i f C O N D _ C O R E
2011-08-30 16:24:58 +02:00
i n c l u d e t e s t / t e s t . a m
SUBDIRS += po
disted_docs += README NEWS COPYING $( TEST_README_FILES) test/syncevo-http-server-logging.conf
distbin_docs += $( disted_docs)
dist_doc_DATA += $( disted_docs)
2010-04-28 21:54:31 +02:00
i f C O N D _ H T M L _ R E A D M E
2011-08-30 16:24:58 +02:00
distbin_docs += README.html
# do not distribute in tarball.
doc_DATA += README.html
2010-04-28 21:54:31 +02:00
e n d i f
2010-04-28 21:23:22 +02:00
i f C O N D _ M A N _ P A G E S
man_MANS += syncevolution.1
e n d i f
2010-03-23 18:59:01 +01:00
e n d i f
2011-08-30 16:24:58 +02:00
DIST_SUBDIRS += po
2009-03-30 17:54:47 +02:00
2011-08-30 16:24:58 +02:00
dist_noinst_DATA += \
HACKING \
LICENSE.txt \
LICENSE.LGPL-21 \
README.rst \
description \
autogen.sh \
Doxyfile \
po/LINGUAS.README
2009-03-30 17:54:47 +02:00
2011-08-30 16:24:58 +02:00
MAINTAINERCLEANFILES += Makefile.in config.h.in config.guess config.sub configure depcomp install-sh ltmain.sh missing mkinstalldirs
2009-07-14 14:16:02 +02:00
2011-08-30 16:24:58 +02:00
TEST_README_FILES = $( wildcard $( top_srcdir) /test/README.*)
2009-07-21 13:11:05 +02:00
2012-07-18 15:15:06 +02:00
# files and file patterns which are not meant to be packaged.
2012-05-23 16:30:36 +02:00
DEV_FILE_PATTERN = $( 1) $( 2) /include $( 1) $( 2) /lib/*.so $( 1) $( 2) /lib/*.a $( 1) $( 2) /lib/*.la $( 1) $( 2) /lib/*/*.la $( 1) $( 2) /lib/pkgconfig
2009-07-27 13:34:21 +02:00
2012-07-18 15:15:06 +02:00
# Exclude syncactivesync.so from bundle package because that needs to
# be packaged separately.
DEV_FILE_PATTERN += $( 1) $( 2) /lib/syncevolution/backends/syncactivesync.so
2009-07-14 14:16:02 +02:00
# binary distribution as .tar.gz
i f C O N D _ D B U S
# when building with D-Bus, we have no choice: the service has to go into /usr
# in order to be found
2011-08-30 16:24:58 +02:00
distbin : $( distbin_docs ) INSTALL -tar -gz all
2009-07-14 14:16:02 +02:00
@ [ " $( BINSUFFIX) " ] || ( echo "please invoke with e.g. 'make distbin BINSUFFIX=debian-3.1'" ; exit 1 )
2011-05-16 14:43:32 +02:00
@ [ " $( prefix) " = "/usr" ] || ( echo "please reconfigure with --prefix=/usr" ; exit 1 )
2009-07-14 14:16:02 +02:00
rm -rf $( distdir)
2009-10-15 12:03:04 +02:00
$( MAKE) DESTDIR = ` pwd ` /$( distdir) install
$( MAKE) DESTDIR = ` pwd ` /$( distdir) installcheck
2009-10-02 11:21:36 +02:00
rm -rf $( call DEV_FILE_PATTERN,$( distdir) ,/usr)
for i in ` find $( distdir) -type d | sort -r` ; do rmdir $$ i 2>/dev/null || true; done
2009-07-14 14:16:02 +02:00
mkdir -p $( distdir) /usr/share/doc/syncevolution
cp $( srcdir) /INSTALL-tar-gz $( distdir) /INSTALL
2010-04-28 21:54:31 +02:00
cp $( filter-out all, $+) $( distdir) /usr/share/doc/syncevolution
2009-07-14 14:16:02 +02:00
tar zcf $( distdir) -$( BINSUFFIX) .tar.gz $( distdir)
rm -rf $( distdir)
e l s e
# without D-Bus, we can simply create an archive with a bin directory
# and everything works
2011-08-30 16:24:58 +02:00
distbin : $( distbin_docs ) all
2006-03-11 20:23:43 +01:00
@ [ " $( BINSUFFIX) " ] || ( echo "please invoke with e.g. 'make distbin BINSUFFIX=debian-3.1'" ; exit 1 )
rm -rf $( distdir)
2009-10-14 12:16:01 +02:00
$( MAKE) prefix = ` pwd ` /$( distdir) install
2011-08-30 16:24:58 +02:00
@echo removing developer files and empty directories
2009-10-02 11:21:36 +02:00
rm -rf $( call DEV_FILE_PATTERN,$( distdir) ,/)
for i in ` find $( distdir) -type d | sort -r` ; do rmdir $$ i 2>/dev/null || true; done
2010-04-28 21:54:31 +02:00
cp $( filter-out all, $+) $( distdir)
2006-03-11 20:23:43 +01:00
tar zcf $( distdir) -$( BINSUFFIX) .tar.gz $( distdir)
rm -rf $( distdir)
2009-07-14 14:16:02 +02:00
e n d i f
2007-10-11 00:27:27 +02:00
iphone : SyncEvolution .plist
IPHONE_FILENAME = syncevolution-$( VERSION) -iphone.zip
SyncEvolution.plist : SyncEvolution .plist .in $( IPHONE_FILENAME )
2011-08-30 16:24:58 +02:00
$( AM_V_GEN) sed -e 's/__FILENAME__/$(IPHONE_FILENAME)/' \
-e 's/__VERSION__/$(VERSION)/' \
-e 's/__SIZE__/$(shell ls -l $(IPHONE_FILENAME) | sed -e ' s/ */ /g' | cut -d ' ' -f 5)/' \
$< >$@
2007-10-11 00:27:27 +02:00
$(IPHONE_FILENAME) : all
rm -rf syncevolution-iphone $@
$( MAKE) DESTDIR = ` pwd ` /syncevolution-iphone install
rm -rf ` ls -1 -d syncevolution-iphone/usr/share/doc/syncevolution/*/spds/sources/* | grep -v addressbook`
perl -pi -e 's;SyncEvolution test #1;;;' \
-e 's;^type = text/(x-)?vcard;type = addressbook;m;' \
syncevolution-iphone/usr/share/doc/syncevolution/*/spds/sources/addressbook/config.txt
cd syncevolution-iphone && zip -r ../$( IPHONE_FILENAME) .
2007-10-17 23:08:24 +02:00
TYPE_deb = -D
TYPE_rpm = -R
2009-07-14 14:16:02 +02:00
# Dependency calculation is intentionally incomplete:
# - don't force dependency on specific EDS libs via backends, their versions change too much (handled via --enable-evolution-compatibility and dynamic loading of the backends)
# - ignore client-test dependencies (because users typically don't run it)
2012-03-09 14:07:18 +01:00
# - ignore backend dependencies (should never prevent installing the bundle)
2012-02-28 21:35:25 +01:00
# - be more flexible about kdelibs5 than dpkg-shlibdeps: it is found as package
# for libkdeui.so.5 and libkdecore.so.5 on Ubuntu Lucid, but after Debian
# Squeeze the package was replaced by individual library packages. On such
# distros, libkdeui5 is what we need.
# - same for kdepimlibs5 -> libakonadi-kde4
2014-01-06 17:20:33 +01:00
# - kdebase-runtime became kde-runtime in Debian Wheezy
REQUIRES_SED_KDE = -e 's/kdelibs5 ([^,]*),/kdelibs5 | libkdeui5,/g' -e 's/kdepimlibs5 ([^,]*),/kdepimlibs5 | libakonadi-kde4,/g' -e 's/kdebase-runtime/kdebase-runtime | kde-runtime/g'
2021-09-29 23:01:46 +02:00
REQUIRES_deb = --requires= " ' $( shell set -x; cd checkinstall/dist; LD_LIBRARY_PATH = $( distdir) /usr/lib:$( distdir) /usr/lib/syncevolution dpkg-shlibdeps -L$( EXTRA_SHLIBS_LOCAL) --ignore-missing-info -O $$ ( for i in $$ ( find $( distdir) -type f -perm /u+x | grep -v -e client-test -e lib/syncevolution/backends/) ; do if file $$ i | grep ELF >/dev/null; then echo $$ i; fi; done) | sed $( REQUIRES_SED_KDE) -e 's/[^=]*=//') $( REQUIRES_deb_neon) $( REQUIRES_deb_ical) ' "
2011-08-17 11:57:50 +02:00
i f N E O N _ C O M P A T I B I L I T Y
# --enable-neon-compatibility in src/backends/webdav:
# replace dependencies from linking with hard-coded dlopen() dependencies
REQUIRES_deb_neon = , libneon27 ( >= 0.29.0) | libneon27-gnutls ( >= 0.29.0)
e l s e
REQUIRES_deb_neon =
e n d i f
2012-07-10 14:43:08 +02:00
i f E N A B L E _ I C A L
syncevolution.org: compile on Ubuntu Trusty, libical v1/v2 compatibility
syncevolution.org binaries are now getting compiled on Ubuntu Trusty and thus
no longer support distros with older EDS. The code should still compile
against older EDS (for example, for Maemo), but that is not getting tested
anymore.
This allows removing the dynamic linker hacks related to older libraries,
which was only used in those binaries. Instead, backends using libical or EDS
get compiled on Ubuntu Trusty and then the soname of those libs get patched to
make the backend module usable in combination with a different set of
libs. That patching is part of a script maintained in the syncevolution.org
build infrastructure.
This approach was already used before to generate different EDS backends
for EDS versions with the newer EClient API, because that turned out to be
easier than the dynamic loading approach. It works because none of the methods
used by SyncEvolution changed their ABI, only some other parts of the
libraries did. Should there ever be a situation again that cannot be handled
like this, then backends might also get compiled on different distros than
Ubuntu Trusty (however, that may lead to problems due to the libstdc++ ABI
changes - to be decided...).
libical still requires one special hack: system time zone loading in
libical v1 (and only in that version, v2 has builtin support again) must
be overridden such that time zones are generated with rules instead
of transitions because that is more compatible with the peers that
SyncEvolution exchanges data with.
That hack now relies on overriding the two relevant functions inside the main
binaries (has to be there, otherwise libical still ends up calling its own
internal implementation). The overriding code is in
libsyncevo-icaltz-util.so.0 and depends on libical.so.1. If
libsyncevo-icaltz-util.so.0 can be loaded, the wrappers in the main binary use
it, otherwise they fall through to the code from the current libical.so, which
then should be libical.so.2 or more recent.
This hack is active by default when libical v1 is detected during configuration.
2016-09-20 17:19:08 +02:00
REQUIRES_deb_ical = , libical0 | libical1 | libical1a | libical2
2012-07-10 14:43:08 +02:00
e n d i f
2010-01-27 12:00:41 +01:00
VERSION_deb = 1:$( STABLE_VERSION) $( VERSION)
2007-10-17 23:08:24 +02:00
VERSION_rpm = ` echo $( VERSION) | sed -e s/-/_/g`
2007-10-25 23:10:48 +02:00
RELEASE = 2
2007-10-17 23:08:24 +02:00
2007-10-21 23:23:15 +02:00
# The package name: BINSUFFIX is used to distinguish binaries
# for different Evolution releases.
PKGNAME = syncevolution$( patsubst %,-%,$( BINSUFFIX) )
# This is a list of packages (potentially) provided on estamos.de.
# The current package conflicts with any of them, but not itself.
2008-10-09 21:32:17 +02:00
PKGS = $( addprefix syncevolution-evolution-, 2.6 2.8 2.12)
2007-10-21 23:23:15 +02:00
2007-10-17 23:08:24 +02:00
# When calling checkinstall we cannot install into /tmp
# because any file created there will be excluded: that makes
# sense, because "make install" might create temporary files
# there. The current directory might be in /tmp, so use $HOME.
2008-10-09 21:32:17 +02:00
#
# --replaces is necessary for migrating from syncevolution-evolution-<evover>
# to syncevolution-evolution (as per http://wiki.debian.org/Renaming_a_Package)
2010-02-22 17:25:53 +01:00
#
# When we build shared objects, then conflict with the corresponding
# system libs. The assumption is that the system library is named
# after the lib and its major version, which holds for libsmltk and
# libsynthesis in Debian.
2012-06-11 21:36:26 +02:00
deb rpm : checkinstall /dist /$( distdir ) checkinstall /dist /debian /control
2014-01-20 10:58:31 +01:00
( echo "SyncEvolution - synchronizing personal information management data" && cat $( srcdir) /description) >checkinstall/description-pak
echo "/sbin/ldconfig" >checkinstall/postremove-pak
echo "/sbin/ldconfig" >checkinstall/postinstall-pak
2012-06-11 21:36:26 +02:00
conflicts = ` ls -1 checkinstall/dist/$( distdir) /usr/lib/*.so.[ 0123456789] | sed -e 's;.*/;;' -e 's/\.so\.//' -e 's/$$/, /' ` && \
2007-10-17 23:08:24 +02:00
tmpdir = ` mktemp -d $$ HOME/syncevolution.XXXXXXXXXX` && \
trap " rm -rf $$ tmpdir " EXIT && \
2012-06-11 21:36:26 +02:00
cd checkinstall && \
2007-12-17 19:58:55 +01:00
fakeroot checkinstall </dev/null \
2007-10-17 23:08:24 +02:00
$( TYPE_$@ ) \
$( REQUIRES_$@ ) \
--fstrans= yes \
2009-07-14 14:16:02 +02:00
--strip= no \
2007-10-17 23:08:24 +02:00
--pkgversion= $( VERSION_$@ ) \
2007-10-25 23:10:48 +02:00
--pkgrelease= $( RELEASE) \
2007-10-21 23:23:15 +02:00
--pkgname= $( PKGNAME) \
2008-12-01 14:39:50 +01:00
--pkgarch= $( PKGARCH) \
2007-10-21 23:23:15 +02:00
--provides= syncevolution \
2008-10-10 22:45:35 +02:00
--replaces= " 'syncevolution, `echo $( filter-out $( PKGNAME) , $( PKGS) ) | sed -e 's/ */ (<< 1:0.8.1-2), /g'` (<< 1:0.8.1-2)' " \
2012-03-09 14:07:18 +01:00
--conflicts= " ' $$ {conflicts}syncevolution, `echo $( filter-out $( PKGNAME) , $( PKGS) ) | sed -e 's/ */ (<< 1:0.8.1-2), /g'` (<< 1:0.8.1-2)', libsmltk0, libsyncevolution0, libsynthesis0, syncevolution-common, syncevolution-libs " \
2008-11-16 12:13:40 +01:00
--maintainer= "'Patrick Ohly <patrick.ohly@gmx.de>'" \
2012-03-09 14:07:18 +01:00
--pkgsource= 'http://syncevolution.org' \
--pkggroup= '$*' \
--pkggroup= 'comm' \
2012-06-11 21:36:26 +02:00
cp -r ` pwd ` /dist/$( distdir) /* / && \
2012-06-15 12:20:46 +02:00
if [ $@ = "rpm" ] ; then cp /usr/src/rpm/RPMS/*/${ PKGNAME } -${ VERSION } -2.*.rpm ..; else mv ${ PKGNAME } _${ VERSION } *.deb ..; fi
2009-07-14 14:16:02 +02:00
2012-03-09 14:07:18 +01:00
# Pseudo platform .deb packages:
# only depend on PKGNAME = syncevolution-$(BINSUFFIX) (usually syncevolution-bundle).
# Version number is only bumped when changing the packaging rules here.
PLATFORM_DEB_VERSION = $( VERSION_deb)
PLATFORM_DEB_RELEASE = 1
i f E N A B L E _ M O D U L E S
deb : syncevolution -kde -deb
deb : syncevolution -evolution -deb
e n d i f
# define which files are relevant for each platform
PLATFORM_FILES_evolution = platformgnome syncecal syncebook
PLATFORM_FILES_kde = platformkde syncakonadi
2012-07-10 09:12:27 +02:00
# Additional parameters for syncevolution-kde/evolution.deb.
2012-03-09 14:07:18 +01:00
# Fake conflicts/replaces works around a bug in CheckInstall,
# which creates empty, invalid entries for those unless
syncevolution.org: compile on Ubuntu Trusty, libical v1/v2 compatibility
syncevolution.org binaries are now getting compiled on Ubuntu Trusty and thus
no longer support distros with older EDS. The code should still compile
against older EDS (for example, for Maemo), but that is not getting tested
anymore.
This allows removing the dynamic linker hacks related to older libraries,
which was only used in those binaries. Instead, backends using libical or EDS
get compiled on Ubuntu Trusty and then the soname of those libs get patched to
make the backend module usable in combination with a different set of
libs. That patching is part of a script maintained in the syncevolution.org
build infrastructure.
This approach was already used before to generate different EDS backends
for EDS versions with the newer EClient API, because that turned out to be
easier than the dynamic loading approach. It works because none of the methods
used by SyncEvolution changed their ABI, only some other parts of the
libraries did. Should there ever be a situation again that cannot be handled
like this, then backends might also get compiled on different distros than
Ubuntu Trusty (however, that may lead to problems due to the libstdc++ ABI
changes - to be decided...).
libical still requires one special hack: system time zone loading in
libical v1 (and only in that version, v2 has builtin support again) must
be overridden such that time zones are generated with rules instead
of transitions because that is more compatible with the peers that
SyncEvolution exchanges data with.
That hack now relies on overriding the two relevant functions inside the main
binaries (has to be there, otherwise libical still ends up calling its own
internal implementation). The overriding code is in
libsyncevo-icaltz-util.so.0 and depends on libical.so.1. If
libsyncevo-icaltz-util.so.0 can be loaded, the wrappers in the main binary use
it, otherwise they fall through to the code from the current libical.so, which
then should be libical.so.2 or more recent.
This hack is active by default when libical v1 is detected during configuration.
2016-09-20 17:19:08 +02:00
# something is given. For Evolution we expect the caller
# to provide the actual dependencies.
2012-07-10 09:12:27 +02:00
SYNCEVOLUTION_kde_DEB_ARGS = \
--conflicts= syncevolution-foobar \
--replaces= syncevolution-foobar
SYNCEVOLUTION_evolution_DEB_ARGS = \
2014-01-06 17:27:19 +01:00
--conflicts= syncevolution-foobar \
2012-07-10 09:12:27 +02:00
--replaces= syncevolution-foobar
SYNCEVOLUTION_evolution_DEB_REQUIRES = \
syncevolution.org: compile on Ubuntu Trusty, libical v1/v2 compatibility
syncevolution.org binaries are now getting compiled on Ubuntu Trusty and thus
no longer support distros with older EDS. The code should still compile
against older EDS (for example, for Maemo), but that is not getting tested
anymore.
This allows removing the dynamic linker hacks related to older libraries,
which was only used in those binaries. Instead, backends using libical or EDS
get compiled on Ubuntu Trusty and then the soname of those libs get patched to
make the backend module usable in combination with a different set of
libs. That patching is part of a script maintained in the syncevolution.org
build infrastructure.
This approach was already used before to generate different EDS backends
for EDS versions with the newer EClient API, because that turned out to be
easier than the dynamic loading approach. It works because none of the methods
used by SyncEvolution changed their ABI, only some other parts of the
libraries did. Should there ever be a situation again that cannot be handled
like this, then backends might also get compiled on different distros than
Ubuntu Trusty (however, that may lead to problems due to the libstdc++ ABI
changes - to be decided...).
libical still requires one special hack: system time zone loading in
libical v1 (and only in that version, v2 has builtin support again) must
be overridden such that time zones are generated with rules instead
of transitions because that is more compatible with the peers that
SyncEvolution exchanges data with.
That hack now relies on overriding the two relevant functions inside the main
binaries (has to be there, otherwise libical still ends up calling its own
internal implementation). The overriding code is in
libsyncevo-icaltz-util.so.0 and depends on libical.so.1. If
libsyncevo-icaltz-util.so.0 can be loaded, the wrappers in the main binary use
it, otherwise they fall through to the code from the current libical.so, which
then should be libical.so.2 or more recent.
This hack is active by default when libical v1 is detected during configuration.
2016-09-20 17:19:08 +02:00
, $( EXTRA_BACKENDS_EBOOK_REQUIRES) \
, $( EXTRA_BACKENDS_ECAL_REQUIRES)
2012-07-10 09:12:27 +02:00
2012-06-11 21:36:26 +02:00
syncevolution-%-deb : checkinstall /dist /$( distdir ) checkinstall /dist /debian /control
( echo " SyncEvolution - meta package for $* " && cat $( srcdir) /description) >checkinstall/description-pak
2012-03-09 14:07:18 +01:00
tmpdir = ` mktemp -d $$ HOME/syncevolution.XXXXXXXXXX` && \
trap " rm -rf $$ tmpdir " EXIT && \
2012-06-11 21:36:26 +02:00
cd checkinstall && \
2012-03-09 14:07:18 +01:00
fakeroot checkinstall </dev/null \
$( TYPE_deb) \
--fstrans= yes \
--strip= no \
--nodoc \
--pkgversion= $( PLATFORM_DEB_VERSION) \
--pkgrelease= $( PLATFORM_DEB_RELEASE) \
2012-07-10 09:12:27 +02:00
$( SYNCEVOLUTION_$* _DEB_ARGS) \
2012-03-09 14:07:18 +01:00
--pkgname= syncevolution-$* \
--pkgarch= all \
2021-09-29 23:01:46 +02:00
--requires= " ' $( shell set -x; cd checkinstall/dist; LD_LIBRARY_PATH = $( distdir) /usr/lib:$( distdir) /usr/lib/syncevolution dpkg-shlibdeps -L$( EXTRA_SHLIBS_LOCAL) --ignore-missing-info -O $$ ( for i in $( patsubst %,$( distdir) /usr/lib/syncevolution/backends/%.so,$( PLATFORM_FILES_$* ) ) ; do if file $$ i | grep ELF >/dev/null; then echo $$ i; fi ; done ) | sed $( REQUIRES_SED_KDE) -e 's/[^=]*=//'), $( PKGNAME) (= $( VERSION_deb) - $( RELEASE) ) $( SYNCEVOLUTION_$* _DEB_REQUIRES) ' " \
2012-03-09 14:07:18 +01:00
--maintainer= "'Patrick Ohly <patrick.ohly@gmx.de>'" \
--pkgsource= 'http://syncevolution.org' \
--pkggroup= '$*' \
2012-06-11 21:36:26 +02:00
sh -c 'mkdir -p touch /usr/share/doc/syncevolution-$* && echo "SyncEvolution platform pseudo-package for $*" >/usr/share/doc/syncevolution-$*/README' && \
2012-06-15 12:20:46 +02:00
mv syncevolution-$* *.deb ..
2012-03-09 14:07:18 +01:00
2012-06-11 21:36:26 +02:00
all_phonies += checkinstall/dist/$( distdir) clean_dist
checkinstall/dist/$(distdir) : all
2009-07-14 14:16:02 +02:00
rm -rf $@
2009-10-15 12:03:04 +02:00
$( MAKE) install DESTDIR = ` pwd ` /$@
$( MAKE) installcheck DESTDIR = ` pwd ` /$@
2012-05-23 16:30:36 +02:00
rm -rf $( call DEV_FILE_PATTERN,$@ ,/usr)
2009-07-14 14:54:57 +02:00
clean-local : clean_dist
clean_dist :
2012-06-11 21:36:26 +02:00
rm -rf checkinstall
2009-07-14 14:16:02 +02:00
2009-07-14 15:02:57 +02:00
# required by dpkg-shlibdeps
2012-06-11 21:36:26 +02:00
checkinstall/dist/debian/control :
2011-08-30 16:24:58 +02:00
mkdir -p ${ dir $@ }
2009-07-14 15:02:57 +02:00
touch $@
2007-10-17 23:08:24 +02:00
2008-08-02 19:48:17 +02:00
# Build "html" inside the build dir, using source files
# from the SyncEvolution source directory and (if built)
# the installed client-api.build directory.
2011-08-30 16:24:58 +02:00
all_phonies += doc clean-html
2008-07-30 22:11:12 +02:00
doc :
rm -rf html
2008-08-02 19:48:17 +02:00
export VERSION = " SyncEvolution $( VERSION) " ; \
2008-07-30 22:11:12 +02:00
export OUTPUT_DIRECTORY = "`pwd`" ; \
2008-08-02 19:48:17 +02:00
export PREDEFINED = "@BACKEND_DEFINES@ ENABLE_UNIT_TESTS ENABLE_INTEGRATION_TESTS" ; \
export CLIENT_LIBRARY = "@FUNAMBOL_SUBDIR@/test @FUNAMBOL_SUBDIR@/include " ; \
export STRIP_FROM_PATH = " $( srcdir) `dirname @FUNAMBOL_SUBDIR@` " ; \
2008-07-30 22:11:12 +02:00
cd $( srcdir) ; doxygen
clean-local : clean -html
clean-html :
rm -rf html
2011-08-30 16:24:58 +02:00
all_dist_hooks += dot_dist_hook
dot_dist_hook :
2009-02-27 11:28:27 +01:00
@if test -d " $( srcdir) /.git " ; \
then \
2011-08-30 16:24:58 +02:00
printf '%s' 'Creating ChangeLog...' && \
( cd " $( top_srcdir) " && \
printf '%s\n\n' '# Generated by configure. Do not edit.' ; \
$( top_srcdir) /missing --run perl $( top_srcdir) /build/gen-changelog.pl ) > ChangeLog.tmp && \
( mv -f ChangeLog.tmp $( top_distdir) /ChangeLog && \
printf '%s\n' ' done.' ) || \
( rm -f ChangeLog.tmp ; \
printf '%s\n' ' failed.' ; \
echo Failed to generate ChangeLog >& 2 ) ; \
2009-02-27 11:28:27 +01:00
else \
2011-08-30 16:24:58 +02:00
echo 'A git checkout is required to generate a ChangeLog.' >& 2; \
2009-02-27 11:28:27 +01:00
fi
2009-10-12 23:49:26 +02:00
2012-07-12 17:59:33 +02:00
# Check that no executable or shared object depends on symbols in
# libraries that it does not link against. Unnecessarily linking
# against libs is okay, that can be caught and fixed by
# -Wl,--as-needed. Depends on dpkg-shlibdeps, skipped if that is
# not available.
all_local_installchecks += toplevel_link_check
toplevel_link_check :
set -x; cd $( DESTDIR) && \
mkdir debian && \
touch debian/control && \
trap "rm -rf debian" EXIT && \
files = $$ ( find $( DESTDIR) /$( prefix) $( DESTDIR) /$( libdir) $( DESTDIR) /$( bindir) $( DESTDIR) /$( libexecdir) -type f -perm /u+x | sort -u) && \
files = $$ ( for i in $$ files; do if file $$ i | grep ELF >/dev/null; then echo $$ i; fi ; done ) && \
if ! dpkg-shlibdeps --version; then \
echo "dpkg-shlibdeps not found, skipping link check" ; \
elif LD_LIBRARY_PATH = usr/lib:usr/lib/syncevolution dpkg-shlibdeps \
--ignore-missing-info -O $$ files \
2>& 1 >/dev/null | \
grep -v $( LINK_CHECK_ALLOWED) | \
grep -e "symbol .* found in none of the libraries" \
-e "contains an unresolvable reference to symbol" \
; then \
echo "linking must be fixed" ; false; \
else \
echo "linking is okay" ; \
fi
# Some exceptions for the link check above (= symbol may be used without linking).
LINK_CHECK_ALLOWED = -e xxxxxxxx
# SySync_ConsolePrintf is expected by libsmltk and has to be provided by caller.
LINK_CHECK_ALLOWED += -e 'SySync_ConsolePrintf.*libsmltk.so'
i f N E O N _ C O M P A T I B I L I T Y
# libneon is intentionally not linked against, to choose between
# GNUTLS and OpenSSL at runtime.
LINK_CHECK_ALLOWED += -e 'symbol ne_.*syncdav.so'
2013-12-04 13:35:53 +01:00
# Allow undefined references to libstdcxx. This happens when
# adding backends compiled on more recent Linux distros into
# the release archive.
LINK_CHECK_ALLOWED += -e '@GLIBCXX_[^ ]* used by'
2012-07-12 17:59:33 +02:00
e n d i f
syncevolution.org: compile on Ubuntu Trusty, libical v1/v2 compatibility
syncevolution.org binaries are now getting compiled on Ubuntu Trusty and thus
no longer support distros with older EDS. The code should still compile
against older EDS (for example, for Maemo), but that is not getting tested
anymore.
This allows removing the dynamic linker hacks related to older libraries,
which was only used in those binaries. Instead, backends using libical or EDS
get compiled on Ubuntu Trusty and then the soname of those libs get patched to
make the backend module usable in combination with a different set of
libs. That patching is part of a script maintained in the syncevolution.org
build infrastructure.
This approach was already used before to generate different EDS backends
for EDS versions with the newer EClient API, because that turned out to be
easier than the dynamic loading approach. It works because none of the methods
used by SyncEvolution changed their ABI, only some other parts of the
libraries did. Should there ever be a situation again that cannot be handled
like this, then backends might also get compiled on different distros than
Ubuntu Trusty (however, that may lead to problems due to the libstdc++ ABI
changes - to be decided...).
libical still requires one special hack: system time zone loading in
libical v1 (and only in that version, v2 has builtin support again) must
be overridden such that time zones are generated with rules instead
of transitions because that is more compatible with the peers that
SyncEvolution exchanges data with.
That hack now relies on overriding the two relevant functions inside the main
binaries (has to be there, otherwise libical still ends up calling its own
internal implementation). The overriding code is in
libsyncevo-icaltz-util.so.0 and depends on libical.so.1. If
libsyncevo-icaltz-util.so.0 can be loaded, the wrappers in the main binary use
it, otherwise they fall through to the code from the current libical.so, which
then should be libical.so.2 or more recent.
This hack is active by default when libical v1 is detected during configuration.
2016-09-20 17:19:08 +02:00
# libgdbussyncevo uses some symbols from libsyncevolution without
# linking against it (circular dependency).
LINK_CHECK_ALLOWED += -e SyncEvo.*libgdbussyncevo -e gsignond_pipe_stream_new.*libgdbussyncevo
LINK_CHECK_ALLOWED += $( EXTRA_LINK_CHECK_ALLOWED)
2012-07-12 17:59:33 +02:00
2012-01-11 10:01:06 +01:00
# Be strict about running 'syncevolution' only when not doing
# cross-compilation: in that case, if running 'syncevolution' fails,
# abort the build process. Otherwise proceed with the fallback below,
# which is to keep the "see --sync/source-property ?" placeholders in
# the README.
i f C O N D _ C R O S S _ C O M P I L I N G
RUN_SYNCEVOLUTION_CHECK = if ( $$ ?) { return "" ; } else { return $$ buffer; }
e l s e
RUN_SYNCEVOLUTION_CHECK = die if $$ ?; return $$ buffer;
e n d i f
2011-10-19 17:16:52 +02:00
# patch README.rst properties on-the-fly
2021-09-29 23:01:46 +02:00
i f C O N D _ C M D L I N E
2011-10-19 17:16:52 +02:00
README.patched.rst : README .rst src /syncevolution
2011-10-24 20:11:08 +02:00
$( AM_V_GEN) perl -e '$$syncfound=0; $$sourcefound=0; $$res=0;' \
2012-01-11 10:22:06 +01:00
-e 'sub run { $$cmd = shift; $$buffer = `env LD_LIBRARY_PATH=src/syncevo/.libs:src/gdbus/.libs:src/gdbusxx/.libs:src/build-synthesis/src/.libs:$$ENV{LD_LIBRARY_PATH} $$cmd`; $(RUN_SYNCEVOLUTION_CHECK) }' \
2011-10-19 17:16:52 +02:00
-e 'while (<>) {' \
-e 's/^:Version: .*/:Version: $(VERSION)/;' \
-e 's/:Date: .*/":Date: " . `date +%Y-%m-%d`/e;' \
2012-01-11 10:01:06 +01:00
-e 'if (s;(<< see "syncevolution --sync-property ." >>\n);run("src/syncevolution --daemon=no --sync-property ?") || $$1;e) { $$syncfound=1; }' \
2014-07-28 15:29:41 +02:00
-e 'if (s;(<< see "syncevolution --datastore-property ." >>\n);run("src/syncevolution --daemon=no --source-property ?") || $$1;e) { $$sourcefound=1; }' \
2011-10-19 17:16:52 +02:00
-e 'print;' \
-e '}' \
2012-01-11 10:01:06 +01:00
-e 'die "<<sync-property>> tag not in README.rst?!" unless $$syncfound;' \
-e 'die "<<source-property>> tag not in README.rst?!" unless $$sourcefound;' \
2011-10-19 17:16:52 +02:00
-e 'exit $$res;' \
$< >$@
2021-09-29 23:01:46 +02:00
e l s e
# Simpler version without inserting the actual sync and datastore properties.
README.patched.rst : README .rst
$( AM_V_GEN) perl -p \
-e 's/^:Version: .*/:Version: $(VERSION)/;' \
-e 's/:Date: .*/":Date: " . `date +%Y-%m-%d`/e;' \
$< >$@
e n d i f
2011-10-19 17:16:52 +02:00
CLEANFILES += README.patched.rst
2010-04-28 21:23:22 +02:00
# produce man pages
2011-10-19 17:16:52 +02:00
syncevolution.1 : README .patched .rst
2011-10-24 20:11:08 +02:00
$( AM_V_GEN) $( RST2MAN) --exit-status= 3 $< >$@
2010-04-28 21:23:22 +02:00
CLEANFILES += syncevolution.1
# README is the traditional name in the distribution,
# continue using it instead of README.rst.
2011-10-24 20:11:08 +02:00
# TODO: replace some of the RST syntax
2011-10-19 17:16:52 +02:00
README : README .patched .rst
2011-10-24 20:11:08 +02:00
$( AM_V_GEN) cp $< $@
2010-04-28 21:23:22 +02:00
CLEANFILES += README
2010-04-28 21:54:31 +02:00
# The README.html is also used on syncevolution.org as "Usage" page,
# therefore we must use <h3> headers and lower to fit into the page.
2011-10-19 17:16:52 +02:00
README.html : README .patched .rst
2011-10-24 20:11:08 +02:00
$( AM_V_GEN) $( RST2HTML) --initial-header-level= 3 --exit-status= 3 $< >$@
2010-04-28 21:54:31 +02:00
CLEANFILES += README.html
2011-08-30 16:24:58 +02:00
.PHONY : $( all_phonies ) ;
installcheck-local : $( all_local_installchecks ) ;
dist-hook : $( all_dist_hooks )
2013-12-17 09:43:21 +01:00
install-exec-hook : $( all_install_exec_hooks )
uninstall-hook : $( all_uninstall_hooks )
2011-08-30 16:24:58 +02:00
syncevolution.org: compile on Ubuntu Trusty, libical v1/v2 compatibility
syncevolution.org binaries are now getting compiled on Ubuntu Trusty and thus
no longer support distros with older EDS. The code should still compile
against older EDS (for example, for Maemo), but that is not getting tested
anymore.
This allows removing the dynamic linker hacks related to older libraries,
which was only used in those binaries. Instead, backends using libical or EDS
get compiled on Ubuntu Trusty and then the soname of those libs get patched to
make the backend module usable in combination with a different set of
libs. That patching is part of a script maintained in the syncevolution.org
build infrastructure.
This approach was already used before to generate different EDS backends
for EDS versions with the newer EClient API, because that turned out to be
easier than the dynamic loading approach. It works because none of the methods
used by SyncEvolution changed their ABI, only some other parts of the
libraries did. Should there ever be a situation again that cannot be handled
like this, then backends might also get compiled on different distros than
Ubuntu Trusty (however, that may lead to problems due to the libstdc++ ABI
changes - to be decided...).
libical still requires one special hack: system time zone loading in
libical v1 (and only in that version, v2 has builtin support again) must
be overridden such that time zones are generated with rules instead
of transitions because that is more compatible with the peers that
SyncEvolution exchanges data with.
That hack now relies on overriding the two relevant functions inside the main
binaries (has to be there, otherwise libical still ends up calling its own
internal implementation). The overriding code is in
libsyncevo-icaltz-util.so.0 and depends on libical.so.1. If
libsyncevo-icaltz-util.so.0 can be loaded, the wrappers in the main binary use
it, otherwise they fall through to the code from the current libical.so, which
then should be libical.so.2 or more recent.
This hack is active by default when libical v1 is detected during configuration.
2016-09-20 17:19:08 +02:00
# Can be overridden during make invocation to inject additional commands.
CREATE_EXTRA_BACKENDS = true
2011-08-30 16:24:58 +02:00
# Force sequential installation. This is a workaround for relinking failures
2012-03-08 14:44:46 +01:00
# during concurrent distcheck (a backend was relinked against not yet installed
2011-08-30 16:24:58 +02:00
# libsyncevolution.la).
2013-10-23 10:36:09 +02:00
#
2014-01-06 17:27:19 +01:00
# Also used to add additional backends. EXTRA_BACKENDS must already contain
# renamed files, by convention using -2.so, -3.so, etc as suffix instead of the
# base file's .so.
2011-08-30 16:24:58 +02:00
install-am : all -am
@$( MAKE) $( AM_MAKEFLAGS) install-exec-am
@$( MAKE) $( AM_MAKEFLAGS) install-data-am
syncevolution.org: compile on Ubuntu Trusty, libical v1/v2 compatibility
syncevolution.org binaries are now getting compiled on Ubuntu Trusty and thus
no longer support distros with older EDS. The code should still compile
against older EDS (for example, for Maemo), but that is not getting tested
anymore.
This allows removing the dynamic linker hacks related to older libraries,
which was only used in those binaries. Instead, backends using libical or EDS
get compiled on Ubuntu Trusty and then the soname of those libs get patched to
make the backend module usable in combination with a different set of
libs. That patching is part of a script maintained in the syncevolution.org
build infrastructure.
This approach was already used before to generate different EDS backends
for EDS versions with the newer EClient API, because that turned out to be
easier than the dynamic loading approach. It works because none of the methods
used by SyncEvolution changed their ABI, only some other parts of the
libraries did. Should there ever be a situation again that cannot be handled
like this, then backends might also get compiled on different distros than
Ubuntu Trusty (however, that may lead to problems due to the libstdc++ ABI
changes - to be decided...).
libical still requires one special hack: system time zone loading in
libical v1 (and only in that version, v2 has builtin support again) must
be overridden such that time zones are generated with rules instead
of transitions because that is more compatible with the peers that
SyncEvolution exchanges data with.
That hack now relies on overriding the two relevant functions inside the main
binaries (has to be there, otherwise libical still ends up calling its own
internal implementation). The overriding code is in
libsyncevo-icaltz-util.so.0 and depends on libical.so.1. If
libsyncevo-icaltz-util.so.0 can be loaded, the wrappers in the main binary use
it, otherwise they fall through to the code from the current libical.so, which
then should be libical.so.2 or more recent.
This hack is active by default when libical v1 is detected during configuration.
2016-09-20 17:19:08 +02:00
$( CREATE_EXTRA_BACKENDS) $( DESTDIR) /$( BACKENDS_DIRECTORY)
2014-01-06 17:27:19 +01:00
for i in $( EXTRA_BACKENDS) ; do $( INSTALL) $$ i $( DESTDIR) /$( BACKENDS_DIRECTORY) /; done
2013-10-23 10:36:09 +02:00
# Necessary for "make distcheck": must not leave files behind.
uninstall-local :
2014-01-06 17:27:19 +01:00
rm -f $( DESTDIR) /$( BACKENDS_DIRECTORY) /*-[ 0-9] .so
2011-08-30 16:24:58 +02:00
.DELETE_ON_ERROR :