Hey I was packaging the project for the Arch User Repos, got the bin package up for now (https://aur.archlinux.org/packages/tt-bin/)
and thought I'd make some changes to the Makefile. Current behaviour should not break, apart from the manpage being installed to /usr/local/share/man instead of /usr/share/man by default.
Changes
Remove executable permission from the manpage
Add DESTDIR and PREFIX variables allowing one to choose where to install it
DESTDIR defaults to the empty string and PREFIX to /usr/local/
When installing in an arch package for example you'd use make DESTDIR="$pkgdir" PREFIX=/usr install
Running make install normally will try to install the binary to /usr/local/bin and the manpage to /usr/local/share/man/
Install with -D and -t
This creates the directories if they don't already exist, useful for packaging as packages are built in a fakeroot without the file system hierarchy
Added an uninstall rule
This has nothing to do with packaging, I was testing installing manually and got tired of running sudo rm manually
Hey I was packaging the project for the Arch User Repos, got the bin package up for now (https://aur.archlinux.org/packages/tt-bin/) and thought I'd make some changes to the Makefile. Current behaviour should not break, apart from the manpage being installed to
/usr/local/share/man
instead of/usr/share/man
by default.Changes
make DESTDIR="$pkgdir" PREFIX=/usr install
make install
normally will try to install the binary to /usr/local/bin and the manpage to /usr/local/share/man/sudo rm
manually