aboutsummaryrefslogblamecommitdiffstats
path: root/community/influxdb/APKBUILD
blob: 76e56152139f11883c093cd22c66c56e1bfe7bea (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                    
                                                       
                

            

                                                                         
                        
             
                                           
                              
                                          

                                                                                               
                      

                                                     
 


                                


                                                              
                      
                     
                       


         

                                                           
                                                                

                                                  


                   
         



                                            


                            

                      


                                                           

                                       


                                                                                      
 

                                                            
 
                                                                           
 
                                                                             
                                                                             

 


                                                                                                                                                                   
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Konstantin Kulikov <k.kulikov2@gmail.com>
pkgname=influxdb
pkgver=1.7.7
pkgrel=0
pkgdesc="Scalable datastore for metrics, events, and real-time analytics"
url="https://www.influxdata.com/time-series-platform/influxdb/"
arch="all !aarch64 !x86"
license="MIT"
makedepends="go dep python2 asciidoc xmlto"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/influxdata/$pkgname/archive/v$pkgver.tar.gz
	influxdb.initd
	influxdb.confd
	"
builddir="$srcdir/src/github.com/influxdata/$pkgname"

export GOPATH="$srcdir"
export GOCACHE="$srcdir/gocache"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/ || return 1
	cd "$builddir"
	dep ensure -v
	default_prepare
}

build() {
	local path
	for path in $(find ./cmd/* -maxdepth 0 -type d); do
		go build -v -ldflags="-X main.version=$pkgver" \
			-o ./bin/${path##*/} $path
	done
	make -C man
}

check() {
	# Failures on these arches
	case $CARCH in
		s390x|arm*|ppc64le) return 0
	esac
	go test -short ./...
}

package() {
	cd "$builddir"
	local path bindir
	for path in $(find ./cmd/* -maxdepth 0 -type d); do
		case "${path##*/}" in
		influxd) bindir=sbin ;;
		*) bindir=bin ;;
		esac
		install -Dm755 ./bin/"${path##*/}" "$pkgdir"/usr/$bindir/"${path##*/}"
	done

	install -d "$pkgdir/usr/share/man/man1/"
	install -Dm644 man/*.1 "$pkgdir/usr/share/man/man1/"

	install -Dm644 "etc/config.sample.toml" "$pkgdir/etc/influxdb.conf"

	install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
	install -Dm644 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
}

sha512sums="f8b74849f2de09b10de361d6008cab0e0291ea0978e3c89df5e758788d2dbfd5cc0b416bfaf3d14b04410a9cdff4ca7c96be6afadbf16490c0fbab599db3d643  influxdb-1.7.7.tar.gz
04fb33ee5b3d60c3e8655cc20423885140b66e74a822866cfe05668e942d24116878b1815a48b07063c707bb600cf0ff390994f0321c881eed557abde016eeb9  influxdb.initd
1db8790c84a9e193a6029291b2a83a6083d1ddcc330c2191c4da6bdcc6410d832288aee275605b4ca041c8855fe8a1340631444e901044659755db0146d6d3dc  influxdb.confd"