A 'simple' Makefile to build wlroots, sway and a few other related utilities
The purpose of this repository is to provide 'simple' Makefile to build wlroots, sway and a few other related utilities.
The Makefile was tested on Debian unstable but its should hopefully work on other systems with minimal changes.
As of today the Makefile can build the following packages
- wlroots (required by sway)
- jsonc (required by sway)
- sway
- swayidle - Idle management daemon for Sway
- swaylock - Lockscreen application for Sway
- grim - Screenshot application for Sway
- slurp - Select a region with the mouse (for grim)
- mako - Notification daemon for Sway
The file debian-packages.txt provides a list of required packages for Debian/Buster (testing). It is likely incomplete but this is probably a good starting point.
The required apt-get
command can be obtained with
make required-apt-install
The TARGET variable defines the installation direction and probably needs to be customized according to your needs.
Case 1: Installation in /usr/local/
PREFIX=/usr/local
LIBDIR=
SUDO=sudo
Case 2: Installation in a non-standard directory owned by root
PREFIX=/opt/sway-desktop
LIBDIR=lib
SUDO=sudo
Case 3: Installation in a directory owned by user
PREFIX=$(HOME)/sway/
LIBDIR=lib
SUDO=
The variable SUDO is used by the installation targets.
On Debian based systems, LIBDIR forces meson to install
libraires and pkg-config files in the specified subdirectory.
A typical value is lib
but other values such as lib32
,
lib64
or lib/x86_64-linux-gnu
are possible. That should not
be needed when installing in /usr/local
.
A few other variables can be customized. Please refer the Makefile for more details.
When using a non-standard target directory, it may be necessary to define a few environment varables (PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH, MANPATH, ...).
Use make env-sh-build
(or the script generate-env.sh
) to produce a suitable shell
script in $(BUILD_DIR)/env.sh
.
And of course, you need to source that generated script before compiling the various packages (because of pkg-config) and before starting your sway desktop.
source ..../path/to/sway/env.h
List all available targets in the Makefile
Attempt to clone from github, configure, build and install all targets.
Print the command required to install all required packages for Debian/Buster
Generate a shell script to set the required environment variables in $(BUILD_DIR)/env.sh
Clone the sources from git in directory $SRC_DIR/xxxx/
:
-
For most packages, the default behavior is to clone the
master
branch -
Be aware that
git clone
is made significantly faster by dropping the history with the option--depth=1
. That behavior may not be desirable if you intend to develop in that source directory.
Do a git pull
in $SRC_DIR/xxxx/
Create the $(BUILD_DIR)/xxxx
directory and configure.
Build the package
Clean a previous build of the package
Install the package (only after a successfull build)
An alias for
make xxxx-clean
make xxxx-build
An alias for
make xxxx-git-clone
make xxxx-configure
make xxxx-clean
make xxxx-build
An alias for
make xxxx-all
make xxxx-install