debian-template icon indicating copy to clipboard operation
debian-template copied to clipboard

Switch to Meson

Open peteruithoven opened this issue 7 years ago • 2 comments

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:

  • [ ] Adapt rules file

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

peteruithoven avatar Jan 31 '18 17:01 peteruithoven

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

peteruithoven avatar Jan 31 '18 17:01 peteruithoven

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

danirabbit avatar Feb 02 '18 21:02 danirabbit