Skip to content

[file] [package list]

file/5.43-cpeAOCC-24.03 (file-5.43-cpeAOCC-24.03.eb)

To access module help and find out for which stacks and partitions the module is installed, use module spider file/5.43-cpeAOCC-24.03.

EasyConfig:

##
# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild
#
##

easyblock = 'ConfigureMake'

local_zlib_version =         '1.3.1'         # https://zlib.net/
local_bzip2_version =        '1.0.8'         # http://www.bzip.org/downloads.html
local_XZ_version =           '5.4.4'         # https://tukaani.org/xz/
local_file_version =         '5.43'          # ftp://ftp.astron.com/pub/file/

name =    'file'
version = local_file_version

homepage = 'http://www.darwinsys.com/file/'

whatis = [
    "Description: file provides the file command, a 'file type guesser",
]

description = """
The file command is 'a file type guesser', that is, a command-line tool
that tells you in words what kind of data a file contains. Unlike most
GUI systems, command-line UNIX systems - with this program leading the
charge - don't rely on filename extentions to tell you the type of a file,
but look at the file's actual contents. This is, of course, more reliable,
but requires a bit of I/O.

The module does not only provide the file command, but also libmagic on
which it is based.
"""

docurls = [
    "Manual pages: file (1), libmagic (3) and magic (4)"
]

local_tag = '_'.join( version.split('.') )
software_license_urls = [
    f'https://github.com/file/file/blob/FILE{local_tag}/COPYING',
]

toolchain = {'name': 'cpeAOCC', 'version': '24.03'}
toolchainopts = {'pic': True}

# https://www.astron.com/pub/file/file-5.41.tar.gz
source_urls = ['https://www.astron.com/pub/file']
sources =     [SOURCE_TAR_GZ]
checksums =   ['8c8015e91ae0e8d0321d94c78239892ef9dbc70c4ade0008c0e95894abfb1991']

builddependencies = [ # Create a reproducible build environment.
    ('buildtools', '%(toolchain_version)s', '', True), # for autotools
]

dependencies = [
    ('zlib',  local_zlib_version),
    ('bzip2', local_bzip2_version),
    ('XZ',    local_XZ_version),
]

# Doesn't need MPI, ROCm or BLAS, and module unload never fails so this is safe.
prebuildopts = 'module unload cray-libsci cray-mpich rocm xpmem && '
pretestopts = prebuildopts
preinstallopts = prebuildopts

postinstallcmds = [
    'mkdir -p %(installdir)s/share/licenses/%(name)s',
    'cp AUTHORS ChangeLog COPYING NEWS README.md %(installdir)s/share/licenses/%(name)s',   
]

sanity_check_paths = {
    'files': ['bin/file', 'include/magic.h', 'lib/libmagic.%s' % SHLIB_EXT, 'lib/pkgconfig/libmagic.pc'] +
             ['share/man/man1/file.1', 'share/man/man3/libmagic.3', 'share/man/man4/magic.4',
              f'share/licenses/file/COPYING'],
    'dirs':  []
}

sanity_check_commands = [
    'file --version',
    'pkg-config --libs libmagic',
]

moduleclass = 'system'

[file] [package list]