Repository: conan-io/conan-center-index

Issue:
add header-only library for random number generation
Specify library name and version:  **random/1.3.1**

- [x] I've read the [guidelines](https://github.com/conan-io/conan-center-index/wiki#how-to-submit-a-pull-request) for contributing.
- [x] I've followed the [PEP8](https://www.python.org/dev/peps/pep-0008/) style guides for Python code in the recipes.
- [x] I've used the [latest](https://github.com/conan-io/conan/releases/latest) Conan client version.
- [x] I've tried at least one configuration locally with the
      [conan-center hook](https://github.com/conan-io/hooks.git) activated.




Discussion:

Resolving patch:
diff --git a/recipes/effolkronium-random/all/conanfile.py b/recipes/effolkronium-random/all/conanfile.py
new file mode 100644
--- /dev/null
+++ b/recipes/effolkronium-random/all/conanfile.py
@@ -0,0 +1,31 @@
+import os
+
+from conans import ConanFile, tools
+
+class RandomConan(ConanFile):
+    name = "effolkronium-random"
+    description = "Random for modern C++ with convenient API."
+    license = "MIT"
+    topics = ("conan", "random", "header-only")
+    homepage = "https://github.com/effolkronium/random"
+    url = "https://github.com/conan-io/conan-center-index"
+    no_copy_source = True
+
+    @property
+    def _source_subfolder(self):
+        return "source_subfolder"
+
+    def source(self):
+        tools.get(**self.conan_data["sources"][self.version])
+        os.rename("random-" + self.version, self._source_subfolder)
+
+    def package(self):
+        self.copy("LICENSE.MIT", dst="licenses", src=self._source_subfolder)
+        self.copy("*.hpp", dst="include", src=os.path.join(self._source_subfolder, "include"))
+
+    def package_id(self):
+        self.info.header_only()
+
+    def package_info(self):
+        self.cpp_info.names["cmake_find_package"] = "effolkronium_random"
+        self.cpp_info.names["cmake_find_package_multi"] = "effolkronium_random"


Test patch:
diff --git a/recipes/effolkronium-random/all/test_package/CMakeLists.txt b/recipes/effolkronium-random/all/test_package/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/recipes/effolkronium-random/all/test_package/CMakeLists.txt
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 3.1)
+project(test_package)
+
+include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+conan_basic_setup()
+
+add_executable(${PROJECT_NAME} test_package.cpp)
+target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
+set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
diff --git a/recipes/effolkronium-random/all/test_package/conanfile.py b/recipes/effolkronium-random/all/test_package/conanfile.py
new file mode 100644
--- /dev/null
+++ b/recipes/effolkronium-random/all/test_package/conanfile.py
@@ -0,0 +1,17 @@
+import os
+
+from conans import ConanFile, CMake, tools
+
+class TestPackageConan(ConanFile):
+    settings = "os", "compiler", "build_type", "arch"
+    generators = "cmake"
+
+    def build(self):
+        cmake = CMake(self)
+        cmake.configure()
+        cmake.build()
+
+    def test(self):
+        if not tools.cross_building(self.settings):
+            bin_path = os.path.join("bin", "test_package")
+            self.run(bin_path, run_environment=True)
diff --git a/recipes/effolkronium-random/all/test_package/test_package.cpp b/recipes/effolkronium-random/all/test_package/test_package.cpp
new file mode 100644
--- /dev/null
+++ b/recipes/effolkronium-random/all/test_package/test_package.cpp
@@ -0,0 +1,7 @@
+#include "effolkronium/random.hpp"
+
+int main( ) {
+  effolkronium::random_local random{ };
+  auto val = random.get(-10, 10);
+  return 0;
+}