mattgodbolt / seasocks

Simple, small, C++ embeddable webserver with WebSockets support
BSD 2-Clause "Simplified" License
724 stars 120 forks source link

Conform to conan licensing practices #154

Open Jasper-Ben opened 3 years ago

Jasper-Ben commented 3 years ago

Conan expects a license folder in its projects:

[HOOK - conan-center.py] post_package(): ERROR: [PACKAGE LICENSE (KB-H012)] No 'licenses' folder found in package: /home/jasper/.conan/data/seasocks/1.4.4/_/_/package/ac7e8914e54bce4e93d8fd34e732e8c13c5913f2 (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H012)

We should conform to this standard practice, as demonstrated by the zlib conan package:


    |-- conaninfo.txt
    |-- conanmanifest.txt
    |-- include
    |   |-- zconf.h
    |   `-- zlib.h
    |-- lib
    |   `-- libz.a
    `-- licenses
        `-- LICENSE
madebr commented 3 years ago

CMake currently installs the license in share/licenses/Seasocks/LICENSE.

The logs I posted at https://github.com/mattgodbolt/seasocks/pull/144#issuecomment-843605170 were from a built with the conan-center hooks enabled. I interpret them as rules for accepting recipes in the conan-center repo, not as best practices for install prefixes. As an example, the conan-center hooks currently disallow a share subfolder, which is common on unices (what's the multiple of unix?).

That being said, I'll add self.copy("LICENSE", dst="licenses") to the conan recipe in #144. That way, if some script is grepping for licenses for all dependencies, it will be found.

Jasper-Ben commented 3 years ago

Would be appreciated. We currently use "plain" CMake but as the person who recently had the glorious task of ensuring license compliance in my companies product, I feel somewhat obligated to spare other developers from the pain of non-standard license declarations :wink: