summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby/global_phone_dbgen/global_phone_dbgen-1.0.0_p20151004-r2.ebuild')
-rw-r--r--dev-ruby/global_phone_dbgen/global_phone_dbgen-1.0.0_p20151004-r2.ebuild39
1 files changed, 39 insertions, 0 deletions
diff --git a/dev-ruby/global_phone_dbgen/global_phone_dbgen-1.0.0_p20151004-r2.ebuild b/dev-ruby/global_phone_dbgen/global_phone_dbgen-1.0.0_p20151004-r2.ebuild
new file mode 100644
index 00000000..04458303
--- /dev/null
+++ b/dev-ruby/global_phone_dbgen/global_phone_dbgen-1.0.0_p20151004-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby31 ruby32"
+
+COMMIT=dd0894061f58479884e6cfa2d00382542dc77d5a
+
+RUBY_FAKEGEM_EXTRADOC="README.md"
+RUBY_FAKEGEM_GEMSPEC="global_phone_dbgen.gemspec"
+RUBY_FAKEGEM_TASK_TEST=""
+RUBY_FAKEGEM_VERSION="1.0.0"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Parses, validates, and formats local and international phone numbers"
+HOMEPAGE="https://github.com/sstephenson/global_phone"
+SRC_URI="https://github.com/sstephenson/global_phone/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+RUBY_S="global_phone-${COMMIT}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+ruby_add_rdepend ">=dev-ruby/nokogiri-1.5"
+
+all_ruby_prepare() {
+ # Remove global_phone parts
+ find lib -type f -print | grep -v database_generator.rb | xargs rm -f || die
+
+ sed -e 's/__FILE__/"global_phone_dbgen.gemspec"/' \
+ -e '/require/ s:^:#:' \
+ -e 's/GlobalPhone::VERSION/"1.0.0"/' \
+ -i ${RUBY_FAKEGEM_GEMSPEC} || die
+
+ # Update URL of PhoneNumberMetadata.xml file
+ sed -i -e '/REMOTE_URL/ s/googlei18n/google/' bin/global_phone_dbgen || die
+}