Rename native library names from libsnappy to libsnappyjava
This commit is contained in:
parent
a8f6917370
commit
98566c5ad1
|
@ -6,98 +6,82 @@ RESOURCE_DIR=src/main/resources
|
|||
NATIVE_DIR=$(RESOURCE_DIR)/native
|
||||
RSYNC=rsync -av -e ssh --exclude=".hg"
|
||||
|
||||
WIN_SERVER=192.168.11.10
|
||||
WIN_WORK=work/hg/snappy-java
|
||||
WORK:=work/hg/snappy-java
|
||||
|
||||
WIN64_SERVER=localhost
|
||||
WIN64_WORK=work/hg/snappy-java
|
||||
MAC_SERVER=172.16.133.41
|
||||
MAC_TIGER_SERVER=172.16.133.171
|
||||
|
||||
MAC_SERVER=192.168.11.11
|
||||
MAC_WORK=work/hg/snappy-java
|
||||
|
||||
MAC_TIGER_SERVER=192.168.11.12
|
||||
MAC_TIGER_WORK=work/hg/snappy-java
|
||||
AMD_SERVER=hx02
|
||||
|
||||
LINUX_SERVER=sprite
|
||||
LINUX_WORK=work/hg/snappy-java
|
||||
|
||||
AMD_SERVER=utgb01
|
||||
AMD_WORK=work/hg/snappy-java
|
||||
|
||||
BUILD_CMD = hg pull -u && make clean-native && make native
|
||||
BUILD_CMD_PREFIX = hg pull -u && make clean-native && make
|
||||
BUILD_CMD = $(BUILD_CMD_PREFIX) native
|
||||
TEST_CMD = mvn test
|
||||
|
||||
all: compile test
|
||||
|
||||
.PHONY: compile test native clean
|
||||
|
||||
include VERSION
|
||||
sqlite-version := sqlite-$(version)
|
||||
|
||||
LIB_DIR=target/dll/$(sqlite-version)
|
||||
DLL_DIR=$(LIB_DIR)/native
|
||||
|
||||
DLL_WIN=$(DLL_DIR)/Windows/x86/snappy.dll
|
||||
DLL_WIN64=$(DLL_DIR)/Windows/amd64/snappy.dll
|
||||
DLL_MAC=$(DLL_DIR)/Mac/x86_64/libsnappy.jnilib
|
||||
DLL_TIGER_MAC=$(DLL_DIR)/Mac/i386/libsnappy.jnilib
|
||||
DLL_LINUX=$(DLL_DIR)/Linux/i386/libsnappy.so
|
||||
DLL_AMD64=$(DLL_DIR)/Linux/amd64/libsnappy.so
|
||||
DLL_DIR=src/main/resources/org/xerial/snappy/native
|
||||
|
||||
DLL_WIN=$(DLL_DIR)/Windows/x86/snappyjava.dll
|
||||
DLL_WIN64=$(DLL_DIR)/Windows/amd64/snappyjava.dll
|
||||
DLL_MAC=$(DLL_DIR)/Mac/x86_64/libsnappyjava.jnilib
|
||||
DLL_TIGER_MAC=$(DLL_DIR)/Mac/i386/libsnappyjava.jnilib
|
||||
DLL_LINUX=$(DLL_DIR)/Linux/i386/libsnappyjava.so
|
||||
DLL_AMD64=$(DLL_DIR)/Linux/amd64/libsnappyjava.so
|
||||
|
||||
|
||||
$(DLL_WIN):
|
||||
ssh $(WIN_SERVER) "source .zprofile && cd $(WIN_WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(DLL_DIR)/Windows
|
||||
$(RSYNC) $(WIN_SERVER):./$(WIN_WORK)/$(DLL_DIR)/Windows/ $(DLL_DIR)/Windows/
|
||||
ssh $(WIN64_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD_PREFIX) win32"
|
||||
mkdir -p $(dir $(DLL_WIN))
|
||||
$(RSYNC) $(WIN_SERVER):./$(WORK)/$(DLL_WIN) $(DLL_WIN)
|
||||
|
||||
$(DLL_WIN64):
|
||||
ssh $(WIN64_SERVER) "source .zprofile && cd $(WIN64_WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(DLL_DIR)/Windows
|
||||
$(RSYNC) $(WIN64_SERVER):./$(WIN64_WORK)/$(DLL_DIR)/Windows/ $(DLL_DIR)/Windows/
|
||||
ssh $(WIN64_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(dir $(DLL_WIN64))
|
||||
$(RSYNC) $(WIN64_SERVER):./$(WORK)/$(DLL_WIN64) $(DLL_WIN64)
|
||||
|
||||
$(DLL_MAC):
|
||||
ssh $(MAC_SERVER) "source .zprofile && cd $(MAC_WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(DLL_DIR)/Mac
|
||||
$(RSYNC) $(MAC_SERVER):./$(MAC_WORK)/$(DLL_DIR)/Mac/ $(DLL_DIR)/Mac/
|
||||
ssh $(MAC_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(dir $(DLL_MAC))
|
||||
$(RSYNC) $(MAC_SERVER):./$(WORK)/$(DLL_MAC) $(DLL_MAC)
|
||||
|
||||
$(DLL_TIGER_MAC):
|
||||
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(MAC_TIGER_WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(DLL_DIR)/Mac
|
||||
$(RSYNC) $(MAC_TIGER_SERVER):./$(MAC_TIGER_WORK)/$(DLL_DIR)/Mac/ $(DLL_DIR)/Mac/
|
||||
|
||||
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(dir $(DLL_TIGER_MAC))
|
||||
$(RSYNC) $(MAC_TIGER_SERVER):./$(WORK)/$(DLL_TIGER_MAC) $(DLL_TIGER_MAC)
|
||||
|
||||
$(DLL_LINUX):
|
||||
ssh $(LINUX_SERVER) "source .zprofile && source /etc/profile.d/java.sh && cd $(LINUX_WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(DLL_DIR)/Linux/i386
|
||||
$(RSYNC) $(LINUX_SERVER):./$(LINUX_WORK)/$(DLL_DIR)/Linux/i386/ $(DLL_DIR)/Linux/i386/
|
||||
ssh $(AMD_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD_PREFIX) linux32"
|
||||
mkdir -p $(dir $(DLL_LINUX))
|
||||
$(RSYNC) $(AMD_SERVER):./$(WORK)/$(DLL_LINUX) $(DLL_LINUX)
|
||||
|
||||
$(DLL_AMD64):
|
||||
ssh $(AMD_SERVER) "source .zprofile && cd $(AMD_WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(DLL_DIR)/Linux/amd64
|
||||
$(RSYNC) $(AMD_SERVER):./$(AMD_WORK)/$(DLL_DIR)/Linux/amd64/ $(DLL_DIR)/Linux/amd64/
|
||||
ssh $(AMD_SERVER) "source .zprofile && cd $(WORK) && $(BUILD_CMD)"
|
||||
mkdir -p $(dir $(DLL_AMD64))
|
||||
$(RSYNC) $(AMD_SERVER):./$(WORK)/$(DLL_AMD64) $(DLL_AMD64)
|
||||
|
||||
$(DLL_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
native: $(DLL_DIR) $(DLL_WIN) $(DLL_WIN64) $(DLL_MAC) $(DLL_TIGER_MAC) $(DLL_LINUX) $(DLL_AMD64)
|
||||
native: $(DLL_WIN) $(DLL_WIN64) $(DLL_MAC) $(DLL_TIGER_MAC) $(DLL_LINUX) $(DLL_AMD64)
|
||||
|
||||
compile: native
|
||||
cp -r $(DLL_DIR)/ $(RESOURCE_DIR)/native/
|
||||
|
||||
test:
|
||||
ssh $(WIN_SERVER) "source .zprofile && cd $(WIN_WORK) && $(TEST_CMD)"
|
||||
ssh $(MAC_SERVER) "source .zprofile && cd $(MAC_WORK) && $(TEST_CMD)"
|
||||
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(MAC_WORK) && $(TEST_CMD)"
|
||||
ssh $(LINUX_SERVER) "source .zprofile && source /etc/profile.d/java.sh && cd $(LINUX_WORK) && $(TEST_CMD)"
|
||||
ssh $(AMD_SERVER) "source .zprofile && cd $(AMD_WORK) && $(TEST_CMD)"
|
||||
ssh $(WIN64_SERVER) "source .zprofile && cd $(WORK) && $(TEST_CMD)"
|
||||
ssh $(MAC_SERVER) "source .zprofile && cd $(WORK) && $(TEST_CMD)"
|
||||
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(WORK) && $(TEST_CMD)"
|
||||
ssh $(AMD_SERVER) "source .zprofile && cd $(WORK) && $(TEST_CMD)"
|
||||
|
||||
release:
|
||||
mvn release:prepare
|
||||
mvn release:perform
|
||||
|
||||
release-xerial:
|
||||
mvn release:perform -Dtag=snappy-java-$(version)
|
||||
mvn release:perform -Dtag=snappy-java-$(VERSION)
|
||||
|
||||
release-sourceforge:
|
||||
mvn release:perform -Darguments="-P sourceforge" -Dtag=snappy-java-$(version)
|
||||
mvn release:perform -Darguments="-P sourceforge" -Dtag=snappy-java-$(VERSION)
|
||||
|
|
|
@ -192,6 +192,7 @@ public class LoadSnappy
|
|||
String tempFolder = new File(System.getProperty("java.io.tmpdir")).getAbsolutePath();
|
||||
// Try extracting the library from jar
|
||||
if (extractAndLoadLibraryFile(snappyNativeLibraryPath, snappyNativeLibraryName, tempFolder)) {
|
||||
isLoaded = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue