aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-net-ldap/APKBUILD
blob: 7c1c131a81f48133f176fbc8a9b0345bd9f7d09a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-net-ldap
_gemname=net-ldap
pkgver=0.16.2
pkgrel=2
pkgdesc="Pure Ruby LDAP library"
url="https://github.com/ruby-ldap/ruby-net-ldap"
arch="noarch"
license="MIT"
depends="ruby"
checkdepends="ruby-bundler"
source="https://github.com/ruby-ldap/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz
	gemspec.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	gem build $_gemname.gemspec
}

check() {
	# TODO: Install from aports after we create aport for flexmock.
	export GEM_HOME="$(pwd)/.gems"
	bundle install

	"$GEM_HOME"/bin/rake test
}

package() {
	local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"

	gem install --local \
		--install-dir "$gemdir" \
		--ignore-dependencies \
		--no-document \
		--verbose \
		$_gemname

	# Remove unnecessary files and empty directories.
	cd "$gemdir"
	rm -r cache build_info doc
}

sha512sums="fc32ec6ec7e5819ac116450cf4ab3a55fea2dc3ae144c3a3b7293b70169b9a9ddfb554002e38b2da4ab1d8be698552cd1eae61d916d623aced353701f43d8c2c  ruby-net-ldap-0.16.2.tar.gz
b1fbdfac461cd765bc20731f835873570c57be1188cc26099e5b26d74abd6a3e9a2848cf180825f1715897808bc77e1c7ac1b62a7980eee597b88e2b6d68168f  gemspec.patch"