diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8aac51f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/1.1.2.4.tar.gz +SOURCES/snappy-java-1.1.2.4.pom diff --git a/.rh-maven35-snappy-java.metadata b/.rh-maven35-snappy-java.metadata new file mode 100644 index 0000000..6c56480 --- /dev/null +++ b/.rh-maven35-snappy-java.metadata @@ -0,0 +1,2 @@ +d9b4e3be9bc282caf4a776effa946a7514fcd69a SOURCES/1.1.2.4.tar.gz +76db57f11fb0d4898825ffbafed6c1e7b0956be0 SOURCES/snappy-java-1.1.2.4.pom diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/snappy-java-1.1.2-build.patch b/SOURCES/snappy-java-1.1.2-build.patch new file mode 100644 index 0000000..b1559a8 --- /dev/null +++ b/SOURCES/snappy-java-1.1.2-build.patch @@ -0,0 +1,341 @@ +diff -Nru snappy-java-1.1.2/Makefile snappy-java-1.1.2.build/Makefile +--- snappy-java-1.1.2/Makefile 2015-09-22 22:32:13.000000000 +0200 ++++ snappy-java-1.1.2.build/Makefile 2016-01-07 16:22:19.238067618 +0100 +@@ -1,17 +1,15 @@ + + include Makefile.common + +-MVN:=mvn +-SBT:=./sbt + + all: snappy + + SNAPPY_OUT:=$(TARGET)/$(snappy)-$(os_arch) +-SNAPPY_ARCHIVE:=$(TARGET)/snappy-$(VERSION).tar.gz +-SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc ++#SNAPPY_ARCHIVE:=$(TARGET)/snappy-$(VERSION).tar.gz ++#SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc + SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(VERSION) + SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC)) +-SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/,$(patsubst %.cc,%.o,$(SNAPPY_CC)) SnappyNative.o) ++SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/, SnappyNative.o) + + SNAPPY_UNPACKED:=$(TARGET)/snappy-extracted.log + SNAPPY_GIT_UNPACKED:=$(TARGET)/snappy-git-extracted.log +@@ -35,21 +33,14 @@ + + $(SNAPPY_ARCHIVE): + @mkdir -p $(@D) +- curl -o$@ http://snappy.googlecode.com/files/snappy-$(VERSION).tar.gz + + $(SNAPPY_UNPACKED): $(SNAPPY_ARCHIVE) +- $(TAR) xvfz $< -C $(TARGET) +- touch $@ +- cd $(SNAPPY_SRC_DIR) && ./configure ++ + + $(SNAPPY_GIT_UNPACKED): + @mkdir -p $(SNAPPY_SRC_DIR) +- git clone $(GIT_REPO_URL) $(SNAPPY_SRC_DIR) +- git --git-dir=$(SNAPPY_SRC_DIR)/.git --work-tree=$(SNAPPY_SRC_DIR) checkout -b local/snappy-$(GIT_SNAPPY_BRANCH) $(GIT_SNAPPY_BRANCH) +- touch $@ +- cd $(SNAPPY_SRC_DIR) && ./autogen.sh && ./configure + +-jni-header: $(SRC)/org/xerial/snappy/SnappyNative.h ++#jni-header: $(SRC)/org/xerial/snappy/SnappyNative.h + + $(TARGET)/jni-classes/org/xerial/snappy/SnappyNative.class : $(SRC)/org/xerial/snappy/SnappyNative.java + @mkdir -p $(TARGET)/jni-classes +@@ -66,7 +57,6 @@ + + $(SNAPPY_OUT)/%.o : $(SNAPPY_SRC_DIR)/%.cc + @mkdir -p $(@D) +- $(CXX) $(CXXFLAGS) -c $< -o $@ + + $(SNAPPY_OUT)/SnappyNative.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/org/xerial/snappy/SnappyNative.h + @mkdir -p $(@D) +@@ -87,7 +77,7 @@ + NATIVE_TARGET_DIR:=$(TARGET)/classes/org/xerial/snappy/native/$(OS_NAME)/$(OS_ARCH) + NATIVE_DLL:=$(NATIVE_DIR)/$(LIBNAME) + +-snappy-jar-version:=snappy-java-$(shell perl -npe "s/version in ThisBuild\s+:=\s+\"(.*)\"/\1/" version.sbt | sed -e "/^$$/d") ++snappy-jar-version:=snappy-java-1.1.2 + + ifndef USE_GIT + native: $(SNAPPY_UNPACKED) $(NATIVE_DLL) +@@ -106,10 +96,10 @@ + package: $(TARGET)/$(snappy-jar-version).jar + + $(TARGET)/$(snappy-jar-version).jar: +- $(SBT) package ++ + + test: $(NATIVE_DLL) +- $(SBT) test ++ + + win32: + $(MAKE) native CROSS_PREFIX=i686-w64-mingw32- OS_NAME=Windows OS_ARCH=x86 +@@ -121,35 +111,23 @@ + mac32: + $(MAKE) native OS_NAME=Mac OS_ARCH=x86 + +-linux32: +- $(MAKE) native OS_NAME=Linux OS_ARCH=x86 ++linux: ++ $(MAKE) native OS_NAME=Linux OS_ARCH=$(OS_ARCH) + + freebsd64: + $(MAKE) native OS_NAME=FreeBSD OS_ARCH=x86_64 + +-# for cross-compilation on Ubuntu, install the g++-arm-linux-gnueabi package +-linux-arm: +- $(MAKE) native CROSS_PREFIX=arm-linux-gnueabi- OS_NAME=Linux OS_ARCH=arm +- +-# for cross-compilation on Ubuntu, install the g++-arm-linux-gnueabihf package +-linux-armhf: +- $(MAKE) native CROSS_PREFIX=arm-linux-gnueabihf- OS_NAME=Linux OS_ARCH=armhf +- +-# for cross-compilation on Ubuntu, install the g++-aarch64-linux-gnu +-linux-aarch64: +- $(MAKE) native CROSS_PREFIX=aarch64-linux-gnu- OS_NAME=Linux OS_ARCH=aarch64 +- +-clean-native-linux32: +- $(MAKE) clean-native OS_NAME=Linux OS_ARCH=x86 ++clean-native-linux: ++ $(MAKE) clean-native OS_NAME=Linux OS_ARCH=$(OS_ARCH) + + clean-native-win32: + $(MAKE) clean-native OS_NAME=Windows OS_ARCH=x86 + + javadoc: +- $(SBT) doc ++ + + install-m2: +- $(SBT) publishM2 ++ + + googlecode-upload: googlecode-lib-upload googlecode-src-upload + +@@ -159,11 +137,9 @@ + GOOGLECODE_USER:=leo@xerial.org + + $(TARGET)/snappy-java-$(VERSION)-lib.upload: +- ./googlecode_upload.py -s "library for all platforms" -p snappy-java -l "Type-Executable,Featured,OpSys-All" -u "$(GOOGLECODE_USER)" target/snappy-java-$(VERSION).jar +- touch $@ ++ + + $(TARGET)/snappy-java-$(VERSION)-src.upload: +- ./googlecode_upload.py -s "source code archive" -p snappy-java -l "Type-Source,OpSys-All" -u "$(GOOGLECODE_USER)" target/snappy-java-$(VERSION).tar.gz +- touch $@ ++ + + +diff -Nru snappy-java-1.1.2/Makefile.common snappy-java-1.1.2.build/Makefile.common +--- snappy-java-1.1.2/Makefile.common 2015-09-22 22:32:13.000000000 +0200 ++++ snappy-java-1.1.2.build/Makefile.common 2016-01-07 16:22:19.240067503 +0100 +@@ -42,8 +42,14 @@ + + # os=Default is meant to be generic unix/linux + +-known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armhf Linux-ppc Linux-ppc64 Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64 +-os_arch := $(OS_NAME)-$(OS_ARCH) ++known_os_archs := Linux ++# trust the platform CXXFLAGS, etc. on Linux ++ifeq ($(OS_NAME),Linux) ++ os_arch := $(OS_NAME) ++else ++ os_arch := $(OS_NAME)-$(OS_ARCH) ++endif ++ + IBM_JDK_7 := $(findstring IBM, $(shell $(JAVA) -version 2>&1 | grep IBM | grep "JRE 1.7")) + + ifeq (,$(findstring $(strip $(os_arch)),$(known_os_archs))) +@@ -72,169 +78,12 @@ + Default_LIBNAME := libsnappyjava.so + Default_SNAPPY_FLAGS := + +-Linux-x86_CXX := $(CROSS_PREFIX)g++ +-Linux-x86_STRIP := $(CROSS_PREFIX)strip +-ifeq ($(IBM_JDK_7),) +- Linux-x86_CXXFLAGS := -include lib/inc_linux/jni_md.h -I$(JAVA_HOME)/include -O2 -fPIC -fvisibility=hidden -m32 +-else +- Linux-x86_CXXFLAGS := -include $(IBM_JDK_LIB)/jni_md.h -include $(IBM_JDK_LIB)/jniport.h -I$(JAVA_HOME)/include -O2 -fPIC -fvisibility=hidden -m32 +-endif +-Linux-x86_LINKFLAGS := -shared -static-libgcc -static-libstdc++ +-Linux-x86_LIBNAME := libsnappyjava.so +-Linux-x86_SNAPPY_FLAGS:= +- +-Linux-x86_64_CXX := $(CROSS_PREFIX)g++ +-Linux-x86_64_STRIP := $(CROSS_PREFIX)strip +-ifeq ($(IBM_JDK_7),) +- Linux-x86_64_CXXFLAGS := -Ilib/inc_linux -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden -m64 +-else +- Linux-x86_64_CXXFLAGS := -include $(IBM_JDK_LIB)/jni_md.h -include $(IBM_JDK_LIB)/jniport.h -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden -m64 +-endif +-Linux-x86_64_LINKFLAGS := -shared -static-libgcc -static-libstdc++ +-Linux-x86_64_LIBNAME := libsnappyjava.so +-Linux-x86_64_SNAPPY_FLAGS := +- +-Linux-ppc_CXX := g++ +-Linux-ppc_STRIP := strip +-ifeq ($(IBM_JDK_7),) +- Linux-ppc_CXXFLAGS := -DHAVE_CONFIG_H -Ilib/inc_linux -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden -m32 +-else +- Linux-ppc_CXXFLAGS := -DHAVE_CONFIG_H -include lib/inc_linux/jni_md.h -include $(IBM_JDK_LIB)/jniport.h -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -O2 -fPIC -m32 +-endif +-Linux-ppc_LINKFLAGS := -shared -static-libgcc -static-libstdc++ +-Linux-ppc_LIBNAME := libsnappyjava.so +-Linux-ppc_SNAPPY_FLAGS := +- +-Linux-ppc64_CXX := g++ +-Linux-ppc64_STRIP := strip +-ifeq ($(IBM_JDK_7),) +- Linux-ppc64_CXXFLAGS := -DHAVE_CONFIG_H -Ilib/inc_linux -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden -m64 +-else +- Linux-ppc64_CXXFLAGS := -DHAVE_CONFIG_H -include $(IBM_JDK_LIB)/jni_md.h -include $(IBM_JDK_LIB)/jniport.h -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -O2 -fPIC -m64 +-endif +-Linux-ppc64_LINKFLAGS := -shared -static-libgcc -static-libstdc++ +-Linux-ppc64_LIBNAME := libsnappyjava.so +-Linux-ppc64_SNAPPY_FLAGS := +- +-AIX-ppc_CXX := g++ +-AIX-ppc_STRIP := strip +-AIX-ppc_LIBNAME := libsnappyjava.a +-ifeq ($(IBM_JDK_7),) +- AIX-ppc_CXXFLAGS := -DHAVE_CONFIG_H -Ilib/inc_linux -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden +-else +- AIX-ppc_CXXFLAGS := -DHAVE_CONFIG_H -I$(JAVA_HOME)/include/aix -Ilib/inc_ibm -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -maix32 +-endif +-AIX-ppc_LINKFLAGS := -shared -static-libgcc -static-libstdc++ -lcrypt +-AIX-ppc_SNAPPY_FLAGS := +- +-AIX-ppc64_CXX := g++ +-AIX-ppc64_STRIP := strip -X64 +-AIX-ppc64_LIBNAME := libsnappyjava.a +-ifeq ($(IBM_JDK_7),) +- AIX-ppc64_CXXFLAGS := -DHAVE_CONFIG_H -Ilib/inc_linux -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden -m64 +-else +- AIX-ppc64_CXXFLAGS := -DHAVE_CONFIG_H -I$(JAVA_HOME)/include/aix -Ilib/inc_ibm -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -maix64 +-endif +-AIX-ppc64_LINKFLAGS := -shared -static-libgcc -static-libstdc++ -lcrypt +-AIX-ppc64_SNAPPY_FLAGS := +- +-Linux-s390_CXX := g++ +-Linux-s390_STRIP := strip +-ifeq ($(IBM_JDK_7),) +- Linux-s390_CXXFLAGS := -DHAVE_CONFIG_H -Ilib/inc_linux -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden -m31 +-else +- Linux-s390_CXXFLAGS := -DHAVE_CONFIG_H -I$(JAVA_HOME)/include/linux -Ilib/inc_ibm -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -m31 +-endif +-Linux-s390_LINKFLAGS := -shared -static-libgcc -static-libstdc++ +-Linux-s390_LIBNAME := libsnappyjava.so +-Linux-s390_SNAPPY_FLAGS := +- +-Linux-s390x_CXX := g++ +-Linux-s390x_STRIP := strip +-ifeq ($(IBM_JDK_7),) +- Linux-s390x_CXXFLAGS := -DHAVE_CONFIG_H -Ilib/inc_linux -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden -m64 +-else +- Linux-s390x_CXXFLAGS := -DHAVE_CONFIG_H -I$(JAVA_HOME)/include/linux -Ilib/inc_ibm -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -m64 +-endif +-Linux-s390x_LINKFLAGS := -shared -static-libgcc -static-libstdc++ +-Linux-s390x_LIBNAME := libsnappyjava.so +-Linux-s390x_SNAPPY_FLAGS := +- +-SunOS-x86_CXX := g++ +-SunOS-x86_STRIP := strip +-SunOS-x86_CXXFLAGS := -include lib/inc_linux/jni_md.h -I$(JAVA_HOME)/include -O2 -fPIC -fvisibility=hidden +-SunOS-x86_LINKFLAGS := -shared -static-libgcc -static-libstdc++ +-SunOS-x86_LIBNAME := libsnappyjava.so +-SunOS-x86_SNAPPY_FLAGS := +- +-SunOS-sparc_CXX := g++ +-SunOS-sparc_STRIP := strip +-SunOS-sparc_CXXFLAGS := -include lib/inc_linux/jni_md.h -I$(JAVA_HOME)/include -O2 -fPIC -fvisibility=hidden +-SunOS-sparc_LINKFLAGS := -shared -static-libgcc -static-libstdc++ +-SunOS-sparc_LIBNAME := libsnappyjava.so +-SunOS-sparc_SNAPPY_FLAGS := +- +-SunOS-x86_64_CXX := g++ +-SunOS-x86_64_STRIP := strip +-SunOS-x86_64_CXXFLAGS := -include lib/inc_linux/jni_md.h -I$(JAVA_HOME)/include -O2 -fPIC -fvisibility=hidden -m64 +-SunOS-x86_64_LINKFLAGS := -shared -static-libgcc -static-libstdc++ +-SunOS-x86_64_LIBNAME := libsnappyjava.so +-SunOS-x86_64_SNAPPY_FLAGS := +- +-# '-include lib/inc_linux/jni_md.h' is used to force the use of our version, +-# which defines JNIEXPORT differently; otherwise, since OpenJDK includes +-# jni_md.h in same directory as jni.h, the include path is ignored when +-# jni_md.h is included from jni.h +- +-Linux-arm_CXX := $(CROSS_PREFIX)g++ +-Linux-arm_STRIP := $(CROSS_PREFIX)strip +-Linux-arm_CXXFLAGS := -include lib/inc_linux/jni_md.h -I$(JAVA_HOME)/include -O2 -fPIC -fvisibility=hidden -mfloat-abi=softfp +-Linux-arm_LINKFLAGS := -shared -static-libgcc +-Linux-arm_LIBNAME := libsnappyjava.so +-Linux-arm_SNAPPY_FLAGS:= +- +-Linux-armhf_CXX := $(CROSS_PREFIX)g++ +-Linux-armhf_STRIP := $(CROSS_PREFIX)strip +-Linux-armhf_CXXFLAGS := -include lib/inc_linux/jni_md.h -I$(JAVA_HOME)/include -O2 -fPIC -fvisibility=hidden -mfloat-abi=hard +-Linux-armhf_LINKFLAGS := -shared -static-libgcc +-Linux-armhf_LIBNAME := libsnappyjava.so +-Linux-armhf_SNAPPY_FLAGS:= +- +-Mac-x86_CXX := g++ -arch i386 +-Mac-x86_STRIP := strip -x +-Mac-x86_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -mmacosx-version-min=10.4 -fvisibility=hidden +-Mac-x86_LINKFLAGS := -dynamiclib -static-libgcc +-Mac-x86_LIBNAME := libsnappyjava.jnilib +-Mac-x86_SNAPPY_FLAGS := +- +-Mac-x86_64_CXX := g++ -arch $(OS_ARCH) +-Mac-x86_64_STRIP := strip -x +-Mac-x86_64_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -mmacosx-version-min=10.5 -fvisibility=hidden +-Mac-x86_64_LINKFLAGS := -dynamiclib +-Mac-x86_64_LIBNAME := libsnappyjava.jnilib +-Mac-x86_64_SNAPPY_FLAGS := +- +-FreeBSD-x86_64_CXX := $(CROSS_PREFIX)g++ +-FreeBSD-x86_64_STRIP := $(CROSS_PREFIX)strip +-FreeBSD-x86_64_CXXFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden +-FreeBSD-x86_64_LINKFLAGS := -shared -static-libgcc +-FreeBSD-x86_64_LIBNAME := libsnappyjava.so +-FreeBSD-x86_64_SNAPPY_FLAGS := +- +-Windows-x86_CXX := $(CROSS_PREFIX)g++ +-Windows-x86_STRIP := $(CROSS_PREFIX)strip +-Windows-x86_CXXFLAGS := -Ilib/inc_win -O2 +-Windows-x86_LINKFLAGS := -Wl,--kill-at -shared -static +-Windows-x86_LIBNAME := snappyjava.dll +-Windows-x86_SNAPPY_FLAGS := +- +-Windows-x86_64_CXX := $(CROSS_PREFIX)g++ +-Windows-x86_64_STRIP := $(CROSS_PREFIX)strip +-Windows-x86_64_CXXFLAGS := -Ilib/inc_win -O2 +-Windows-x86_64_LINKFLAGS := -Wl,--kill-at -shared -static +-Windows-x86_64_LIBNAME := snappyjava.dll +-Windows-x86_64_SNAPPY_FLAGS := +- ++Linux_CXX := g++ ++Linux_STRIP := strip ++Linux_CXXFLAGS := -I$(JAVA_HOME)/include $(CXXFLAGS) -fPIC -fvisibility=hidden ++Linux_LINKFLAGS := -shared -static-libgcc -static-libstdc++ ++Linux_LIBNAME := libsnappyjava.so ++Linux_SNAPPY_FLAGS := + + CXX := $($(os_arch)_CXX) + STRIP := $($(os_arch)_STRIP) +diff -Nru snappy-java-1.1.2/Makefile.package snappy-java-1.1.2.build/Makefile.package +--- snappy-java-1.1.2/Makefile.package 2015-09-22 22:32:13.000000000 +0200 ++++ snappy-java-1.1.2.build/Makefile.package 2016-01-07 16:22:19.242067387 +0100 +@@ -77,6 +77,6 @@ + ssh $(AMD_SERVER) "source .zprofile && cd $(WORK) && $(TEST_CMD)" + + release: +- mvn deploy -DperformRelease=true ++ #mvn deploy -DperformRelease=true + + diff --git a/SOURCES/snappy-java-1.1.2.4-lsnappy.patch b/SOURCES/snappy-java-1.1.2.4-lsnappy.patch new file mode 100644 index 0000000..e93213c --- /dev/null +++ b/SOURCES/snappy-java-1.1.2.4-lsnappy.patch @@ -0,0 +1,12 @@ +diff -Nru snappy-java-1.1.2.4/Makefile.common snappy-java-1.1.2.4.lsnappy/Makefile.common +--- snappy-java-1.1.2.4/Makefile.common 2017-02-09 15:23:47.709144160 +0100 ++++ snappy-java-1.1.2.4.lsnappy/Makefile.common 2017-02-09 15:23:20.871663023 +0100 +@@ -81,7 +81,7 @@ + Linux_CXX := g++ + Linux_STRIP := strip + Linux_CXXFLAGS := -I$(JAVA_HOME)/include $(CXXFLAGS) -fPIC -fvisibility=hidden +-Linux_LINKFLAGS := -shared -static-libgcc -static-libstdc++ ++Linux_LINKFLAGS := -shared -lsnappy -static-libgcc -static-libstdc++ + Linux_LIBNAME := libsnappyjava.so + Linux_SNAPPY_FLAGS := + diff --git a/SPECS/snappy-java.spec b/SPECS/snappy-java.spec new file mode 100644 index 0000000..30116d2 --- /dev/null +++ b/SPECS/snappy-java.spec @@ -0,0 +1,232 @@ +%{?scl:%scl_package snappy-java} +%{!?scl:%global pkg_name %{name}} + +# empty debuginfo +%global debug_package %nil + +Name: %{?scl_prefix}snappy-java +Version: 1.1.2.4 +Release: 6.2%{?dist} +Summary: Fast compressor/decompresser +License: ASL 2.0 +URL: http://xerial.org/snappy-java/ +Source0: https://github.com/xerial/snappy-java/archive/%{version}.tar.gz +# Not able to build snappy-java jni library with sbt: +# use sbt = 0.13.8 (use scala 2.11.6) available 0.13.1 (use scala 2.10.4) +# Too many missing plugins: +# com.etsy:sbt-checkstyle-plugin:0.4.3 +# com.github.gseitz:sbt-release:1.0.0 +# com.jsuereth:sbt-pgp:1.0.0 +# com.typesafe.sbt:sbt-osgi:0.7.0 +# de.johoop:findbugs4sbt:1.4.0 +# de.johoop:jacoco4sbt:2.1.5 +# org.xerial.sbt:sbt-sonatype:0.5.0 +Source1: http://central.maven.org/maven2/org/xerial/snappy/%{pkg_name}/%{version}/%{pkg_name}-%{version}.pom +Patch0: snappy-java-1.1.2-build.patch +Patch1: snappy-java-1.1.2.4-lsnappy.patch + +BuildRequires: make +BuildRequires: gcc-c++ +BuildRequires: libstdc++-static +BuildRequires: snappy-devel + +BuildRequires: %{?scl_prefix}maven-local +BuildRequires: %{?scl_prefix}mvn(com.sun:tools) +BuildRequires: %{?scl_prefix}mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: %{?scl_prefix}mvn(org.apache.felix:org.osgi.core) +BuildRequires: %{?scl_prefix}mvn(org.apache.maven.plugins:maven-antrun-plugin) + +Requires: snappy + +%description +A Java port of the snappy, a fast compresser/decompresser written in C++. + +%package javadoc +Summary: Javadoc for %{pkg_name} +BuildArch: noarch + +%description javadoc +This package contains the API documentation for %{pkg_name}. + +%prep +%setup -n %{pkg_name}-%{version} -q +# Cleanup +find -name "*.class" -print -delete +find -name "*.jar" -print -delete +rm -r ./*sbt* project + +# Remove prebuilt libraries +find -name "*.jnilib" -print -delete +find -name "*.dll" -print -delete +find -name "*.so" -print -delete +find -name "*.a" -print -delete +find -name "*.h" -print -delete + +%patch0 -p1 +%patch1 -p1 + +cp %{SOURCE1} pom.xml +%pom_change_dep org.osgi: org.apache.felix::1.4.0 +%pom_xpath_remove "pom:dependency[pom:scope = 'test']" + +# Build JNI library +%pom_add_plugin org.apache.maven.plugins:maven-antrun-plugin . ' + + + com.sun + tools + 1.8.0 + + + + + + compile + process-classes + + + + + + + + + + + + run + + +' +# Add OSGi support +%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 . ' +true + + + org.xerial.snappy.SnappyBundleActivator + lazy + ${project.groupId}.${project.artifactId} + ${project.version} + org.osgi.framework,* + + + + + bundle-manifest + process-classes + + manifest + + +' + +%pom_add_plugin org.apache.maven.plugins:maven-compiler-plugin:3.0 . ' + + 1.6 + 1.6 +' + +chmod 644 NOTICE README.md +# Convert from dos to unix line ending +for file in LICENSE NOTICE README.md; do + sed -i.orig 's|\r||g' $file + touch -r $file.orig $file + rm $file.orig +done + +%build + +CXXFLAGS="${CXXFLAGS:-%optflags}" +export CXXFLAGS +# No test deps available: +# org.xerial.java:xerial-core:2.1 +# org.xerial:xerial-core:3.2.3 +# org.scalatest:scalatest_2.11:2.2.0 +# com.novocode:junit-interface:0.10 +%mvn_build -f -- -Dproject.build.sourceEncoding=UTF-8 + +%install +%mvn_install + +%files -f .mfiles +%doc README.md +%license LICENSE NOTICE + +%files javadoc -f .mfiles-javadoc +%license LICENSE NOTICE + +%changelog +* Thu Jun 22 2017 Michael Simacek - 1.1.2.4-6.2 +- Mass rebuild 2017-06-22 + +* Wed Jun 21 2017 Java Maintainers - 1.1.2.4-6.1 +- Automated package import and SCL-ization + +* Mon Feb 13 2017 Michael Simacek - 1.1.2.4-6 +- Let the tooling find the JVM + +* Mon Feb 13 2017 Michael Simacek - 1.1.2.4-5 +- Add BR on make and g++ + +* Fri Feb 10 2017 Pavel Raiskup 1.1.2.4-4 +- fail the build if the nested 'make' fails (rhbz#1421088) + +* Thu Feb 09 2017 gil cattaneo 1.1.2.4-3 +- fix for rhbz#1420790 (link correctly against libsnappy.so) + +* Mon Jun 20 2016 gil cattaneo 1.1.2.4-2 +- add missing build requires + +* Wed Mar 09 2016 Ricardo Arguello - 1.1.2.4-1 +- Update to 1.1.2.4 + +* Wed Mar 09 2016 gil cattaneo - 1.1.2.1-1 +- Update to 1.1.2.1 + +* Mon Sep 21 2015 gil cattaneo - 1.0.5-5 +- update Url and Source0 fields +- minor changes to adapt to current guideline +- introduce license macro + +* Thu Jul 23 2015 Mikolaj Izdebski - 1.0.5-4 +- Build as archful package +- Resolves: rhbz#1245629 + +* Fri Jun 19 2015 Fedora Release Engineering - 1.0.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 1.0.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Apr 3 2014 Ricardo Arguello - 1.0.5-1 +- Update to 1.0.5 +- Use the snappy package instead of a precompiled library + +* Mon Mar 31 2014 Ricardo Arguello - 1.0.4.1-8 +- Switch to XMvn +- Use pom macros + +* Fri Mar 28 2014 Michael Simacek - 1.0.4.1-7 +- Use Requires: java-headless rebuild (#1067528) + +* Sun Aug 04 2013 Fedora Release Engineering - 1.0.4.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Feb 15 2013 Fedora Release Engineering - 1.0.4.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Feb 06 2013 Java SIG - 1.0.4.1-4 +- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild +- Replace maven BuildRequires with maven-local + +* Sat Jul 21 2012 Fedora Release Engineering - 1.0.4.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun Mar 4 2012 Ricardo Arguello - 1.0.4.1-2 +- Cleanup of the spec file + +* Tue Feb 21 2012 Marek Goldmann - 1.0.4.1-1 +- Initial packaging