jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.13k stars 1.07k forks source link

How to include custom manpages #1036

Open vinitkhandagle opened 8 years ago

vinitkhandagle commented 8 years ago

I wanted to include a custom manpage when I make my deb or rpm files and that will be a part of the package. I did not see an option to mark a file as a manpage while making the deb file.

Knetic commented 8 years ago

According to the Filesystem Hierarchy Standard, the manpage directory must always be /usr/share/man/, so you can feel pretty safe just having an fpm directive to copy your manpage there.

For instance (assuming your manpage is located in ./docs/${PROJECTNAME}.7)

fpm \
        --log error \
        -s dir \
        -t deb \
        -v ${VERSION} \
        -n ${NAME} \
        ./docs/${PROJECTNAME}.7=/usr/share/man/man7/${PROJECTNAME}.7 \ # <--- this line
                ...and so on

I do this with man pages, autocomplete scripts, etc.

Knetic commented 8 years ago

I should have linked the relevant doc that explains what was going on; directory mapping feature.