aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2021-04-08 00:56:09 +0200
committerJakub Jirutka <jakub@jirutka.cz>2021-04-08 00:57:02 +0200
commitde9e983aab20f122a6accfcc2e279bd79bc8a550 (patch)
treeee43a00784e8b6a5e3463a2b53739762c300be3d
parent04bb32b09c0ea2e9f113ef348bebe11487a96cae (diff)
downloadaports-de9e983aab20f122a6accfcc2e279bd79bc8a550.tar.gz
aports-de9e983aab20f122a6accfcc2e279bd79bc8a550.tar.bz2
aports-de9e983aab20f122a6accfcc2e279bd79bc8a550.tar.xz
testing/sqlint: new aport
-rw-r--r--testing/sqlint/APKBUILD46
-rw-r--r--testing/sqlint/gemspec.patch25
2 files changed, 71 insertions, 0 deletions
diff --git a/testing/sqlint/APKBUILD b/testing/sqlint/APKBUILD
new file mode 100644
index 0000000000..e0191e09f0
--- /dev/null
+++ b/testing/sqlint/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=sqlint
+_gemname=sqlint
+pkgver=0.2.0
+pkgrel=0
+pkgdesc="Simple SQL linter supporting ANSI and PostgreSQL syntaxes"
+url="https://github.com/purcell/sqlint"
+arch="noarch !x86 !armhf !armv7" # limited by ruby-pg_query
+license="MIT"
+depends="ruby-pg_query"
+checkdepends="ruby-rspec"
+makedepends="ruby-dev"
+source="https://github.com/purcell/sqlint/archive/$pkgver/$pkgname-$pkgver.tar.gz
+ gemspec.patch
+ "
+
+build() {
+ gem build $_gemname.gemspec
+}
+
+check() {
+ rspec
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
+
+ gem install \
+ --local \
+ --install-dir "$gemdir" \
+ --bindir "$pkgdir/usr/bin" \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+
+ # Clean-up...
+ rm -r "$gemdir"/cache \
+ "$gemdir"/build_info \
+ "$gemdir"/doc \
+ "$gemdir"/extensions
+}
+
+sha512sums="e0f29e8898a47de878790ddaa4a936e5c0b454e08285be13faf87066f67472d07b156b0cc9114ac4e56eb80bb8e1af1770ece4688d39d68a87d070f2b5adfe06 sqlint-0.2.0.tar.gz
+ebe98a70c188095847b7e6bd374ac50ae0972a9c2ea970b58478db1715c5ae4db1631f65405a3fc1ab07c3bef3b9a1f9a152c36a22e55ce57a91d93a81226aca gemspec.patch"
diff --git a/testing/sqlint/gemspec.patch b/testing/sqlint/gemspec.patch
new file mode 100644
index 0000000000..ddcad1a8e8
--- /dev/null
+++ b/testing/sqlint/gemspec.patch
@@ -0,0 +1,25 @@
+--- a/sqlint.gemspec
++++ b/sqlint.gemspec
+@@ -15,21 +15,9 @@
+ EOF
+
+ s.email = 'steve@sanityinc.com'
+- s.files = `git ls-files`.split($RS).reject do |file|
+- file =~ %r{^(?:
+- spec/.*
+- |Gemfile
+- |Rakefile
+- |\.rspec
+- |\.ruby-version
+- |\.rbenv-gemsets
+- |\.gitignore
+- |\.travis.yml
+- )$}x
+- end
++ s.files = Dir['bin/*', 'lib/**/*']
+ s.test_files = []
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
+- s.extra_rdoc_files = ['LICENSE.txt', 'README.md']
+ s.homepage = 'https://github.com/purcell/sqlint'
+ s.licenses = ['MIT']
+ s.require_paths = ['lib']