From 012bb4ef6f7bfde0e1cffecdfe90af5b52f3e494 Mon Sep 17 00:00:00 2001 From: CismonX Date: Mon, 25 Jan 2021 14:17:06 +0800 Subject: [PATCH] Update README and config scripts. --- .drone.yml | 2 +- INSTALL.md | 30 +++++++++--------------------- README.md | 12 ++++-------- configure.ac | 3 ++- man/Makefile.am | 2 ++ 5 files changed, 18 insertions(+), 31 deletions(-) diff --git a/.drone.yml b/.drone.yml index b60c91d..b00f5fb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,7 @@ steps: - name: build image: pureos/amber-slim commands: - - apt install --assume-yes build-essential autoconf automake libtool autoconf-archive dejagnu texinfo + - apt -y install build-essential autoconf automake libtool autoconf-archive dejagnu texinfo - autoreconf --install - ./configure CFLAGS='-O0 -g -std=c99 -Wall -Wextra -Wpedantic --coverage' - make diff --git a/INSTALL.md b/INSTALL.md index a99e50c..66b75a0 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -8,39 +8,27 @@ this notice are preserved. This file is offered as-is, without any warranty. # INSTALL -## Copy Library Code to Your Project +## Copy Code to Your Project -This is the recommended way to use this library. +The code of ctlseqs is simple, and can be used out-of-the-box. Just copy [ctlseqs.h](src/ctlseqs.h) and [ctlseqs.c](src/ctlseqs.c) to your project and build it alongside with other code. -Copy [ctlseqs.h](src/ctlseqs.h) and [ctlseqs.c](src/ctlseqs.c) to your project and build it alongside with other code. Requires an ISO C99 and POSIX.1-2001 compliant C implementation. +Requires an ISO C99 and POSIX.1-2001 compliant C implementation. ## Build and Install From Source -Helper scripts are provided to build ctlseqs as a shared/static library. Requires GNU Autoconf, Automake, Libtool and Autoconf Archive. +Alternatively, ctlseqs can be built into a shared/static library with GNU Autotools (Autoconf, Automake, Libtool and Autoconf Archive). ```shell autoreconf --install -./configure --prefix=$HOME CFLAGS='-O0 -g' +./configure make ``` -Optionally, you can run tests (requires DejaGnu), install the binary and man pages. +Optionally, you can run tests (requires DejaGnu) and install the library. ```shell -make check && make install +make check +make install ``` -Finally, link it to your project with the `-lctlseqs` flag (or something similar). - -## Install From a Package Manager - -We maintain unofficial repositories for a few package managers, so that the ctlseqs library can be installed from them. - -However, there is no guarantee that any of those repositories will be actively maintained in the future. - -### Homebrew - -```shell -brew tap CismonX/repos -brew install ctlseqs -``` +Unix man pages are not automatically installed with `make install`, and should be installed manually with `make install-man`. diff --git a/README.md b/README.md index 7bbbfa4..f0dd5da 100644 --- a/README.md +++ b/README.md @@ -9,20 +9,16 @@ this notice are preserved. This file is offered as-is, without any warranty. # README [![Build Status](https://drone.cismon.net/api/badges/CismonX/ctlseqs/status.svg)](https://drone.cismon.net/CismonX/ctlseqs) -[![LICENSE](https://img.shields.io/badge/license-GPL--3.0--or--later-blue.svg)](COPYING) - -ctlseqs - helper library for terminal control sequences +[![License](https://img.shields.io/badge/license-GPL--3.0--or--later-blue.svg)](COPYING) ## About -The ctlseqs library provides C API for manipulating terminal emulators with control sequences. - -ctlseqs is free software. you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +The ctlseqs library provides C API for handling ECMA-35/ECMA-48 compatible escape sequences, which is commonly used for communication between terminal emulators and text-based programs. ## Getting Started -To install and use the library, see [INSTALL.md](INSTALL.md) for details. +For installation instructions, see [INSTALL.md](INSTALL.md). -For documentation, see the [**ctlseqs**(7)](man/ctlseqs.7) man page, and also [*XTerm Control Sequences*](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html) if you're unfamiliar with them. +[Documentation](doc/ctlseqs.texi) of the library can be read [online](.), or read with `info ctlseqs` after installation. Some [examples](examples) are provided to demonstrate the basic usage of this library. diff --git a/configure.ac b/configure.ac index d770e38..a6f5ffe 100644 --- a/configure.ac +++ b/configure.ac @@ -7,10 +7,11 @@ dnl this notice are preserved. This file is offered as-is, without any warranty. dnl AC_PREREQ([2.60]) -AC_INIT([ctlseqs], [0.01], [bug-report@cismon.net]) +AC_INIT([ctlseqs], [0.1.0], [bug-report@cismon.net]) AC_CONFIG_SRCDIR([src/ctlseqs.c]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign]) +AM_EXTRA_RECURSIVE_TARGETS([install-man uninstall-man]) LT_PREREQ([2.4.0]) LT_INIT diff --git a/man/Makefile.am b/man/Makefile.am index cfc68d7..c874791 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -6,6 +6,8 @@ # this notice are preserved. This file is offered as-is, without any warranty. # +AUTOMAKE_OPTIONS = no-installman + dist_man3_MANS = \ ctlseqs_matcher_init.3 \ ctlseqs_matcher_config.3 \