I'm using automake to package my software, and I want to have the license installed to /usr/share/licenses/mypackage
like the other software on my machine. Similarly, I intend to write a .pc
file, since I am writing a library, and I would like it to be installed to /usr/lib/pkgconfig
.
I'm aware of the EXTRA_DIST
flag, but from what I have read, it's rather clumsy and can include things you don't want. Is there another standard way to do this?
EXTRA_DIST
will add files to the tarball that you create with make dist
, but not install them to the system. This is what you want:
licensedir = $(datadir)/licenses/$(PACKAGE_NAME)
dist_license_DATA = LICENSE
pkgconfigdir = $(libdir)/pkgconfig
dist_pkgconfig_DATA = mylibrary.pc