README.md: new section "Building and testing for dummies"

This commit is contained in:
Juan RP 2019-06-17 22:28:01 +02:00
parent 9a2a85d231
commit 7f141ca5d7
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -73,6 +73,26 @@ and optionally:
only the static binaries work correctly, do not forget to set `--enable-static` only the static binaries work correctly, do not forget to set `--enable-static`
option in the `configure` script. option in the `configure` script.
### Building and testing for dummies
```
$ git clone https://github.com/void-linux/xbps
$ cd xbps
$ ./configure --enable-rpath --prefix=/usr --sysconfdir=/etc
$ make -j$(nproc)
$ make DESTDIR=~/xbps-git install clean
$ export PATH=~/xbps-git/usr/bin:$PATH
$ xbps-query -V
...
```
Thanks to `--enable-rpath` you can install it anywhere and it will still use
the libxbps shared library at `$ORIGIN/../lib`, that means that if xbps
is installed to `$HOME/xbps-git/usr`, the executables will use
`$HOME/xbps-git/usr/lib` to locate `libxbps`.
Happy testing!
### Tests ### Tests
To run the test suite make sure *kyua* is installed and run the following: To run the test suite make sure *kyua* is installed and run the following: