From 2c5940f0a08ad6e67708845c29b7594521eec6db Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Sun, 19 Mar 2023 02:59:50 +0900
Subject: [PATCH] third_party: add COPYING
---
third_party/COPYING-THIRD-PARTY | 26 ++++++++++++++++++++++++++
third_party/README.md | 24 ++++++++++++++++++++++++
third_party/copying_third_party.h | 30 ++++++++++++++++++++++++++++++
3 files changed, 80 insertions(+)
create mode 100644 third_party/COPYING-THIRD-PARTY
create mode 100644 third_party/README.md
create mode 100644 third_party/copying_third_party.h
diff --git a/third_party/COPYING-THIRD-PARTY b/third_party/COPYING-THIRD-PARTY
new file mode 100644
index 00000000..67a13f97
--- /dev/null
+++ b/third_party/COPYING-THIRD-PARTY
@@ -0,0 +1,26 @@
+-- tomlc99: TOML C library
+
+MIT License
+
+Copyright (c) CK Tan
+https://github.com/cktan/tomlc99
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+--------------------------------------------------------------------------------
diff --git a/third_party/README.md b/third_party/README.md
new file mode 100644
index 00000000..dbce4f27
--- /dev/null
+++ b/third_party/README.md
@@ -0,0 +1,24 @@
+# Third-Party Software Components
+
+Under this directory, third-party software/libraries developed independently
+of xrdp are imported as git submodules. Each third-party software is subject
+to its own software license.
+
+See [COPYING-THIRD-PARTY](third_party/COPYING-THIRD-PARTY) for full license
+statement of all third-party components.
+
+```
+third_party
+└── tomlc99 ······ TOML C library (MIT License)
+```
+
+## Developer's Note
+
+In order to show all license terms in xrdp, follow the steps below after
+adding new third-party libraries.
+
+1. Install [adobe/bin2c](https://github.com/adobe/bin2c) to your development
+ environment
+2. Write all third-party license terms to `COPYING-THIRD-PARTY`
+3. Run `make copying` to generate `copying_third_party.h`
+4. Commit generated `copying_third_party.h`
diff --git a/third_party/copying_third_party.h b/third_party/copying_third_party.h
new file mode 100644
index 00000000..1285dbaa
--- /dev/null
+++ b/third_party/copying_third_party.h
@@ -0,0 +1,30 @@
+#include
+const char copying_third_party[] = "\
+-- tomlc99: TOML C library\n\
+\n\
+MIT License\n\
+\n\
+Copyright (c) CK Tan\n\
+https://github.com/cktan/tomlc99\n\
+\n\
+Permission is hereby granted, free of charge, to any person obtaining a copy\n\
+of this software and associated documentation files (the \"Software\"), to deal\n\
+in the Software without restriction, including without limitation the rights\n\
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\
+copies of the Software, and to permit persons to whom the Software is\n\
+furnished to do so, subject to the following conditions:\n\
+\n\
+The above copyright notice and this permission notice shall be included in all\n\
+copies or substantial portions of the Software.\n\
+\n\
+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\
+SOFTWARE.\n\
+\n\
+--------------------------------------------------------------------------------\n\
+";
+const size_t copying_third_party_len = sizeof(copying_third_party) - 1;