easyblock = 'ConfigureMake'

name = 'util-linux'
version = '2.22.2'

homepage = 'http://www.kernel.org/pub/linux/utils/util-linux'
description = """Set of Linux utilities"""

toolchain = {'name': 'ictce', 'version': '5.5.0'}

source_urls = ['%s/v%%(version_major_minor)s' % homepage]
sources = [SOURCELOWER_TAR_GZ]
checksums = ['79d5a1ac095b1a4cc1bd13e43f8f65bfaa5b9793c61a559b5de137ce316170bd']

# disable account related utilities (they need OS dependent pam-devel files)
# disable wall and friends (requires group changing permissions for install user)
# install systemd service files in install dir
configopts = '--disable-chfn-chsh --disable-login --disable-su '
configopts += '--disable-wall --disable-use-tty-group '
configopts += '--disable-makeinstall-chown --disable-makeinstall-setuid '
configopts += "--with-systemdsystemunitdir='${prefix}/systemd' "

dependencies = [('ncurses', '5.9')]

sanity_check_paths = {
    'files': ['lib/lib%s.a' % x for x in ['blkid', 'mount', 'uuid']],
    'dirs': ['include', 'bin', 'share', 'sbin'],
}

moduleclass = 'tools'
