elementary / debian-template

Debian Packaging Template
19 stars 12 forks source link

Switch to Meson #3

Open peteruithoven opened 6 years ago

peteruithoven commented 6 years ago

All Aboard The Meson Future Hype Train explains that elementary OS will be switchting over from CMake to Meson. This probably means we'll also need to update this project, since it's used in the getting started documentation

you can expect our documentation to be updated as soon as the first preview builds of Juno become available to developers.

From: All Aboard The Meson Future Hype Train

I thought it might be interesting to have an issue for discussions and to track progress.

ToDo:

Also see: https://github.com/elementary/website/issues/1885

peteruithoven commented 6 years ago

One thing we probably need is a new rules file with something like:

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
    dh $@

override_dh_auto_clean:
    rm -rf debian/build

override_dh_auto_configure:
    mkdir -p debian/build
    cd debian/build && meson --prefix=/usr ../..

override_dh_auto_build:
    cd debian/build && ninja -v

override_dh_auto_test:
    cd debian/build && ninja test

override_dh_auto_install:
    cd debian/build && DESTDIR=${CURDIR}/debian/#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
    dh $@

override_dh_auto_clean:
    rm -rf debian/build

override_dh_auto_configure:
    mkdir -p debian/build
    cd debian/build && meson --prefix=/usr ../..

override_dh_auto_build:
    cd debian/build && ninja -v

override_dh_auto_test:
    cd debian/build && ninja test

override_dh_auto_install:
    cd debian/build && DESTDIR=${CURDIR}/debian/com.github.yourusername.yourrepositoryname 
 ninja install
danirabbit commented 6 years ago

One of the reasons we're waiting until we have Juno builds is so we don't have to have a complicated rules file like this. In Juno, Debhelper has support for meson/ninja