summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2022-12-20 17:38:13 +0100
committerAlejandro Colomar <alx@kernel.org>2022-12-22 01:52:04 +0100
commit8e1650a58fd970b0c3289c0582ca4748f4f7c785 (patch)
treece5283e519800ef653eaddf24fa901e525d09826
parente7a55715682eaaa439eff4f353d45fedbee5899c (diff)
CONSTRIBUTING, INSTALL, README: Add repository documentation
Signed-off-by: Alejandro Colomar <alx@kernel.org>
l---------CONTRIBUTING1
l---------INSTALL1
l---------README1
-rw-r--r--share/doc/libstp/contributing76
-rw-r--r--share/doc/libstp/install147
-rw-r--r--share/doc/libstp/readme64
6 files changed, 290 insertions, 0 deletions
diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 120000
index 0000000..31a8c66
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1 @@
+share/doc/libstp/contributing \ No newline at end of file
diff --git a/INSTALL b/INSTALL
new file mode 120000
index 0000000..e778b57
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1 @@
+share/doc/libstp/install \ No newline at end of file
diff --git a/README b/README
new file mode 120000
index 0000000..4296114
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+share/doc/libstp/readme \ No newline at end of file
diff --git a/share/doc/libstp/contributing b/share/doc/libstp/contributing
new file mode 100644
index 0000000..7cc4d0b
--- /dev/null
+++ b/share/doc/libstp/contributing
@@ -0,0 +1,76 @@
+Name
+ Contributing - instructions for contributing to the project
+
+Synopsis
+ Email, patches, lint, style guide, and bug reports.
+
+Description
+ Email
+ There's no mailing list. You can send an email to the maintainer:
+
+ To: Alejandro Colomar <alx@kernel.org>
+
+ Patches
+ If you know how to fix a problem in a file, send a patch in an email
+ (see above).
+
+ - The subject of the email should contain "[patch]" in the subject line.
+
+ - Write a suitable subject line. Make sure to mention the name(s) of
+ the file(s) being patched. Example:
+
+ [patch] stpecpy.c: stpecpy(): Accept NULL
+
+ - Sign your patch with "Signed-off-by:". Read about the "Developer's
+ Certificate of Origin" at
+ <https://www.kernel.org/doc/Documentation/process/submitting-patches.rst>.
+ When appropriate, other tags documented in that file, such as
+ "Reported-by:", "Reviewed-by:", "Acked-by:", and "Suggested-by:" can
+ be added to the patch.
+
+ - Send patches in diff -u format, inline inside the email message. If
+ you're worried about your mailer breaking the patch, then send it
+ both inline and as an attachment. You may find it useful to employ
+ git-send-email(1) and git-format-patch(1).
+
+ - Send logically separate patches. For unrelated files, or for
+ logically-separate issues in the same page, send separate emails.
+
+ - Make patches against the latest version of the project. Use git(1)
+ for getting the latest version.
+
+ Lint
+ If you plan to patch a file, consider running the linters configured in
+ the build system, to make sure your change doesn't add new warnings.
+ However, you might still get warnings that are not your fault. To
+ minimize that, do the following steps:
+
+ (1) Lint first the entire project, so that make(1) knows that it only
+ needs to lint again files that you will touch.
+
+ $ make -ij lint >/dev/null 2>&1
+
+ (2) Touch the file that you'll edit, and run make(1) again, to see
+ which warnings you'll still see from that file that are not your
+ fault.
+
+ $ touch src/stp/stpecpy.c # replace by the file you'll modify
+ $ make -k lint
+
+ (3) Apply your changes, and then run make(1) again. You can ignore
+ warnings that you saw in step (2), but if you see any new ones,
+ please fix them if you know how, or at least note them in your
+ patch email.
+
+ $ vi src/stp/stpecpy.c # do your work
+ $ make -k lint
+
+ See <INSTALL> for a list of dependencies that this feature requires.
+ If you can't meet them all, you can selectively run certain linters.
+
+ Style guide
+ There's no style guide. I follow a mix of the coding styles for Linux,
+ Git, Google, Nginx, and a bit of my own. Just look at surrounding style.
+
+Reporting bugs
+ Report bugs in email, as patches.
diff --git a/share/doc/libstp/install b/share/doc/libstp/install
new file mode 100644
index 0000000..c90aa0a
--- /dev/null
+++ b/share/doc/libstp/install
@@ -0,0 +1,147 @@
+Name
+ Install - instructions for installing the library into the system
+
+Synopsis
+ sudo make [-j] install [V=1] [prefix=...] [DESTDIR=...] [...]
+
+Description
+ (a) Use a package manager
+ If you want to install the library into your system, consiter installing
+ it through your package manager from an official release, instead of
+ installing it from this repository. This repository contains the
+ upstream library, but using an official release and the system package
+ manager offers important benefits.
+
+ If you prefer to install the library from this repository, maybe because
+ your system doesn't ship it, or ships a too-old version, consider
+ packaging it yourself, or updating the official package. See the
+ <RELEASE> file, and also talk to the maintainer of the package in your
+ distribution.
+
+ (b) Install manually from source
+ If you are contributing to the project, or can't use a package for any
+ reasons, you may want to install the library from this repository.
+
+ In most cases, you just want to install the entire library. To install
+ all the files in the default system directories (per GNU guidelines),
+ use:
+
+ $ make # optional
+ $ sudo make install
+
+ You can install in parallel if you want. A few features can be used to
+ tweak the install:
+
+ Directory variables
+ To check about all of the directory variables available, compare
+ the GNU Coding Standards with the Makefile and the helper makefiles
+ (see the sections "Standards" and "Files" below). The most common
+ ones that you may use are:
+
+ - DESTDIR
+ - prefix
+
+ Command Variables
+ Some commands use flags. A command named 'command' will have a
+ variable COMMAND to specify an alternative command name. To append
+ flags to the default ones, set the variable EXTRA_COMMANDFLAGS. To
+ overwrite the flags, set the variable COMMANDFLAGS.
+
+ Verbose
+ Use V=1 for a more verbose output from the makefiles:
+
+ $ sudo make install V=1
+
+ Uninstall
+ TODO
+
+ Targets
+ There are targets for more granular control, such as 'install-dev'.
+ See the help to know all of them:
+
+ $ make help
+
+ Dependencies:
+ - Build-depends:
+ - Generic:
+ - cd(1)
+ - cp(1)
+ - cut(1)
+ - echo(1)
+ - find(1)
+ - gcc(1)
+ - gcc-ar(1)
+ - grep(1)
+ - install(1)
+ - libc
+ - ln(1)
+ - make(1) - GNU Make is required
+ - mkdir(1)
+ - pkgconf(1)
+ - rm(1)
+ - sed(1) - GNU sed is required
+ - sort(1)
+ - touch(1)
+ - xargs(1)
+
+ - For linting C source:
+ - checkpatch
+ - clang-tidy(1)
+ - cppcheck(1)
+ - cpplint(1)
+ - iwyu(1)
+
+ - Depends:
+ - libc
+ - pkgconf(1)
+
+ Lint
+ You can lint the source code. See 'make help' for a list of targets
+ that can be used.
+
+Files
+ Makefile
+ Main makefile.
+
+ lib/build*.mk
+ Makefiles for building the library.
+
+ lib/install*.mk
+ Makefiles for installing the library.
+
+ lib/lint*.mk
+ Makefiles for linting the source code.
+
+ lib/*.mk
+ Other makefiles.
+
+ include/stp/*
+ Header files.
+
+ src/*
+ Source code.
+
+ share/pkgconfig/*.pc
+ pc(5) file.
+
+ /usr/local/include/stp/*.h
+ Installed header files.
+
+ /usr/local/lib/libstp.a
+ Static library file.
+
+ /usr/local/lib/libstp.so*
+ Shared library.
+
+ /usr/local/share/pkgconfig/libstp.pc
+ Installed pc(5) file.
+
+Standards
+ This project tries to follow closely the GNU Coding Standards:
+ <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
+ <https://www.gnu.org/prep/standards/html_node/Command-Variables.html>.
+
+ And the Filesystem Hierarchy Standard:
+ <https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html>
+
+ But deviate in some cases.
diff --git a/share/doc/libstp/readme b/share/doc/libstp/readme
new file mode 100644
index 0000000..8d11804
--- /dev/null
+++ b/share/doc/libstp/readme
@@ -0,0 +1,64 @@
+Name
+ libstp - Stp string library
+
+Synopsis
+ Simple and high-performance string library that allows chain-copying.
+
+Description
+ The functions in this library are designed so that they can be chained,
+ as the libc functions stpcpy(3), stpncpy(3), and mempcpy(3). Some
+ truncate, and others don't. There are also wrappers around formatting
+ functions.
+
+ The chaining design of these functions provides the best performance,
+ while only being slightly more complex to use than strcat(3) or
+ strlcat(3). And these functions are also more versatile.
+
+Files
+ CONTRIBUTING
+ Instructions for reporting bugs and contributing.
+
+ INSTALL
+ Instructions for installing the library.
+
+ README
+ Main information about the project and the repository.
+
+ Makefile, lib/*.mk
+ Build system.
+
+ LICENSES/*, share/licenses/*
+ Licenses in use by the project.
+
+ etc/*
+ Configuration files for (linter) programs called by the build system.
+
+ include/*
+ Header files.
+
+ share/doc/libstp/*
+ Project documentation.
+
+ share/man/*
+ Manual pages.
+
+ share/pkgconfig/*
+ Package configuration file. See pc(5) and pkgconf(1).
+
+ src/*
+ Source code.
+
+Maintainers
+ Alejandro Colomar <alx@kernel.org> <http://www.alejandro-colomar.es/>
+
+Copyright
+ The API and trivial implementations are in the public domain.
+
+ This implementation is LGPL-3.0-or-later WITH LGPL-3.0-linking-exception
+
+See also
+ Cgit
+ <http://www.alejandro-colomar.es/src/alx/alx/libstp.git>
+
+ Git
+ <git://www.alejandro-colomar.es/src/alx/alx/libstp.git>