# Newest tag is release-0.20.10; master is past it and is what the ACES tree # builds from. configure.ac says 0.2.2. %global commit ddfe9ca94d7f86ee39ef228c11c4f87670dffe15 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global date 20120320 Name: arguments Version: 0.20.10 Release: 1.%{date}git%{shortcommit}%{?dist} Summary: Simple command line argument parsing for C++ programs # The repository ships no COPYING, which is why docs/civet-licensing.md first # listed this component as unknown. The licence is stated in the source itself # -- src/arguments.h and src/arguments.cpp both carry the full GPL v2-or-later # notice, "Copyright (C) 2004 Jonathan Harlap". License: GPL-2.0-or-later URL: https://github.com/aces/arguments Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # m4/ is a git submodule (BIC-MNI/mni-acmacros) and absent from the archive. Source1: https://github.com/BIC-MNI/mni-acmacros/archive/master.tar.gz#/mni-acmacros.tar.gz BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: make %description libarguments parses command line arguments for C++ programs: options with short and long forms, typed values, defaults and generated help text. It is a small MNI/BIC support library, used by oobicpl and the surface tools built on it. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Headers and link-time library for building applications against %{name}. %prep %autosetup -n %{name}-%{commit} # Supply the mni-acmacros submodule that the tarball cannot carry. mkdir -p m4 tar -xf %{SOURCE1} --strip-components=1 -C m4 test -f m4/smr_WITH_BUILD_PATH.m4 %build autoreconf -ifv -I m4 export CXXFLAGS="%{optflags} -std=gnu++17" %configure --disable-static --enable-shared %make_build %install %make_install find %{buildroot} -name '*.la' -delete %check # Upstream wires src/test into TESTS, but it is a demo rather than a test: it # declares two positional arguments (file1, outputFile) and returns 1 when # parse() rejects their absence, so `make check` reports FAIL on any machine. # Build it and drive it properly -- which does exercise the library: option # parsing, an option with its own argument, and positional arguments. make -C src test ./src/test -short in.txt out.txt | grep -q 'short is set' ./src/test in.txt out.txt | grep -q 'short is not set' ./src/test in.txt out.txt | grep -q 'outputFile: out.txt' ./src/test -inclusion some in.txt out.txt | grep -q 'inclusion is set to some' # usage() writes to stderr, not stdout. ./src/test -help in.txt out.txt 2>&1 | grep -qi 'usage' echo "argument parsing verified" %files %license src/arguments.h %doc AUTHORS ChangeLog NEWS README %{_libdir}/libarguments.so.* %files devel %{_includedir}/arguments.h %{_libdir}/libarguments.so %changelog * Thu Sep 24 2026 Morgan Hough - 0.20.10-1.20120320gitddfe9ca - Initial package. Needed by oobicpl, the last CIVET/MNI component that can be built. Licence resolved from the source headers, GPL-2.0-or-later: the repo ships no COPYING, so docs/civet-licensing.md had it as unknown.