Skip to content
Snippets Groups Projects
Commit 863f4199 authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

Add placeholder

Inform users where the project moved to
parent 527689df
No related branches found
No related tags found
1 merge request!255Add placeholder
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
[meson.build]
indent_size = 2
tab_size = 2
indent_style = space
[*.{c,h,h.in}]
indent_size = 2
tab_size = 2
indent_style = space
max_line_length = 80
[*.xml]
indent_size = 2
tab_size = 2
indent_style = space
[*.json]
indent_size = 2
tab_size = 2
indent_style = space
[NEWS]
max_line_length = 72
.clang_complete
_build/
wayland-*-protocol.*
On branch master
debian/.debhelper/
debian/debhelper-build-stamp
debian/files
debian/*.substvars
debian/phoc/
obj-*/
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-amber-jobs.yml'
- 'https://source.puri.sm/Librem5/librem5-ci/raw/master/librem5-pipeline-byzantium-jobs.yml'
stages:
- build
- test
- package
- test-package
variables:
DEPS: git lcov
ALPINE_EDGE_DEPS: |
git meson ninja gnome-desktop-dev gobject-introspection-dev
libinput-dev wayland-dev wayland-protocols libxkbcommon-dev wlroots-dev
XVFB_RUN: xvfb-run -s -noreset
.tags: &tags
tags:
- librem5
.build: &build
script:
- export LC_ALL=C.UTF-8
- git submodule update --init
- meson . _build $BUILD_ARGS
- ninja -C _build
- ninja -C _build install
.before_script_debian: &before_script_debian
- rm -f ../* || true
- apt-get -y update
- apt-get -y install $DEPS
- apt-get -y build-dep .
.before_script_debian_buster: &before_script_debian_buster
# meson in buster is too old
- apt-get -y update
- apt-get -y install wget ca-certificates gnupg
- wget -O- https://ci.puri.sm/ci-repo.key | apt-key add -
- echo "deb https://ci.puri.sm/ scratch librem5" > /etc/apt/sources.list.d/ci.list
- *before_script_debian
.before_script_alpine: &before_script_alpine
- apk -q add alpine-sdk
- apk -q add $ALPINE_EDGE_DEPS
build-with-xwayland-debian-buster:
stage: build
image: debian:buster
before_script: *before_script_debian_buster
variables:
BUILD_ARGS: -Dxwayland=enabled -Db_coverage=true
<<: *tags
<<: *build
artifacts:
paths:
- _build
except:
variables:
- $PKG_ONLY == "1"
build-with-xwayland-debian-bullseye:
stage: build
image: debian:bullseye
before_script: *before_script_debian
variables:
BUILD_ARGS: -Dxwayland=enabled
<<: *tags
<<: *build
except:
variables:
- $PKG_ONLY == "1"
build-without-xwayland-debian-buster:
stage: build
image: debian:buster
before_script: *before_script_debian_buster
variables:
BUILD_ARGS: -Dxwayland=disabled
<<: *tags
<<: *build
except:
variables:
- $PKG_ONLY == "1"
build-with-xwayland-alpinelinux-edge:
stage: build
image: alpine:edge
before_script: *before_script_alpine
variables:
BUILD_ARGS: -Dxwayland=enabled
<<: *tags
<<: *build
allow_failure: true
except:
variables:
- $PKG_ONLY == "1"
build-without-xwayland-alpinelinux-edge:
stage: build
image: alpine:edge
before_script: *before_script_alpine
variables:
BUILD_ARGS: -Dxwayland=disabled
<<: *tags
<<: *build
allow_failure: true
except:
variables:
- $PKG_ONLY == "1"
unit-test-with-xwayland-debian-buster:
<<: *tags
stage: test
image: debian:buster
needs:
- build-with-xwayland-debian-buster
before_script: *before_script_debian_buster
script:
- ${XVFB_RUN} ninja -C _build test
- ${XVFB_RUN} ninja -C _build coverage
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
artifacts:
when: always
paths:
- _build
except:
variables:
- $PKG_ONLY == "1"
[submodule "subprojects/wlroots"]
path = subprojects/wlroots
url = https://source.puri.sm/Librem5/wlroots.git
branch = master
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
============
The code base currently uses two coding styles
1. the one followed in [libhandy][1]
2. the [wlroots][2] one (for files taken from wlroots)
New files should use [libhandy][1] style. For other files use the style
prevalent in that file. It's also o.k. to use [libhandy][1] style for
completely new functions and structs in a file indented otherwise but don't mix
indentation within a single function or struct.
New public functions and structs should have a `phoc_` prefix.
[1]: https://source.puri.sm/Librem5/libhandy/blob/master/HACKING.md
[2]: https://github.com/swaywm/wlroots/blob/master/CONTRIBUTING.md
Phone compositor
================
[![Code coverage](https://source.puri.sm/Librem5/phoc/badges/master/coverage.svg)](https://source.puri.sm/Librem5/phoc/commits/master)
# Phoc
[wlroots][1] based Phone compositor as used on the Librem5.
As of 2021-08-03 Upstream development moved to GNOME's gitlab. The new location for code
and issues is at https://gitlab.gnome.org/World/Phosh/phoc.
Phoc is pronounced like the English word fog.
## Dependencies
On a Debian based system run:
```sh
sudo apt-get -y install build-essential
sudo apt-get -y build-dep .
```
For an explicit list of dependencies check the `Build-Depends` entry in the
[debian/control][] file.
## Building
We use the meson (and thereby Ninja) build system for phoc. The quickest
way to get going is to do the following:
meson . _build
ninja -C _build
ninja -C _build install
This assumes you have wlroots installed on your system. If you don't have that
and/or want to build from source run:
git submodule update --init
meson . _build
ninja -C _build
This will fetch a matching version of wlroots and build that as well.
## Running
To run from the source tree use
_build/run
## Test
After making source changes run
xvfb-run ninja -C _build test
to see if anything broke.
# Configuration
phoc's behaviour can be configured via `GSettings`. For your convienience,
a set of scripts to manipulate config values is available in `helpers`
directory.
- `scale-to-fit` toggles automatic scaling of applications that don't fit
the screen. This setting is enabled per application using its reported
app-id. For instance, to enable scaling of GNOME Maps windows use:
helpers/scale-to-fit org.gnome.Maps on
- `auto-maximize` toggles automatic maximization of Wayland windows.
Disabling it allows windows to be resized and moved, which may be desired
when running phoc on desktop-like setups.
helpers/auto-maximize off
Outputs are configured via `phoc.ini` config file - see `src/phoc.ini.example`
for more information.
# Debugging
phoc uses glib so the `G_MESSAGES_DEBUG` environment variable can be
used to enable more log messages and `G_DEBUG` to assert on warnings
and criticals. The log domains all start with `phoc-` and are usally
`phoc-<sourcefile>`. All wlroots related messages are logged with
`phoc-wlroots`.
See https://developer.gnome.org/glib/stable/glib-running.html for more
details on these environment variables.
There's also a `PHOC_DEBUG` enviroment variable to turn on some debugging
features. Use `PHOC_DEBUG=help phoc` to see supported flags.
[1]: https://github.com/swaywm/wlroots
The packaging for the Librem 5 and PureOS
lives at https://source.puri.sm/Librem5/debs/pkg-phoc.
#!/usr/bin/python3
import os
import subprocess
import sys
destdir = os.environ.get('DESTDIR', '')
if not destdir and len(sys.argv) > 1:
datadir = sys.argv[1]
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', os.path.join(datadir, 'glib-2.0', 'schemas')])
/*
* Autogenerated by the Meson build system.
* Do not edit, your changes will be lost.
*/
#pragma once
#mesondefine PHOC_VERSION
#mesondefine PHOC_XWAYLAND
schemas = ['sm.puri.phoc.gschema.xml']
compiled = gnome.compile_schemas(
build_by_default: true
)
install_data(
schemas,
install_dir: 'share/glib-2.0/schemas'
)
<schemalist>
<schema id="sm.puri.phoc"
path="/sm/puri/phoc/">
<key name="auto-maximize" type="b">
<default>true</default>
<summary>Auto maximize applications</summary>
<description>
Whether to maximize application windows. This only affects
Wayland applications and only their main window.
</description>
</key>
<key name="scale-to-fit" type="b">
<default>false</default>
<summary>Enable automatic scaling of all oversized windows</summary>
<description>
Whether to scale-to-fit all windows that are larger than the
screen they're on.
</description>
</key>
</schema>
<schema id="sm.puri.phoc.application">
<key name="scale-to-fit" type="b">
<default>false</default>
<summary>Enable automatic scaling of oversized windows</summary>
<description>
Whether to scale-to-fit windows belonging to this application
that are larger than the screen they're on.
</description>
</key>
</schema>
</schemalist>
This package is maintained with git-buildpackage(1). It follows DEP-14
for branch naming (e.g. using debian/sid for the current version
in Debian unstable).
It uses pristine-tar(1) to store enough information in git to generate
bit identical tarballs when building the package without having
downloaded an upstream tarball first.
When working with patches it is recommended to use "gbp pq import" to
import the patches, modify the source and then use "gbp pq export
--commit" to commit the modifications.
The changelog is generated using "gbp dch" so if you submit any
changes don't bother to add changelog entries but rather provide
a nice git commit message that can then end up in the changelog.
It is recommended to build the package with pbuilder using:
gbp buildpackage --git-pbuilder
For information on how to set up a pbuilder environment see the
git-pbuilder(1) manpage. In short:
DIST=sid git-pbuilder create
gbp clone <project-url>
cd <project>
gbp buildpackage --git-pbuilder
This diff is collapsed.
12
Source: phoc
Priority: optional
Maintainer: Guido Günther <agx@sigxcpu.org>
Uploaders: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Build-Depends:
debhelper (>= 12),
gsettings-desktop-schemas,
libglib2.0-dev,
libgnome-desktop-3-dev,
libinput-dev,
libpixman-1-dev,
libwayland-dev,
libxkbcommon-dev,
meson (>= 0.47.0),
pkg-config,
wayland-protocols,
libxcb1-dev,
libwlroots-dev (>= 0.10.0),
# to run the tests
mutter-common <!nocheck>,
xvfb <!nocheck>,
xauth <!nocheck>,
Standards-Version: 4.1.3
Section: libs
Homepage: https://source.puri.sm/librem5/phoc
Rules-Requires-Root: no
Package: phoc
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
gsettings-desktop-schemas,
mutter-common,
Recommends: phosh
Breaks:
phosh (<< 0.4.5),
Description: Wayland compositor for mobile phones
Tiny wayland compositor based on wlroots for use on mobile phones like the
Librem 5.
.
You likely want to use Phosh (the phone shell) with it.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: phoc
Source: https://source.puri.sm/Librem5/phoc
Files: *
Copyright: 2019, 2020 Purism SPC
License: GPL-3+
Files: src/cursor.*
src/desktop.*
src/ini.*
src/input.*
src/keyboard.*
src/layers.h
src/layer_shell.c
src/main.*
src/output.*
src/render.*
src/seat.*
src/settings.*
src/switch.*
src/text_input.*
src/view.*
src/virtual_keyboard.*
src/xcursor.h
src/xdg_shell.c
src/xdg_shell_v6.c
src/xwayland.c
Copyright: 2017, Drew DeVault
2014, Jari Vetoniemi
2019, Purism SPC
License: GPL-3+ or MIT
Files: debian/*
Copyright: 2018, Guido Günther <agx@sigxcpu.org>
License: GPL-2+
Files: protocols/*
Copyright: 2017, Drew DeVault
2018, Simon Ser
2019, Andri Yngvason
2019, Purism SPC
License: MIT
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
License: GPL-3+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
[DEFAULT]
debian-branch = master
debian-tag = v%(version)s
debian-tag-msg = %(pkg)s v%(version)s
[dch]
multimaint-merge = True
[tag]
sign-tags = true
usr/bin/*
usr/share/glib-2.0/schemas/*
usr/include/wlr/*
usr/include/wlr/backend/*
usr/include/wlr/types/*
usr/lib/*/libwlroots.*
usr/lib/*/pkgconfig/wlroots.pc
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- -Dembed-wlroots=disabled
override_dh_auto_install:
dh_auto_install --destdir=debian/tmp
override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
LC_ALL=C.UTF-8 xvfb-run ninja -C _build test
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment