Commit 8693e0af authored by Guido Gunther's avatar Guido Gunther
Browse files

Make it obvious that this repository is no longer used.

parent 86b3f75c
((nil . ((indent-tabs-mode . nil)))
;; thanks to Mohammed Sadiq, see https://source.puri.sm/Librem5/calls/-/merge_requests/332#note_159469
(c-mode . ((c-macro-names-with-semicolon
. ("G_BEGIN_DECLS" "G_END_DECLS" "G_DECLARE_FINAL_TYPE" "G_DEFINE_QUARK"
"G_DECLARE_DERIVABLE_TYPE" "G_DECLARE_INTERFACE" "G_DEFINE_TYPE"
"G_DEFINE_TYPE_WITH_PRIVATE" "G_DEFINE_ABSTRACT_TYPE"
"G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE")))))
_build
*.swp
*~
\#*#
.\#*
build
.buildconfig
.flatpak-builder
\ No newline at end of file
include:
- 'https://source.puri.sm/Librem5/librem5-ci/raw/master/librem5-pipeline-definitions.yml'
- 'https://source.puri.sm/Librem5/librem5-ci/raw/master/librem5-pipeline-byzantium-jobs.yml'
stages:
- build
- test
- package
- test-package
build:native:
stage: build
artifacts:
paths:
- _build
variables:
COMMON_BUILD_OPTS: -Db_coverage=true --werror
BUILD_OPTS: -Dgtk_doc=true ${COMMON_BUILD_OPTS}
WANT_BUILD_DEPS: "true"
except:
variables:
- $PKG_ONLY == "1"
image: pureos/byzantium
tags:
- librem5
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
- apt-get -y install lcov
- apt-get -y build-dep .
- ulimit -c unlimited
script:
- 'echo "Build opts: ${BUILD_OPTS}"'
- meson ${BUILD_OPTS} . _build
- ninja -C _build
test:native:
extends: build:native
stage: test
dependencies:
- build:native
script:
- export LC_ALL=C.UTF-8
- xvfb-run -s -noreset ninja -C _build test
- cp _build/src/libcalls-vala.a.p/*.c _build
- ninja -C _build coverage
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
build-gtkdoc:
extends: build:native
stage: test
dependencies:
- build:native
script:
- ninja -C _build calls-doc
- mv _build/doc/html/ _reference/
artifacts:
paths:
- _reference
check-po:
extends: build:native
stage: test
dependencies:
- build:native
before_script:
- apt-get -y update
- apt-get -y install intltool
script:
# barf on untranslated C files. Seems intltool
# can't be told to exit with non-zero exit status
# in this case
- cd po/
- intltool-update -m 2>&1 | grep -qs '/.*\.c' && { intltool-update -m; exit 1; } || exit 0
# For some reason including https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml fails with a network error (status code 500), therefore it's copied here
.flatpak:
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
stage: 'package'
interruptible: true
tags:
- flatpak
script:
- rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS}
- flatpak-builder --user --disable-rofiles-fuse flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}
# Generate a Flatpak bundle
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
- tar cf repo.tar repo/
artifacts:
name: 'Flatpak artifacts'
expose_as: 'Get Flatpak bundle here'
when: 'always'
paths:
- "${BUNDLE}"
- 'repo.tar'
- '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/meson-log.txt'
- '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/testlog.txt'
expire_in: 14 days
cache:
key: "$CI_JOB_NAME"
paths:
- '.flatpak-builder/downloads'
- '.flatpak-builder/git'
flatpak:master:
extends: .flatpak
stage: package
variables:
MANIFEST_PATH: "org.gnome.Calls.json"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
FLATPAK_MODULE: "calls"
MESON_ARGS: ""
APP_ID: "org.gnome.Calls"
BUNDLE: "calls.flatpak"
# What problem did you encounter
## What is the actual behaviour?
## What is the expected behaviour?
## How to reproduce
Please provide steps to reproduce the issue. If it's a graphical issue please
attach screenshots.
# Which version of Calls did you encounter the bug in?
- [ ] I compiled it myself. If you compiled Calls from source please provide the
git revision via e.g. by running ``git log -1 --pretty=oneline`` and pasting
the output below.
- [ ] I used the precompiled Debian package (e.g. by running a prebuilt
image). Please paste the output of ``dpkg -s calls`` below.
```
Calls Version:
```
# What hardware are you running Calls on?
- [ ] Librem 5
- [ ] Librem 5 devkit
- [ ] amd64 qemu image
- [ ] other (please elaborate)
# What modem are you using?
# Releveant logfiles
Please provide relevant logs. You can list the logs since last boot read
with ``journalctl -b 0``.
This diff is collapsed.
Building
========
For build instructions see the README.md
Pull requests
=============
Before filing a pull request run the tests:
```sh
ninja -C _build test
```
Use descriptive commit messages, see
https://wiki.gnome.org/Git/CommitMessages
and check
https://wiki.openstack.org/wiki/GitCommitMessages
for good examples.
Coding Style
============
While much of the original codebase was written using [GNU's Coding Style][1],
please try to follow this document for newly written code.
For existing code you should probably try to not mix different code styles too much.
This coding style is heavily inspired/copied from [phosh's Coding Style][2]
which itself is mostly using [libhandy's Coding Style][3].
These are the differences:
- We're not picky about GTK+ style function argument indentation, that is
having multiple arguments on one line is also o.k.
- For callbacks we additionally allow for the `on_<action>` pattern e.g.
`on_feedback_ended ()` since this helps to keep the namespace
clean.
- Since we're not a library we usually use `G_DEFINE_TYPE` instead of
`G_DEFINE_TYPE_WITH_PRIVATE` (except when we need a deriveable
type) since it makes the rest of the code more compact.
Source file layout
------------------
We use one file per GObject. It should be named like the GObject with
the calls prefix, lowercase and '_' replaced by '-'. So a hypothetical
`CallsThing` would go to `src/calls-thing.c`. The
individual C files should be structured as (top to bottom of file):
- License boilerplate
```c
/*
* Copyright (C) year copyright holder
*
* SPDX-License-Identifier: GPL-3-or-later
* Author: you <youremail@example.com>
*/
```
- A log domain
```C
#define G_LOG_DOMAIN "CallsThing"
```
Usually just the GObject.
- `#include`s:
Calls ones go first, then glib/gtk, then generic C headers. These blocks
are separated by newline and each sorted alphabetically:
```
#define G_LOG_DOMAIN "CallsThing"
#include "calls-things.h"
#include "calls-other-things.h"
#include <gio/gdesktopappinfo.h>
#include <glib/glib.h>
#include <math.h>
```
This helps to detect missing headers in includes.
- docstring
- property enum
```c
enum {
PROP_0,
PROP_FOO,
PROP_BAR,,
LAST_PROP
};
static GParamSpec *props[LAST_PROP];
```
- signal enum
```c
enum {
FOO_HAPPENED,
BAR_TRIGGERED,
N_SIGNALS
};
static guint signals[N_SIGNALS] = { 0 };
```
- type definitions
```c
typedef struct _CallsThing {
GObject parent;
...
} CallsThing;
G_DEFINE_TYPE (CallsThing, calls_thing, G_TYPE_OBJECT)
```
- private methods and callbacks (these can also go at convenient
places above `calls_thing_constructed ()`
- `calls_thing_set_properties ()`
- `calls_thing_get_properties ()`
- `calls_thing_constructed ()`
- `calls_thing_dispose ()`
- `calls_thing_finalize ()`
- `calls_thing_class_init ()`
- `calls_thing_init ()`
- `calls_thing_new ()`
- Public methods, all starting with the object name(i.e. `calls_thing_`)
The reason public methods go at the bottom is that they have declarations in
the header file and can thus be referenced from anywhere else in the source
file.
Try to avoid forward declarations where possible.
[1]: https://www.gnu.org/prep/standards/standards.html#Formatting
[2]: https://source.puri.sm/Librem5/phosh/blob/master/HACKING.md#coding-style
[3]: https://source.puri.sm/Librem5/libhandy/blob/master/HACKING.md#coding-style
# Calls
[![Code coverage](https://source.puri.sm/Librem5/calls/badges/master/coverage.svg)](https://source.puri.sm/Librem5/calls/commits/master)
A phone dialer and call handler.
## License
As of 2021-07-12 Upstream development moved to *GNOME*. The new location for code
and issues is at https://gitlab.gnome.org/GNOME/calls.
Calls is licensed under the GPLv3+.
## Dependencies
To build Calls you need to first install the build-deps defined by [the debian/control file](https://source.puri.sm/Librem5/calls/blob/master/debian/control#L6)
If you are running a Debian based distribution, you can easily install all those the dependencies making use of the following command
sudo apt-get build-dep .
## Building
We use the meson and thereby Ninja. The quickest way to get going is
to do the following:
meson . _build
ninja -C _build
ninja -C _build install
If you don't want to pollute your filesystem please be aware, that you can also
use `--prefix=~/install`.
### Build the documentation
If you want to build the documentation you have to configure the meson project
with `-Ggtk_doc=true`
meson . _build -Dgtk_doc=true
ninja -C _build
ninja -C _build calls-doc
## Running
Calls has a variety of backends. The default backend is "mm", which
utilises ModemManager. To choose a different backend, use the -p
command-line option. For example, to run with the dummy backend and
some useful debugging output:
export G_MESSAGES_DEBUG=all
/usr/local/bin/gnome-calls -p dummy
If using ModemManager, Calls will wait for ModemManager to appear on
D-Bus and then wait for usable modems to appear. The UI will be
inactive and display a status message until a usable modem appears.
### Running from the build directory
You can run calls without having to install it by executing the run script in
the build folder, i.e. `_build/run`. This script will setup the needed environment
and start Calls.
### Call provider backends
Call provider backends are compiled as plugins and can be loaded and unloaded at runtime
using the `-p` command line flag, followed by the plugin name.
Setting the `CALLS_PLUGIN_DIR` environment variable will include the specified
directory in the plugin search path. F.e.
export CALLS_PLUGIN_DIR=_build/plugins/
/usr/local/bin/gnome-calls -p dummy
### oFono
There is also an oFono backend, "ofono". This was the first backend
developed but has been superceded by the ModemManager backend so it
may suffer from a lack of attention.
The ofono backend depends on oFono Modem objects being present on
D-Bus. To run oFono with useful output:
sudo OFONO_AT_DEBUG=1 ofonod -n -d
The test programs within the [oFono source
tree](https://git.kernel.org/pub/scm/network/ofono/ofono.git) are
useful to bring up a modem to a suitable state. For example:
cd $OFONO_SOURCE/test
./list-modems
./enable-modem /sim7100
./online-modem /sim7100
Then run Calls:
/usr/bin/gnome-calls -p ofono
#### Phonesim
One can also make use of the oFono modem simulator, phonesim (in the
ofono-phonesim package in Debian):
ofono-phonesim -p 12345 -gui /usr/local/share/phonesim/default.xml
then, ensuring /etc/ofono/phonesim.conf has appropriate contents like:
[phonesim]
Address=127.0.0.1
Port=12345
run oFono as above, then:
cd $OFONO_SOURCE/test
./enable-modem /phonesim
./online-modem /phonesim
And again run Calls.
The packaging for the *Librem 5* and *PureOS*
lives at https://source.puri.sm/Librem5/debs/pkg-calls.
From 5b34d5883d1c7fc9d306491a0823badcaf03bdda Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Fri, 8 Nov 2019 16:44:18 +0100
Subject: [PATCH] Remove java dep, and fix build issue in libphonenumber
Java is used only for generating the metadata which is already included
in the git repo. Related upstream MR: https://github.com/google/libphonenumber/pull/2363
---
cpp/CMakeLists.txt | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 38ce1f50..b5e2770b 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -130,9 +130,6 @@ endif ()
find_required_program (PROTOC protoc
"Google Protocol Buffers compiler (protoc)")
-find_required_program (JAVA java
- "Java Runtime Environment")
-
if (APPLE)
FIND_LIBRARY (COREFOUNDATION_LIB CoreFoundation)
FIND_LIBRARY (FOUNDATION_LIB Foundation)
@@ -268,13 +265,10 @@ function (add_metadata_gen_target TARGET_NAME
set (METADATA_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/phonenumbers")
set (GEN_OUTPUT "${METADATA_SOURCE_DIR}/${METADATA_TYPE}.cc"
"${METADATA_SOURCE_DIR}/${METADATA_HEADER}.h")
- set (JAR_PATH "${CMAKE_SOURCE_DIR}/../tools/java/cpp-build/target")
- set (JAR_PATH "${JAR_PATH}/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar")
-
add_custom_command (
- COMMAND ${JAVA_BIN} -jar
- ${JAR_PATH} BuildMetadataCppFromXml ${XML_FILE}
- ${CMAKE_SOURCE_DIR}/src/phonenumbers ${METADATA_TYPE}
+ COMMAND echo "skip metadata generation from"
+ ${XML_FILE} "to"
+ ${CMAKE_SOURCE_DIR}/src/phonenumbers ${METADATA_TYPE}
OUTPUT ${GEN_OUTPUT}
DEPENDS ${XML_FILE}
@@ -314,7 +308,7 @@ add_metadata_gen_target (
${TEST_METADATA_TARGET}
"${RESOURCES_DIR}/PhoneNumberMetadataForTesting.xml"
"test_metadata"
- "metadata"
+ "test_metadata"
)
list (APPEND TESTING_LIBRARY_SOURCES "src/phonenumbers/test_metadata.cc")
--
2.20.1
#!/usr/bin/env python3
from os import environ, path
from subprocess import call
# Package managers set this, so we don't need to run
if not environ.get('DESTDIR', ''):
prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = path.join(prefix, 'share')
print('Updating icon cache...')
call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])
print('Updating desktop database...')
call(['update-desktop-database', path.join(datadir, 'applications')])
print('Compiling schemas...')
call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')])
<?xml version="1.0" encoding="UTF-8"?>
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
<name>Calls</name>
<shortname>Calls</shortname>
<shortdesc>A phone call dialer</shortdesc>
<description>Calls is a dialer for phone calls, initially PSTN calls
but eventually other systems like SIP in future.</description>
<homepage rdf:resource="https://source.puri.sm/Librem5/calls" />
<license rdf:resource="http://usefulinc.com/doap/licenses/gpl" />
<programming-language>C</programming-language>
<maintainer>
<foaf:Person>
<foaf:name>Julian Sparber</foaf:name>
<foaf:mbox rdf:resource="mailto:julian.sparber@puri.sm" />
<gnome:userid>jsparber</gnome:userid>
</foaf:Person>
</maintainer>
<maintainer>
<foaf:Person>
<foaf:name>Evangelos Ribeiro Tzaras</foaf:name>
<foaf:mbox rdf:resource="mailto:evangelos.tzaras@puri.sm" />
<foaf:mbox rdf:resource="mailto:devrtz@fortysixandtwo.eu" />
<gnome:userid>devrtz</gnome:userid>
</foaf:Person>
</maintainer>
</Project>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
height="16"
id="svg7384"
version="1.1"
width="16">
<metadata
id="metadata90">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386">
<linearGradient
id="linearGradient7212"
osb:paint="solid">
<stop
id="stop7214"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
</linearGradient>
</defs>
<path
class="error"
id="path14066"
d="M 2 4 L 2 10 L 3 10 C 3.5522848 10 4 9.5522848 4 9 L 4 7.4140625 L 9 12.414062 L 13.697266 7.7167969 A 1 1 0 0 0 14 7 L 14 6 L 13 6 A 1 1 0 0 0 12.292969 6.2929688 L 9 9.5859375 L 5.4160156 6 L 7 6 C 7.5522848 6 8 5.5522848 8 5 L 8 4 L 2 4 z "
style="opacity:1;vector-effect:none;fill:#ed333b;fill-opacity:1;stroke:none;stroke-width:1.99999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
height="16"
id="svg7384"
version="1.1"
width="16">
<metadata
id="metadata90">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386">
<linearGradient
id="linearGradient7212"
osb:paint="solid">
<stop
id="stop7214"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
</linearGradient>
</defs>
<path
id="path819"
d="M 9,13 V 12 C 9,11.44772 8.552285,11 8,11 H 6.414062 l 6.289063,-6.2910203 c 1.027617,-0.93764 -0.463493,-2.43908 -1.408203,-1.41796 L 5,9.5937497 v -1.59375 c -0.0011,-0.55152 -0.448476,-0.99805 -1,-0.99805 v -0.00195 H 3 V 13 Z"
style="opacity:1;vector-effect:none;fill:#3584e4;fill-opacity:1;stroke:none;stroke-width:1.99999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</svg>