diff --git a/test/fixture/dummy-groonga/dummy-groonga.gemspec b/test/fixture/dummy-groonga-repository-package/dummy-groonga-repository-package.gemspec similarity index 88% rename from test/fixture/dummy-groonga/dummy-groonga.gemspec rename to test/fixture/dummy-groonga-repository-package/dummy-groonga-repository-package.gemspec index d24abd2..e90e803 100644 --- a/test/fixture/dummy-groonga/dummy-groonga.gemspec +++ b/test/fixture/dummy-groonga-repository-package/dummy-groonga-repository-package.gemspec @@ -21,10 +21,10 @@ Gem::Specification.new do |spec| spec.authors = ["Sutou Kouhei"] spec.email = ["kou@cozmixng.org"] spec.licenses = ["LGPL-3.0-or-later"] - spec.summary = "Dummy gem that uses Groonga" + spec.summary = "Dummy gem that uses Groonga with package based repository" spec.description = "This is for testing rubygems-requirements-system" - spec.extensions = ["ext/dummy-groonga/extconf.rb"] - spec.files = ["ext/dummy-groonga/extconf.rb"] + spec.extensions = ["ext/dummy-groonga-repository-package/extconf.rb"] + spec.files = ["ext/dummy-groonga-repository-package/extconf.rb"] spec.add_runtime_dependency("rubygems-requirements-system") diff --git a/test/fixture/dummy-groonga-repository-package/ext/dummy-groonga-repository-package/extconf.rb b/test/fixture/dummy-groonga-repository-package/ext/dummy-groonga-repository-package/extconf.rb new file mode 100644 index 0000000..887d5ff --- /dev/null +++ b/test/fixture/dummy-groonga-repository-package/ext/dummy-groonga-repository-package/extconf.rb @@ -0,0 +1,24 @@ +# Copyright (C) 2025 Ruby-GNOME Project Team +# +# This library is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . + +require "mkmf" + +require "pkg-config" + +unless PKGConfig.have_package("groonga") + exit(false) +end + +create_makefile("dummy_groonga_repository_package") diff --git a/test/fixture/dummy-groonga-repository-raw/dummy-groonga-repository-raw.gemspec b/test/fixture/dummy-groonga-repository-raw/dummy-groonga-repository-raw.gemspec new file mode 100644 index 0000000..e2491fd --- /dev/null +++ b/test/fixture/dummy-groonga-repository-raw/dummy-groonga-repository-raw.gemspec @@ -0,0 +1,50 @@ +# -*- ruby -*- +# +# Copyright (C) 2025 Ruby-GNOME Project Team +# +# This library is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . + +Gem::Specification.new do |spec| + spec.name = "dummy-groonga" + spec.version = "1.0.0" + spec.authors = ["Sutou Kouhei"] + spec.email = ["kou@cozmixng.org"] + spec.licenses = ["LGPL-3.0-or-later"] + spec.summary = "Dummy gem that uses Groonga with raw repository" + spec.description = "This is for testing rubygems-requirements-system" + spec.extensions = ["ext/dummy-groonga-repository-raw/extconf.rb"] + spec.files = ["ext/dummy-groonga-repository-raw/extconf.rb"] + + spec.add_runtime_dependency("rubygems-requirements-system") + + spec.requirements << "system: groonga: debian: repository: id: apache-arrow" + spec.requirements << "system: groonga: debian: repository: uris: https://apache.jfrog.io/artifactory/arrow/%{distribution}/" + spec.requirements << "system: groonga: debian: repository: signed-by: https://downloads.apache.org/arrow/KEYS" + + spec.requirements << "system: groonga: debian: repository: id: groonga" + spec.requirements << "system: groonga: debian: repository: uris: https://packages.groonga.org/%{distribution}/" + spec.requirements << "system: groonga: debian: repository: signed-by: https://packages.groonga.org/%{distribution}/groonga-archive-keyring.asc" + + spec.requirements << "system: groonga: debian: libgroonga-dev" + + spec.requirements << "system: groonga: rhel: repository: id: apache-arrow" + spec.requirements << "system: groonga: rhel: repository: baseurl: https://apache.jfrog.io/artifactory/arrow/almalinux/$releasever/$basearch/" + spec.requirements << "system: groonga: rhel: repository: gpgkey: https://downloads.apache.org/arrow/KEYS" + + spec.requirements << "system: groonga: rhel: repository: id: groonga" + spec.requirements << "system: groonga: rhel: repository: baseurl: https://packages.groonga.org/almalinux/$releasever/$basearch/" + spec.requirements << "system: groonga: rhel: repository: gpgkey: https://packages.groonga.org/almalinux/groonga-release-keyring.asc" + + spec.requirements << "system: groonga: rhel: groonga-devel" +end diff --git a/test/fixture/dummy-groonga/ext/dummy-groonga/extconf.rb b/test/fixture/dummy-groonga-repository-raw/ext/dummy-groonga-repository-raw/extconf.rb similarity index 94% rename from test/fixture/dummy-groonga/ext/dummy-groonga/extconf.rb rename to test/fixture/dummy-groonga-repository-raw/ext/dummy-groonga-repository-raw/extconf.rb index 73cf156..11afacf 100644 --- a/test/fixture/dummy-groonga/ext/dummy-groonga/extconf.rb +++ b/test/fixture/dummy-groonga-repository-raw/ext/dummy-groonga-repository-raw/extconf.rb @@ -21,4 +21,4 @@ exit(false) end -create_makefile("dummy_groonga") +create_makefile("dummy_groonga_repository_raw")