Skip to content

Commit

Permalink
Add install-manpage target in makefile and update readme (#165)
Browse files Browse the repository at this point in the history
* Add install-manpage target in makefile and update readme

* Restructure man directory to make it work properly

* Update debian/apx.install to reflect manpage changes

* Update readme with manpage installation instructionsx

* Update README.md

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
  • Loading branch information
axtloss and kbdharun committed Mar 11, 2023
1 parent 1ee381a commit 2c90214
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ install:
install -Dm755 ${BINARY_NAME} ${DESTDIR}${PREFIX}/bin/${BINARY_NAME}
mkdir -p ${DESTDIR}/etc/apx
sed -i 's|/usr/share/apx/distrobox|${PREFIX}/share/apx/distrobox|g' config/config.json
install -Dm644 config/config.json ${DESTDIR}/etc/apx/config.json
sudo install -Dm644 config/config.json ${DESTDIR}/etc/apx/config.json
mkdir -p ${DESTDIR}${PREFIX}/share/apx
sh distrobox/install --prefix ${DESTDIR}${PREFIX}/share/apx
mv ${DESTDIR}${PREFIX}/share/apx/bin/distrobox* ${DESTDIR}${PREFIX}/share/apx/.

install-manpages:
mkdir -p ${DESTDIR}${PREFIX}/share/man/man1
cp -r man/* ${DESTDIR}${PREFIX}/share/man/.
chmod 644 ${DESTDIR}${PREFIX}/share/man/man1/*

clean:
rm -f ${BINARY_NAME}
go clean
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ Apx has been designed in a distro-agnostic manner, allowing it to work with any

- You must have `go` installed from your distribution's native repositories to compile `apx`.
- You must have `git` installed to clone the repository.
- You must have `curl` installed for the Distrobox script.
- You must have either `podman` or `docker` installed.
- You must have `make` installed for the installation
- You must have `make` installed for the installation.

### Procedure

Expand All @@ -93,18 +92,27 @@ cd apx
make build
```

- Install apx using `make install`:-
- Install apx using `make`:-

``` bash
make install
sudo make install
```

- Install the apx manpages:-

``` bash
sudo make install-manpages
```

The prefix or installation destination can be changed using `PREFIX` and `DESTDIR` respectively:

To install apx into `~/.local` for example:
``` bash
make install PREFIX=$HOME/.local
make install-manpages PREFIX=$HOME/.local
```
or into a seperate root:
``` bash
make install DESTDIR=$HOME/altroot
make install-manpages DESTDIR=$HOME/altroot
```
6 changes: 3 additions & 3 deletions debian/apx.install
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config/config.json /etc/apx/
man/apx.1 /usr/share/man/man1
man/es/apx.1 /usr/share/man/es/man1
man/sv/apx.1 /usr/share/man/sv/man1
man/man1/apx.1 /usr/share/man/man1
man/es/man1/apx.1 /usr/share/man/es/man1
man/sv/man1/apx.1 /usr/share/man/sv/man1
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2c90214

Please sign in to comment.