Commit Graph

12 Commits

Author SHA1 Message Date
0f0bb5d89f globals.mk: Remove dead code.
astyle was removed in favor of clang-format in commit
85510893d5.

* globals.mk (ASTYLERC, indent): Delete variables.
(indent): Delete target.

Change-Id: I138f887a5845ff24e12c5c8ece26e30d4cfc7616
2022-02-25 15:20:00 -05:00
e23a88672d account: Make the default ringtone path portable.
Before this change, the default ringtone path would be for example set
to "/data/data/cx.ring/files/ringtones/default.opus" on Android;
migrating the account to GNU/Linux would cause the ringtone to not be
found.  The change leverages existing code that searches for a base
file name in a JAMI_DATADIR-prefixed location.

* globals.mk: Set JAMI_DATADIR from the environment if it's defined.
* src/account.cpp (DEFAULT_RINGTONE_PATH): Universally set to
"default.opus";
* src/manager.cpp: Add a definition check for the JAMI_DATADIR macro.
(Manager::playRingtone): Go through the ringtone path resolution
scheme on all platforms.  Some platforms will need to define the
JAMI_DATADIR macro correctly for this to work; for example the
libjami build on Android should have the JAMI_DATADIR macro set to
"/data/data/cx.ring/files" for this to work correctly.

Accompanying client-android change:
https://review.jami.net/c/jami-client-android/+/21148

Co-authored-by: Amin Bandali <amin.bandali@savoirfairelinux.com>
Change-Id: Ia408a8db263af91c2734f61aa38c4ed717605359
2022-02-25 09:15:40 -05:00
754ae6bfdb build: Rename PROGSHAREDIR to JAMI_DATADIR.
This name matches a common naming convention in build systems.

* compat/msvc/config.h (PROGSHAREDIR): Rename to...
(JAMI_DATADIR) ... this.
* globals.mk (-DJAMI_DATADIR): Likewise.
* meson.build (conf): Likewise.
* src/account.cpp: Likewise.
* src/manager.cpp (Manager::playRingtone): Likewise.

Change-Id: I123251f3e420948bc7359ce0a3ac54bddd12977a
2022-01-20 13:31:58 -05:00
ba3a411ca3 daemon: Rename dring occurrences in code and file names to jamid.
Automated using the following commands:

  $ mv src/{dring,jami}
  $ git grep -l src/dring | xargs sed -i 's,src/dring,src/jami,g'
  $ git grep -l '#include "dring/' | \
    xargs sed -i 's,#include "dring/,#include "jami/,g'
  $ git grep -l 'dring.h' | xargs sed -i 's,dring.h,jami.h,g'

And finally,

  $ git grep -l 'dring' | xargs sed -i 's,dring,jami,g'

  $ files=$(find -name '*dring*' | sort)
  $ for f in $files; do mkdir -p "$(dirname "$f")"; \
      mv "$f" "$(echo $f | sed 's/dring/jami/g')"; done

To resolve a bad renaming favorably:

  $ git grep -l -i AlsaCarjami | \
    xargs sed -i -E 's/([Aa])lsaCarjami/\1lsaCardRingtone/g'

The above renaming command is not perfect, so some hand-tuning was
required to complete it.

* src/manager.cpp (Manager::ManagerPimpl::retrieveConfigPath):
Preserve the dring.yml configuration file name, until we add something
to migrate (rename) it to jami.yml.
* man/dring.pod: Delete.
* bin/dbus/jamid.pod: Move to ...
* man/jamid.pod: here.
* bin/dbus/meson.build (jamid_targets): Normalize man section to the
pre-existing 1 and adjust accordingly.
* src/jami/def.h (dring_EXPORTS): Rename to ...
(jami_EXPORTS): ... this.

change-Id: I9828be6da9c711ab2f22c4d1b9539fea89d7b6fb
2021-07-15 10:57:26 -04:00
f0fb8148ba daemon: Use the PROGSHAREDIR macro to refer to the custom datadir.
The sources previously hard-coded the location of the default Jami
ringtone as "/usr/share/ring/ringtones/default.opus".  It should
instead be computed from the already existing PROGSHAREDIR macro,
which is built from Autoconf's configurable datadir.

* globals.mk (-DPROGSHAREDIR): Rename the 'ring' subdirectory to
'jami'.
* meson.build (conf): Likewise.
* ringtones/Makefile.am (dist_jamiringtones_DATA): s/ring/jami/g
* ringtones/meson.build: Likewise.
* src/account.cpp (DEFAULT_RINGTONE_PATH): Define in terms of
PROGSHAREDIR.
* bin/dbus/Makefile.am (libclient_dbus_la_CXXFLAGS): Remove extraneous
flags, already propagated via AM_CPPFLAGS.  Honor AM_CXXFLAGS.
* src/client/Makefile.am (libclient_la_CXXFLAGS): Remove.
* src/plugin/Makefile.am (libplugin_la_CXXFLAGS): Likewise.

Change-Id: Icaa0a92e896f86b0bb07f82e4079570db08fafbd
2021-06-28 10:52:29 -04:00
2afa99fd12 daemon: Install dring to libexec and edit templates at install time.
Executables are typically installed under bin/, sbin/ or libexec,
rather than lib/.  The problem was noticed when trying to use Jami
with a Guix relocatable pack, which only wraps executables found under
the above locations.  Since dring is a daemon and should not be run
directly by users under normal circumstances, the convention is to use
the libexec directory, according to the File Hierchy Standard 3.0.

Also tackled in this change is the substitution of the Autoconf
variables at installation time rather than configuration time, as per
the GNU Coding Standards.  The following solution is taken from
https://github.com/gentoo/eudev/pull/183/commits, which in turn is
adapted from the Autoconf manual (c.f.: info "(autoconf)Installation
Directory Variables").

* bin/Makefile.am (ringlibdir): Delete variable.
* bin/dbus/Makefile.am (do_subst): New variable.
(cx.ring.Ring.service): Derive from the cx.ring.Ring.service.in
template.
[HAVE_WIN32]: (ringlib_PROGRAMS): Rename to ...
(bin_PROGRAMS): ... this.
[HAVE_OSX, RING_DBUS]: Likewise.
* bin/dbus/cx.ring.Ring.service.in (Exec): Adust.
* globals.mk (ringlibdir): Delete variable.
* configure.ac [with_dbus] <AC_CONFIG_FILES>: Remove
bin/dbus/cx.ring.Ring.service.  Also remove the LIBDIR variable, no
longer used.  Fix indentation.

Thanks to Vladimir Stoiakin for providing feedback on this change.

Change-Id: I845bf2bd590a9457e70ca173027217b8f164d713
2021-06-22 15:32:29 -04:00
bfe7a84454 configure.ac: Do not set user variables.
The CFLAGS, CXXFLAGS, LDFLAGS and other variables intended to be
overridden by the user should not directly be set by the package.
This change uses one of the approaches recommended by the Autoconf and
Automake manuals, which is to use custom variables to accumulate flags
in the configure script and add them to the make targets they apply
to.  This has the benefit of not cluttering the flags used during the
Autoconf tests, which has proved problematic (see the previous commit
for a demonstration).

* configure.ac: Replace CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS by
DAEMONCFLAGS, DAEMONCXXFLAGS, DAEMONCPPFLAGS and DAEMONLDFLAGS,
respectively.
Use these custom variables as the default values of AM_CFLAGS,
AM_CXXFLAGS, AM_CPPFLAGS and AM_LDFLAGS, respectively.  Remove an
extraneous check on jsoncpp.
* bin/Makefile.am (ringcli_CXXFLAGS): Honor the the AM_CXXFLAGS variable.
globals.mk: Extend rather than override the AM_CPPFLAGS variable.
* src/Makefile.am (libring_la_LDFLAGS): Honor AM_LDFLAGS.
(libring_la_CFLAGS): Honor AM_CFLAGS.
(libring_la_CXXFLAGS): Honor AM_CXXFLAGS.
* src/client/Makefile.am (libclient_la_CXXFLAGS): Honor AM_CXXFLAGS.
* src/im/Makefile.am (libim_la_CXXFLAGS): Remove variable.
* src/jamidht/Makefile.am (libringacc_la_CXXFLAGS): Likewise.
* src/media/audio/Makefile.am (libaudio_la_CXXFLAGS): Honor
AM_CXXFLAGS.
(libaudio_la_LDFLAGS): Honor the AM_CXXFLAGS variable.
* src/media/audio/coreaudio/Makefile.am (libcoreaudiolayer_la_CXXFLAGS):
Likewise.
* src/media/video/Makefile.am (libvideo_la_CFLAGS): Honor the
AM_CFLAGS variable.
(libvideo_la_CXXFLAGS): Honor the AM_CXXFLAGS variable.
* src/media/video/v4l2/Makefile.am (AM_CXXFLAGS): Extend rather than
override.
* src/plugin/Makefile.am (libplugin_la_CXXFLAGS): Honor the
AM_CXXFLAGS variable.
* src/security/Makefile.am (libsecurity_la_CXXFLAGS): Likewise.
* src/sip/Makefile.am (libsiplink_la_CXXFLAGS): Likewise.
* src/upnp/Makefile.am (libupnpcontrol_la_CXXFLAGS): Remove variable.
* src/upnp/protocol/Makefile.am (libupnpprotocol_la_CXXFLAGS): Likewise.
* src/upnp/protocol/natpmp/Makefile.am (libnat_pmp_la_CXXFLAGS): Likewise.
* src/upnp/protocol/pupnp/Makefile.am (libpupnp_la_CXXFLAGS): Likewise.
* test/sip/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Extend rather than override.
* test/unitTest/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Likewise.

GitLab: #487
Change-Id: I18be9d812159f8156efb9f7849e7eac6d4c6b3ca

squash! configure.ac: Do not set user variables.

Change-Id: I1146ea15d6fb75fe53d3cbdd782e981c933e82a6
2021-03-28 16:04:36 -04:00
67bb967fe2 build: properly carry build flags
Fix build flags for two directories, clean globals.

Change-Id: I2c2fb1fd7f73c8097de05f641ad3e71ccbabd965
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-08-07 16:52:30 -04:00
2cbbaf7983 configure: remove ilbc and gsm
FFmpeg's RTP muxer does not support GSM, while Ubuntu does not package
iLBC. Removes the old configure switches.

Removes package detection from contrib. Keeps contrib rules in case GSM
is later readded.

Change-Id: I705a521e2baf34c757c22a72e04cdf27233b5a7b
2018-07-30 13:15:51 -04:00
943bc85218 android: fix build on arm64
Change-Id: I9930519d16063a6d127fd82c7821ed197c8441d2
Tuleap: #1509
2017-02-10 16:23:05 -05:00
9da60b3558 increase pjsip max packet size
Increase PJSIP_MAX_PKT_LEN to 8000 bytes.
This permits big SIP invite message with many ICE candidates.

Change-Id: I02097f54a2b01087dfdad4474eedbed2a67b0955
2016-11-11 18:51:34 -05:00
148b58f267 build: Rename 'globals.mak' to 'globals.mk'.
In GNU packages the '.mk' extension is commonly used for Makefile
fragments.  Moreover it allows Emacs to choose 'makefile-mode'
automatically when opening it.

Change-Id: Ia35e5471b6852226027f975395cd21834783674b
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2016-11-07 16:48:55 -05:00