aboutsummaryrefslogblamecommitdiffstats
path: root/community/rethinkdb/APKBUILD
blob: 4602eb9533335738c00b78f820b067f287d31df3 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                     
                                                 
                 
            
        
                                                          
                               
                           
                    
                                     
                                                                     

                                                                            
                              


                          
                                                                
                          
                                  

                                


                       
                                    
 









                                                           
         
                      



                                      
                               
                                    






                                    
                                            
                                                                 

 




                      
           
                      
                                      
                                                                    
                                                   



                                                                                                     

                                                                     
                                                 
                                             
                                                 

                                              

 
       
                   


                                                                              
                                                                                                                                                                 
                                                                                                                                                    
                                                                                                                                                            

                                                                                                                                                          
                                                                                                                                                 
                                                                                                                                                  
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Daniel Treadwell <daniel@djt.id.au>
pkgname=rethinkdb
pkgver=2.3.6
pkgrel=7
pkgdesc="Distributed powerful and scalable NoSQL database"
url="https://www.rethinkdb.com"
arch="x86_64 ppc64le s390x"
license="Apache-2.0"
options="!check" # needs coffeescript
makedepends="bash python2 linux-headers bsd-compat-headers m4 paxmark
	protobuf-dev icu-dev libressl-dev curl-dev boost-dev libexecinfo-dev
	"
install="$pkgname.pre-install"
pkgusers=rethinkdb
pkggroups=rethinkdb
subpackages="$pkgname-doc"
source="https://download.rethinkdb.com/dist/$pkgname-$pkgver.tgz
	libressl-all.patch
	enable-build-ppc64le.patch
	enable-build-s390x.patch
	paxmark-x86_64.patch
	rethinkdb.initd
	rethinkdb.confd
	"
builddir="$srcdir/rethinkdb-$pkgver"

prepare() {
	cd "$builddir"
	for i in $source; do
		case $i in
		*-$CARCH.patch|*-all.patch)
			msg $i; patch -p1 -i "$srcdir"/$i;;
		esac
	done
}

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--dynamic all \
		--with-system-malloc

	local _arch
	case $CARCH in
		x86) _arch=ia32 ;;
		x86_64) _arch=x64 ;;
	esac

	export LDFLAGS="$LDFLAGS -lexecinfo"
	make CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks"
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm 644 "$pkgdir"/etc/$pkgname/default.conf.sample \
		"$pkgdir"/etc/$pkgname/default.conf
	sed -e 's|# directory=/var/lib/rethinkdb|directory=/var/lib/rethinkdb|' \
		-e 's|# pid-file=/var/run/rethinkdb/rethinkdb.pid|pid-file=/var/run/rethinkdb.pid|' \
		-e 's|# runuser=rethinkdb|runuser=rethinkdb|' \
		-e 's|# rungroup=rethinkdb|rungroup=rethinkdb|' \
		-i "$pkgdir"/etc/$pkgname/default.conf
	install -d -o $pkgname -g $pkgname "$pkgdir"/var/lib/$pkgname
	install -Dm755 "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname
	paxmark -m "$pkgdir"/usr/bin/rethinkdb
}

doc() {
	default_doc
	mv "$pkgdir"/etc/$pkgname/*.sample "$subpkgdir"/usr/share/doc/$pkgname
}

sha512sums="653177750f7439fa1d61a121e488d578be1eab90f87c7d17ad52b9793d8543f22bbe98f8d501c2ab2d7048c65118096430fe7bde945d87c7a3228905af801af2  rethinkdb-2.3.6.tgz
9ff727feedc7a9f58e7bf8554dc26e32ebca259b2d5d75ff0d064f5aea7a54c9c94fab16b83a3bc4039d4ae6d6d805d7b129ab9d5f762186d0388adeeff6e67c  libressl-all.patch
63e9b4c145617a91d00c78c980937c4f4dc010c7bc4a8db8d7ecaad47dbecd0333fcaadbfe0251dee50f44494e802db5322d8cc0096cf614f44fd4069e82f8ac  enable-build-ppc64le.patch
04f6e00242ce025ba116e3dae1bf9ccd887901d9d0700faa006b72c4a1c5bd94996a9062db32b11ed0cd6a96af1f11786746ba446d288f6d921f6d93c2158cae  enable-build-s390x.patch
c5a7905c116a2bf7af5ce5f8e6536c61e06ee9ac7cbead0358396e0989141890908eab694f4a88f0dcaf9f4ddcefe751dc7a949cbb4c870d87f61e720ef3b45a  paxmark-x86_64.patch
c27e21073048bd5e8e2ec91303b43ce873748573e2b44ba28ee57ca1b3080afb67e56880b6a6da7a0abf4f2967dce45aa27fe8d6dd44b70d874d776e876ef132  rethinkdb.initd
3a07f9c78ef96b2ca37fca508ee14a644d3c08612f662ba5260182fbfcceba064d20253f1261f56dc0a2c28d1a4d5e2320872c3c4e7595cb7ab4e202eb28ad42  rethinkdb.confd"