Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prerequisites for building with GNU autotools #241

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 19 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ Solaris OpenCSW [![Build Status Solaris amd64](https://buildfarm.opencsw.org/bui
[![Build Status Solaris SparcV9](https://buildfarm.opencsw.org/buildbot/png?builder=libpsl-solaris10-sparcv9)](https://buildfarm.opencsw.org/buildbot/builders/libpsl-solaris10-sparcv9)


libpsl - C library to handle the Public Suffix List
===================================================
# libpsl - C library to handle the Public Suffix List

A *Public Suffix List* is a collection of Top Level Domains (TLDs) suffixes.
TLDs include *Global Top Level Domains* (gTLDs) like `.com` and `.net`;
Expand Down Expand Up @@ -44,14 +43,12 @@ Download the Public Suffix List [here](https://github.com/publicsuffix/list/blob
The original DAFSA code is from the [Chromium Project](https://code.google.com/p/chromium/).


API Documentation
-----------------
## API Documentation

You find the current API documentation [here](https://rockdaboot.github.io/libpsl).


Quick API example
-----------------
## Quick API example

#include <stdio.h>
#include <libpsl.h>
Expand All @@ -73,8 +70,7 @@ Quick API example
return 0;
}

Command Line Tool
-----------------
## Command Line Tool

Libpsl comes with a tool 'psl' that gives you access to most of the
library API via command line.
Expand All @@ -83,8 +79,7 @@ library API via command line.

prints the usage.

Convert PSL into DAFSA
----------------------
## Convert PSL into DAFSA

The [DAFSA](https://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton) format is a compressed
representation of strings. Here we use it to reduce the whole PSL to about 32k in size.
Expand All @@ -97,17 +92,15 @@ Test the result (example)

$ tools/psl --load-psl-file psl.dafsa aeroclub.aero

License
-------
## License

Libpsl is made available under the terms of the MIT license.<br>
See the LICENSE file that accompanies this distribution for the full text of the license.

src/psl-make-dafsa and src/lookup_string_in_fixed_set.c are licensed under the term written in
src/LICENSE.chromium.

Building from tarball
---------------------
## Building from tarball

Choose a release from https://github.com/rockdaboot/libpsl/tags an download the tarball
named `libpsl-{version}.tar.*`. Unpack with `tar xf <filename>`, cd into the libsl* directory.
Expand All @@ -124,24 +117,29 @@ Install with
sudo make install
```

Building from git
-----------------

You should have python2.7+ installed.
## Building from git

Download project with

git clone --recursive https://github.com/rockdaboot/libpsl
cd libpsl

Build with GNU autotools
### Building with GNU autotools

Prerequisites:
- python2.7+ (for converting the PSL list)
- basic C development tools (compiler, linker)
- git, make, autoconf, autoconf-archive, autopoint, automake, autotools,
- libtool, gettext, m4, pkg-config
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of this can be summarized as "need autotools". Mentioning autopoint and m4 in particular are very specific details that are really abstracted away by the primary projects they are bundled with or a dependency of -- m4 is required by autoconf since autoconf processes m4 files, autopoint is part of gettext.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, m4 has been pulled in as dependency here on Debian testing, but not so for autopoint nor autotools-dev. So I'd rather mention these tools/packages.

Removing git because without it you won't be able to fetch the sources!? (Mostly)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not realize autopoint was a separate package in Debian. How utterly pointless...

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been part of gettext a while ago, AFAIR. There must be some reason to separate both, but idea tbh.

- for building docs: gtk-doc-tools (gtkdocize)
- for building tarballs: gzip, lzip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

building tarballs isn't part of building the project, it's part of maintaining the project. IMO it's not good material for README.md, but could be good material for RELEASING.md as project-internal release checklists etc.


./autogen.sh
./configure
make
make check

Build with `meson`
### Building with `meson`

meson builddir
ninja -C builddir
Expand All @@ -151,8 +149,7 @@ There is also an unofficial MSVC nmake build configuration in `msvc/`. Please
see README.MSVC.md on building libpsl with Visual Studio via NMake or Meson.


Mailing List
------------
## Mailing List

[Mailing List Archive](https://groups.google.com/forum/#!forum/libpsl-bugs)

Expand Down
Loading