[packages/inchi] new, version 1.0.6
glen
glen at pld-linux.org
Sun Aug 10 14:00:36 CEST 2014
commit 019be732a3bc08522993059bd736557553ca6f82
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Aug 10 14:57:40 2014 +0300
new, version 1.0.6
based on fedora package
8e90f42ced6493aa29c8509e424b21a63fd06839
inchi-rpm.patch | 30 +++++++++++++
inchi.spec | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 164 insertions(+)
---
diff --git a/inchi.spec b/inchi.spec
new file mode 100644
index 0000000..ab02f43
--- /dev/null
+++ b/inchi.spec
@@ -0,0 +1,134 @@
+# Conditional build:
+%bcond_without tests # build without tests
+
+%define inchi_so_ver 1.04.00
+%define url_ver 1.04
+Summary: The IUPAC International Chemical Identifier library
+Name: inchi
+Version: 1.0.4
+Release: 1
+Source0: http://www.inchi-trust.org/fileadmin/user_upload/software/inchi-v%{url_ver}/INCHI-1-API.ZIP
+# Source0-md5: 8447bf108af12fe66eecba41bbc89918
+Source1: http://www.inchi-trust.org/fileadmin/user_upload/software/inchi-v%{url_ver}/INCHI-1-DOC.ZIP
+# Source1-md5: 4b438cc7da7472577307a2063414c973
+Source2: http://www.inchi-trust.org/fileadmin/user_upload/software/inchi-v%{url_ver}/INCHI-1-TEST.ZIP
+# Source2-md5: 8176b5e0e24c6aad78c522265378362e
+Group: Libraries
+Patch0: %{name}-rpm.patch
+License: LGPL v2+
+URL: http://www.inchi-trust.org/?q=node/14
+BuildRequires: dos2unix
+BuildRequires: sed >= 4.0
+BuildRequires: unzip
+Requires: %{name}-libs = %{version}-%{release}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The IUPAC International Chemical Identifier (InChITM) is a
+non-proprietary identifier for chemical substances that can be used in
+printed and electronic data sources thus enabling easier linking of
+diverse data compilations. It was developed under IUPAC Project
+2000-025-1-800 during the period 2000-2004. Details of the project and
+the history of its progress are available from the project web site.
+
+This package contains the command line conversion utility.
+
+%package libs
+Summary: The IUPAC International Chemical Identifier library
+Group: Libraries
+
+%description libs
+The IUPAC International Chemical Identifier (InChITM) is a
+non-proprietary identifier for chemical substances that can be used in
+printed and electronic data sources thus enabling easier linking of
+diverse data compilations. It was developed under IUPAC Project
+2000-025-1-800 during the period 2000-2004. Details of the project and
+the history of its progress are available from the project web site.
+
+%package devel
+Summary: Development headers for the InChI library
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
+
+%description devel
+The inchi-devel package includes the header files and libraries
+necessary for developing programs using the InChI library.
+
+If you are going to develop programs which will use this library you
+should install inchi-devel. You'll also need to have the inchi package
+installed.
+
+%package doc
+Summary: Documentation for the InChI library
+Requires: %{name} = %{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
+
+%description doc
+The inchi-doc package contains user documentation for the InChI
+software and InChI library API reference for developers.
+
+%prep
+%setup -q -n INCHI-1-API -a 1 -a 2
+%patch0 -p1 -b .r
+
+%{__sed} -i -e 's,gcc,$(CC),' INCHI_API/gcc_so_makefile/makefile
+
+rm INCHI_API/gcc_so_makefile/result/{libinchi,inchi}*
+for file in INCHI_API/inchi_dll/inchi_api.h LICENCE readme.txt ; do
+ dos2unix -k $file
+done
+
+cd INCHI-1-TEST/test
+unzip -d reference -qq -a InChI_TestSet-result.zip
+sed -i -e 's,./inchi-1,../../INCHI_API/gcc_so_makefile/result/inchi_main,g' TestSet2InChI.sh
+
+%build
+%{__make} -C INCHI_API/gcc_so_makefile \
+ ISLINUX=1 \
+ CC="%{__cc}" \
+ OPTFLAGS="%{rpmcflags}"
+
+%if %{with tests}
+export LD_LIBRARY_PATH=$(pwd)/INCHI_API/gcc_so_makefile/result/
+cd INCHI-1-TEST/test
+sh ./TestSet2InChI.sh
+for t in InChI_TestSet*.txt; do
+ cmp $t reference/$t
+done
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/inchi}
+install -pm 755 INCHI_API/gcc_so_makefile/result/inchi_main $RPM_BUILD_ROOT%{_bindir}/inchi-1
+install -p INCHI_API/gcc_so_makefile/result/libinchi.so.%{inchi_so_ver} $RPM_BUILD_ROOT%{_libdir}
+ln -s libinchi.so.%{inchi_so_ver} $RPM_BUILD_ROOT%{_libdir}/libinchi.so.1
+ln -s libinchi.so.1 $RPM_BUILD_ROOT%{_libdir}/libinchi.so
+install -pm644 INCHI_API/inchi_dll/inchi_api.h $RPM_BUILD_ROOT%{_includedir}/inchi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/inchi-1
+
+%files libs
+%defattr(644,root,root,755)
+%doc LICENCE readme.txt
+%attr(755,root,root) %{_libdir}/libinchi.so.*.*.*
+%ghost %{_libdir}/libinchi.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/inchi
+%{_libdir}/libinchi.so
+
+%files doc
+%defattr(644,root,root,755)
+%doc INCHI-1-DOC/*
diff --git a/inchi-rpm.patch b/inchi-rpm.patch
new file mode 100644
index 0000000..c727b0d
--- /dev/null
+++ b/inchi-rpm.patch
@@ -0,0 +1,30 @@
+diff -up INCHI-1-API/INCHI_API/gcc_so_makefile/makefile.r INCHI-1-API/INCHI_API/gcc_so_makefile/makefile
+--- INCHI-1-API/INCHI_API/gcc_so_makefile/makefile.r 2011-08-03 15:45:06.000000000 +0200
++++ INCHI-1-API/INCHI_API/gcc_so_makefile/makefile 2014-05-02 01:42:47.322481085 +0200
+@@ -62,7 +62,7 @@ endif
+ ifndef LINKER
+ ifndef windir
+ ifdef ISLINUX
+- LINKER_CWD_PATH = -Wl,-R,""
++ LINKER_CWD_PATH =
+ endif
+ endif
+ LINKER = gcc -s $(LINKER_CWD_PATH)
+@@ -84,7 +84,7 @@ endif
+
+ # === C Compiler Options =======
+ ifndef C_OPTIONS
+- C_OPTIONS = -ansi -O3 -c
++ C_OPTIONS = -ansi $(OPTFLAGS) -c
+ ifndef windir
+ ifdef ISLINUX
+ ifndef C_SO_OPTIONS
+@@ -213,7 +213,7 @@ $(INCHI_LIB_PATHNAME).so$(VERSION): $(IN
+ $(SHARED_LINK) $(SHARED_LINK_PARM) -o \
+ $(INCHI_LIB_PATHNAME).so$(VERSION) \
+ $(INCHI_LIB_OBJS) \
+- -Wl$(LINUX_MAP)$(LINUX_Z_RELRO),-soname,$(INCHI_LIB_NAME).so$(MAIN_VERSION)
++ -Wl$(LINUX_MAP)$(LINUX_Z_RELRO),-soname,$(INCHI_LIB_NAME).so$(MAIN_VERSION) -lm
+ ln -fs $(INCHI_LIB_NAME).so$(VERSION) \
+ $(INCHI_LIB_PATHNAME).so$(MAIN_VERSION)
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/inchi.git/commitdiff/019be732a3bc08522993059bd736557553ca6f82
More information about the pld-cvs-commit
mailing list