{"id":16889378,"url":"https://github.com/dcbaker/rpm-version","last_synced_at":"2025-03-20T07:17:42.697Z","repository":{"id":41126095,"uuid":"478705980","full_name":"dcbaker/rpm-version","owner":"dcbaker","description":"A version parser conforming to RPM's rules","archived":false,"fork":false,"pushed_at":"2024-09-27T22:23:34.000Z","size":33,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-25T08:27:37.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcbaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-06T19:51:41.000Z","updated_at":"2024-09-27T20:19:41.000Z","dependencies_parsed_at":"2024-06-17T23:35:39.732Z","dependency_job_id":"d5333a28-d99b-4d23-9b39-ef4a2ad027d7","html_url":"https://github.com/dcbaker/rpm-version","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcbaker%2Frpm-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcbaker%2Frpm-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcbaker%2Frpm-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcbaker%2Frpm-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcbaker","download_url":"https://codeload.github.com/dcbaker/rpm-version/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244566948,"owners_count":20473451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T16:56:59.364Z","updated_at":"2025-03-20T07:17:42.670Z","avatar_url":"https://github.com/dcbaker.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpm-version\nA version comparison library conforming to RPM's rules.\n\n\n## What is it?\n\nIt's a library for doing RPM compatible version compatible with the rules that\nRPM uses. It's implemented in C++ 17, but provides a stable C API as well.\n\n\n## Why?\n\nBecause in build system land it turns out that you need this sort of stuff, a lot.\n\n\n## What's the status?\n\nThe API is *not* guaranteed stable, but I don't forsee any backwards\nincompatible changes.\n\n\n## How do I use it?\n\nrpm-version provides pkg-config files, so you can install it, and add the\npkg-config files to your `$PKG_CONFIG_PATH`, then use whatever `pkg-config`\nfacility goes along with your build system, looking for either `rpm-version-c`\nor `rpm-version-c++`, depnding on whether you want the C or C++ API.\n\nIf you're using meson, it also supports being used as a subproject.\n\nAdd the following wrap files to your `subprojects` directory:\n\n```ini\n[wrap-file]\ndirectory = rpm-version-0.0.2\n\nsource_url = https://github.com/dcbaker/rpm-version/archive/v0.0.2.tar.gz\nsource_filename = rpm-version-0.0.2.tar.gz\nsource_hash = 8ca93adf977603219bde766f5f9f752c4880d870d18e8df167e2d2ba283656b6\n\n[provide]\nrpm-version-c = dep_rpm_ver_c\nrpm-version-c++ = dep_rpm_ver_cpp\n```\n\nYou can then just add `dependency('rpm-version-c++')` (or `rpm-version-c`), to\nyour meson.build and use as normal. you may want to use\n`dependency('rpm-version-c++', default_options : ['default_library=static'])`,\nwhich will instruct meson to build rpm-version as a static library instead of a\ndynamic one.\n\n## How do I use the C API?\n\n```C\n#include \u003crpm-version/version.h\u003e\n\nint main(void) {\n    return rpm_version_compare(\"1.2.3\", RPM_VER_LT, \"4.5\");\n }\n ```\n\n\n## How about the C++ API?\n\n```C++\n#include \u003crpm-version/version.hpp\u003e\n\nint main() {\n    return PRMVersion::compare(\"1.2.3\", RPMVersion::Operator::lt, \"4.5\");\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcbaker%2Frpm-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcbaker%2Frpm-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcbaker%2Frpm-version/lists"}