# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libsm
pkgver=1.2.3
pkgrel=0
pkgdesc="X11 session management library"
url="https://www.X.Org/"
arch="all"
license="MIT AND X11"
depends=""
makedepends="libice-dev util-linux-dev util-macros xmlto xorgproto-dev xtrans"
checkdepends="check-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.X.Org/releases/individual/lib/libSM-$pkgver.tar.bz2"
builddir="$srcdir"/libSM-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--with-libuuid \
		--enable-docs \
		--with-xmlto \
		--without-fop
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="74c42e27029db78475e62025b4711dbac5e22d2f8e8a24be98a1c31b03c0fc4afe859928f851800ea0b76854f12147900dc4f27bbfd3d8ea45daaaf24b70a903  libSM-1.2.3.tar.bz2"