Close #476. update makefile to add support for arm builds
parent
9ccc4af946
commit
4e1006288b
|
@ -2,6 +2,10 @@
|
|||
|
||||
### Bugfixes
|
||||
|
||||
### Features
|
||||
|
||||
- [Issue #476](https://github.com/influxdb/influxdb/issues/476). Support ARM architecture
|
||||
|
||||
## v0.7.0 [2014-05-23]
|
||||
|
||||
### Bugfixes
|
||||
|
@ -15,7 +19,7 @@
|
|||
- [Issue #537](https://github.com/influxdb/influxdb/issues/537). Incorrect query syntax causes internal error
|
||||
- [Issue #565](https://github.com/influxdb/influxdb/issues/565). Empty series names shouldn't cause a panic
|
||||
- [Issue #575](https://github.com/influxdb/influxdb/issues/575). Single point select doesn't interpret timestamps correctly
|
||||
g- [Issue #576](https://github.com/influxdb/influxdb/issues/576). We shouldn't set timestamps and sequence numbers when listing cq
|
||||
- [Issue #576](https://github.com/influxdb/influxdb/issues/576). We shouldn't set timestamps and sequence numbers when listing cq
|
||||
- [Issue #560](https://github.com/influxdb/influxdb/issues/560). Use /dev/urandom instead of /dev/random
|
||||
- [Issue #502](https://github.com/influxdb/influxdb/issues/502). Fix a
|
||||
race condition in assigning id to db+series+field (Thanks @ohurvitz
|
||||
|
|
43
Makefile.in
43
Makefile.in
|
@ -3,7 +3,7 @@ SHELL = /bin/bash
|
|||
PROTOC = @PROTOC@
|
||||
GO = @GO@
|
||||
GOROOT = @GOROOT@
|
||||
# or 386
|
||||
# or 386, arm
|
||||
arch = amd64
|
||||
CGO_ENABLED = 1
|
||||
|
||||
|
@ -14,9 +14,33 @@ endif
|
|||
cflags =
|
||||
ifeq ($(arch),386)
|
||||
cflags = -m32
|
||||
else
|
||||
ifeq ($(arch),arm)
|
||||
cflags = -fpic
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(arch),)
|
||||
GOARCH = $(arch)
|
||||
endif
|
||||
|
||||
ifneq ($(CROSS_COMPILE),)
|
||||
export CXX=$(CROSS_COMPILE)-g++
|
||||
export CC=$(CROSS_COMPILE)-gcc
|
||||
export AS=$(CROSS_COMPILE)-as
|
||||
export AR=$(CROSS_COMPILE)-ar
|
||||
export NM=$(CROSS_COMPILE)-nm
|
||||
export LD=$(CROSS_COMPILE)-ld
|
||||
export OBJDUMP=$(CROSS_COMPILE)-objdump
|
||||
export OBJCOPY=$(CROSS_COMPILE)-objcopy
|
||||
export RANLIB=$(CROSS_COMPILE)-ranlib
|
||||
export STRIP=$(CROSS_COMPILE)-strip
|
||||
export CXX_FOR_TARGET=$(CROSS_COMPILE)-g++
|
||||
export CC_FOR_TARGET=$(CROSS_COMPILE)-gcc
|
||||
GO_BUILD_OPTIONS += -ldflags="-extld=$(CC)"
|
||||
cross_flags = --host=$(arch)
|
||||
endif
|
||||
|
||||
export GOARCH
|
||||
export CGO_ENABLED
|
||||
|
||||
|
@ -55,7 +79,7 @@ leveldb_deps = $(leveldb_dir)/libleveldb.a
|
|||
profile=off
|
||||
ifneq ($(profile),off)
|
||||
CGO_LDFLAGS += -ltcmalloc -lprofiler
|
||||
GO_BUILD_OPTIONS = -tags profile
|
||||
GO_BUILD_OPTIONS += -tags profile
|
||||
endif
|
||||
|
||||
# levigo flags
|
||||
|
@ -81,7 +105,7 @@ ifeq ($(uname_S),Linux)
|
|||
bash -c "cd $(snappy_dir); \
|
||||
wget https://snappy.googlecode.com/files/$(snappy_file); \
|
||||
tar --strip-components=1 -xvzf $(snappy_file); \
|
||||
CFLAGS=$(cflags) CXXFLAGS=$(cflags) ./configure; \
|
||||
CFLAGS=$(cflags) CXXFLAGS=$(cflags) ./configure $(cross_flags); \
|
||||
$(MAKE)"
|
||||
endif
|
||||
|
||||
|
@ -183,9 +207,12 @@ source_package = packages/influxdb-$(version).src.tar.gz
|
|||
binary_package = packages/influxdb-$(version).$(arch).tar.gz
|
||||
ifeq ($(arch),386)
|
||||
rpm_package = packages/influxdb-$(package_version)-1.i686.rpm
|
||||
debian_package = packages/influxdb_$(version)_i386.deb
|
||||
rpm_args = setarch i386
|
||||
deb_args = -a i386
|
||||
debian_package = packages/influxdb_$(version)_i686.deb
|
||||
arch_args = -a i686
|
||||
else ifeq ($(arch),arm)
|
||||
rpm_package = packages/influxdb-$(package_version)-1.armhf.rpm
|
||||
debian_package = packages/influxdb_$(version)_armhf.deb
|
||||
arch_args = -a armhf
|
||||
else
|
||||
rpm_package = packages/influxdb-$(package_version)-1.x86_64.rpm
|
||||
debian_package = packages/influxdb_$(version)_amd64.deb
|
||||
|
@ -212,14 +239,14 @@ $(rpm_package): $(admin_dir)/build build
|
|||
rm -rf out_rpm
|
||||
mkdir -p out_rpm/opt/influxdb/versions/$(version)
|
||||
cp -r build/* out_rpm/opt/influxdb/versions/$(version)
|
||||
rvm 1.9.3@influxdb do bash -c "pushd out_rpm; $(rpm_args) fpm -s dir -t rpm --after-install ../scripts/post_install.sh -n influxdb -v $(version) .; popd"
|
||||
rvm 1.9.3@influxdb do bash -c "pushd out_rpm; fpm -s dir -t rpm $(arch_args) --after-install ../scripts/post_install.sh -n influxdb -v $(version) .; popd"
|
||||
mv out_rpm/$(shell basename $(rpm_package)) packages/
|
||||
|
||||
$(debian_package): $(admin_dir)/build build
|
||||
rm -rf out_rpm
|
||||
mkdir -p out_rpm/opt/influxdb/versions/$(version)
|
||||
cp -r build/* out_rpm/opt/influxdb/versions/$(version)
|
||||
rvm 1.9.3@influxdb do bash -c "pushd out_rpm; fpm -s dir -t deb $(deb_args) --after-install ../scripts/post_install.sh -n influxdb -v $(version) .; popd"
|
||||
rvm 1.9.3@influxdb do bash -c "pushd out_rpm; fpm -s dir -t deb $(arch_args) --after-install ../scripts/post_install.sh -n influxdb -v $(version) .; popd"
|
||||
mv out_rpm/$(shell basename $(debian_package)) packages/
|
||||
|
||||
$(source_package): dependencies
|
||||
|
|
|
@ -45,6 +45,7 @@ fi
|
|||
make clean
|
||||
make package version=$version
|
||||
make package version=$version arch=386
|
||||
make arch=arm CROSS_COMPILE=arm-linux-gnueabihf package version=$version
|
||||
# rpm convention is not to have dashes in the package, or at least
|
||||
# that's what fpm is claiming
|
||||
rpm_version=${version/-/_}
|
||||
|
|
Loading…
Reference in New Issue