[packages/java-tokyocabinet] - new - added buildenv patch to clean up build environment
qboosh
qboosh at pld-linux.org
Mon Feb 13 22:24:36 CET 2017
commit 903e23ecfe2ae4858cd4d6c0128e111bcc81298b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Feb 13 22:26:13 2017 +0100
- new
- added buildenv patch to clean up build environment
java-tokyocabinet-buildenv.patch | 60 +++++++++++++++++++++++++++++++
java-tokyocabinet.spec | 78 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 138 insertions(+)
---
diff --git a/java-tokyocabinet.spec b/java-tokyocabinet.spec
new file mode 100644
index 0000000..53f1cbc
--- /dev/null
+++ b/java-tokyocabinet.spec
@@ -0,0 +1,78 @@
+%include /usr/lib/rpm/macros.java
+Summary: Java binding for Tokyo Cabinet
+Summary(pl.UTF-8): Wiązania Javy do biblioteki Tokyo Cabinet
+Name: java-tokyocabinet
+Version: 1.24
+Release: 1
+License: LGPL v2.1+
+Group: Libraries/Java
+Source0: http://fallabs.com/tokyocabinet/javapkg/tokyocabinet-java-%{version}.tar.gz
+# Source0-md5: cb7db713865cedf255916691daa522d2
+Patch0: %{name}-buildenv.patch
+URL: http://fallabs.com/tokyocabinet/
+BuildRequires: bzip2-devel
+BuildRequires: jdk >= 1.4
+BuildRequires: jpackage-utils
+BuildRequires: rpm-javaprov
+BuildRequires: rpmbuild(macros) >= 1.300
+BuildRequires: tokyocabinet-devel >= 1.0.3
+BuildRequires: zlib-devel
+Requires: jpackage-utils
+Requires: tokyocabinet-libs >= 1.0.3
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Tokyo Cabinet is a library of routines for managing a database. The
+database is a simple data file containing records, each is a pair of a
+key and a value. Every key and value is serial bytes with variable
+length. Both binary data and character string can be used as a key and
+a value. There is neither concept of data tables nor data types.
+Records are organized in hash table, B+ tree, or fixed-length array.
+
+This package contains Java binding for the library.
+
+%description -l pl.UTF-8
+Tokyo Cabinet to biblioteka procedur do zarządzania bazą danych. Baza
+danych to prosty plik danych zawierający pary klucz-wartość. Każdy
+klucz oraz wartość to szereg bajtów o zmiennej długości. Jako kluczy
+oraz wartości można używać zarówno danych binarnych, jak i łańcuchów
+znaków. Nie ma konceptu tabel danych ani typów danych. Rekordy są
+zorganizowane w tablicy haszującej, B+ drzewie lub tablicy o stałej
+długości.
+
+Ten pakiet zawiera wiązania Javy do biblioteki.
+
+%prep
+%setup -q -n tokyocabinet-java-%{version}
+%patch0 -p1
+
+%build
+export JAVA_HOME="%{java_home}"
+
+%configure
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_javadir}
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_javadir}
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libjtokyocabinet.so
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc doc/*
+%attr(755,root,root) %{_libdir}/libjtokyocabinet.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libjtokyocabinet.so.1
+%{_javadir}/tokyocabinet.jar
diff --git a/java-tokyocabinet-buildenv.patch b/java-tokyocabinet-buildenv.patch
new file mode 100644
index 0000000..62a4c90
--- /dev/null
+++ b/java-tokyocabinet-buildenv.patch
@@ -0,0 +1,60 @@
+--- tokyocabinet-java-1.24/configure.in.orig 2010-09-20 01:11:07.000000000 +0200
++++ tokyocabinet-java-1.24/configure.in 2017-02-13 21:14:42.368911419 +0100
+@@ -23,28 +23,17 @@
+ MYLIBOBJFILES="hdb.o bdb.o bdbcur.o fdb.o tdb.o tdbqry.o adb.o util.o myconf.o"
+
+ # Building flags
+-MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
+-MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -L$HOME/include -L/usr/local/include -DNDEBUG -D_GNU_SOURCE=1"
+-MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"
++MYCFLAGS="$CFLAGS -std=c99 -Wall -fPIC -fsigned-char"
++MYCPPFLAGS="$CPPFLAGS -I. -DNDEBUG -D_GNU_SOURCE=1"
++MYLDFLAGS="$LDFLAGS -L."
+ MYRUNPATH="\$(LIBDIR)"
+ MYLDLIBPATHENV="LD_LIBRARY_PATH"
+
+ # Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH
+ if type pkg-config > /dev/null 2>&1
+ then
+- PATH="$PATH:`pkg-config --variable=bindir tokyocabinet`"
+- LIBRARY_PATH="$LIBRARY_PATH:`pkg-config --variable=libdir tokyocabinet`"
+- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pkg-config --variable=libdir tokyocabinet`"
+ CPATH="$CPATH:`pkg-config --variable=includedir tokyocabinet`"
+- export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH
++ export CPATH
+ fi
+
+ # Messages
+@@ -149,9 +138,8 @@
+ # Checking the version of Tokyo Cabinet with pkg-config
+ if type pkg-config > /dev/null 2>&1 && pkg-config --atleast-version=1.0.3 tokyocabinet
+ then
+- MYCPPOPTS="$MYCPPOPTS -I`pkg-config --variable=includedir tokyocabinet`"
+- MYLDOPTS="$MYLDOPTS -L`pkg-config --variable=libdir tokyocabinet`"
+- MYRUNPATH="$MYRUNPATH:`pkg-config --variable=libdir tokyocabinet`"
++ MYCPPOPTS="$MYCPPOPTS `pkg-config --cflags tokyocabinet`"
++ MYLDOPTS="$MYLDOPTS `pkg-config --libs tokyocabinet`"
+ fi
+
+ # Shared libraries
+--- tokyocabinet-java-1.24/Makefile.in.orig 2017-02-13 21:14:52.178911309 +0100
++++ tokyocabinet-java-1.24/Makefile.in 2017-02-13 21:14:55.678911266 +0100
+@@ -43,8 +43,8 @@
+ CFLAGS = @MYCFLAGS@
+ LDFLAGS = @MYLDFLAGS@
+ LIBS = @LIBS@
+-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@:.
+-RUNENV = @MYLDLIBPATHENV@=.:/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@
++LDENV = LD_RUN_PATH=.
++RUNENV = @MYLDLIBPATHENV@=.
+
+
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/java-tokyocabinet.git/commitdiff/903e23ecfe2ae4858cd4d6c0128e111bcc81298b
More information about the pld-cvs-commit
mailing list