#!/bin/bash
#
# Copyright 2004 Dagmar d'Surreal <rivyqntzne@tznvy.pbz>
# Copyright 2005, 2006 Scott Harmon
# Copyright 2006-2026 Sasa Ostrouska <saxa@droplinegnome.org>
# Copyright 2014 John Truex <apolluwn@gmail.com>
# Available under the terms of the GNU GPL.
#

NAME="gnome-session"
VERSION="50.1"
REVISION="3"

PKG_SOURCEURL='${DLG_GNOMEMIRROR}/${NAME}/${VER_MAJ}/${NAME}-${VERSION}.tar.xz'
PKG_PATCH[0]='startgnomewayland'
PKG_PATCH[1]='gnome-session-50.1-systemv-fulalas.patch'


. $DLG_ROOT/etc/config
. $DLG_ROOT/lib/dl-base

cflags
prepare

applypatch 1 1 

analyzesource
configure -Dbuildtype=debug \
	-Ddocbook=false \
	-Dman=false \
	-Dsystemduserunitdir=/lib/systemd/user
make
makeinstall
tidydocumentation

# We put in place the startgnomewayland script here.
findpatch filename ${PKG_PATCH[0]}
spewdo "install -m 755 -o root -g root ${filename} ${PKG_STAGEROOT}/usr/bin/"


analyzebinaries
finalizepackage
packagize
cleanup
