Commit d69e17bb authored by Filippo Rusconi's avatar Filippo Rusconi

Fix problem with link command line for msSingleScan binary. Add that binary to...

Fix problem with link command line for msSingleScan binary. Add that binary to a new binary -tools package.
parent 99a4653f
libmstoolkit (82-4) unstable; urgency=medium
* Fix the problem with linking MSSingleScan binary. And add it to the
shipped material by creating a new binary package, libmstoolkit-tools.
-- Filippo Rusconi <lopippo@debian.org> Thu, 01 Mar 2018 17:34:08 +0100
libmstoolkit (82-3) unstable; urgency=medium
* Fix the dpkg-gensymbols command line to produce a correct symbols file.
......
Source: libmstoolkit
Section: libs
Priority: optional
Maintainer: The Debichem Group <debichem-devel@lists.alioth.debian.org>
Uploaders: Filippo Rusconi <lopippo@debian.org>
......@@ -9,7 +10,6 @@ Build-Depends: debhelper (>= 11),
libexpat1-dev (>= 2.1.0),
docbook-to-man
Standards-Version: 4.1.3
Section: libs
Homepage: https://github.com/mhoopmann/mstoolkit
Vcs-Git: https://anonscm.debian.org/git/debichem/packages/libmstoolkit.git
Vcs-Browser: https://anonscm.debian.org/git/debichem/packages/libmstoolkit.git
......@@ -46,6 +46,7 @@ Description: libraries for manipulating mass spectrometry data - dev files
Package: libmstoolkit82
Architecture: any
Section: libs
Depends: ${shlibs:Depends},
${misc:Depends}
Conflicts: libmstoolkit77
......@@ -74,3 +75,30 @@ Description: libraries for manipulating mass spectrometry data - runtime
- libmstoolkit;
- libmstoolkitlite;
Package: libmstoolkit-tools
Section: science
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends}
Description: libraries for manipulating mass spectrometry data - runtime
The MSToolkit is a light-weight C++ library for reading, writing, and
manipulating mass spectrometry data. The MSToolkit is easily linked
to virtually any C++ algorithm for simple, fast file reading and
analysis.
.
Supported File Formats:
-----------------------
- read-only mzML including internal compression (zlib and numpress)
and external compression (.mzML.gz) read-only;
- read-only mzXML including internal compression (zlib) and external
compression (.mzXML.gz)
- read/write mgf, ms1, ms2, bms1, bms2, cms1, cms2
.
Simple Interface:
------------------
- Open any file format from a single function call;
- Store any spectrum in a simple, comprehensive data structure;
- Sequential or random-access file reading.
.
This package ships a MS/MS spectrum loader tool.
usr/share/man/man3/libmstoolkit.3.gz usr/share/man/man1/msSingleScan.1.gz
......@@ -87,7 +87,10 @@ manpage.1: manpage.sgml
<listitem>
<para><application>&dhpackage;-dev</application> development binary package.</para>
</listitem>
</itemizedlist>
<listitem>
<para><application>&dhpackage;-tools</application> tools binary package.</para>
</listitem>
</itemizedlist>
</para>
......@@ -123,6 +126,23 @@ manpage.1: manpage.sgml
</para>
<para>
The <application>&dhpackage;-tools</application>
binary package ships the following file:
<itemizedlist>
<listitem>
<para> msSingleScan shipped in /usr/bin; </para>
</listitem>
</itemizedlist>
DESCRIPTION: Reads an MS/MS spectrum from any MSToolkit supported file type and outputs to screen in MS2 format.
USAGE: MSSingleScan [scan number] [file]
</para>
</refsect1>
<refsect1>
......
Patch to create shared libraries along with static ones.
diff --git a/Makefile b/Makefile
index 8f8f087..d3215df 100644
index 8f8f087..76aa285 100644
--- a/Makefile
+++ b/Makefile
@@ -1,79 +1,67 @@
@@ -1,8 +1,5 @@
#Set your paths here.
-ZLIB_PATH = ./src/zlib-1.2.8
MZPARSER_PATH = ./src/mzParser
......@@ -12,19 +11,14 @@ index 8f8f087..d3215df 100644
MST_PATH = ./src/MSToolkit
HEADER_PATH = ./include
MZPARSER = mzp.MSNumpress.o mzp.mzp_base64.o mzp.BasicSpectrum.o mzp.mzParser.o mzp.RAMPface.o mzp.saxhandler.o mzp.saxmzmlhandler.o \
@@ -11,69 +8,63 @@ MZPARSER = mzp.MSNumpress.o mzp.mzp_base64.o mzp.BasicSpectrum.o mzp.mzParser.o
mzp.saxmzxmlhandler.o mzp.Czran.o mzp.mz5handler.o mzp.mzpMz5Config.o mzp.mzpMz5Structs.o mzp.BasicChromatogram.o mzp.PWIZface.o
+
MZPARSERLITE = mzp.MSNumpress.o mzp.mzp_base64_lite.o mzp.BasicSpectrum_lite.o mzp.mzParser_lite.o mzp.RAMPface_lite.o mzp.saxhandler_lite.o mzp.saxmzmlhandler_lite.o \
mzp.saxmzxmlhandler_lite.o mzp.Czran_lite.o mzp.mz5handler_lite.o mzp.mzpMz5Config_lite.o mzp.mzpMz5Structs_lite.o mzp.BasicChromatogram_lite.o mzp.PWIZface_lite.o
-EXPAT = xmlparse.o xmlrole.o xmltok.o
-ZLIB = adler32.o compress.o crc32.o deflate.o inffast.o inflate.o infback.o inftrees.o trees.o uncompr.o zutil.o
+
MSTOOLKIT = Spectrum.o MSObject.o mzMLWriter.o pepXMLWriter.o
+
READER = MSReader.o
+
READERLITE = MSReaderLite.o
-SQLITE = sqlite3.o
......@@ -34,7 +28,9 @@ index 8f8f087..d3215df 100644
-CFLAGS = -O3 -static -I. -I$(HEADER_PATH) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H
-LIBS = -lm -lpthread -ldl
-
+SOVER = 82
+RELVER = $(SOVER).0.0
-all: $(ZLIB) $(MZPARSER) $(MZPARSERLITE) $(MSTOOLKIT) $(READER) $(READERLITE) $(EXPAT) $(SQLITE)
- ar rcs libmstoolkitlite.a $(ZLIB) $(EXPAT) $(MZPARSERLITE) $(MSTOOLKIT) $(READERLITE)
- ar rcs libmstoolkit.a $(ZLIB) $(EXPAT) $(MZPARSER) $(MSTOOLKIT) $(READER) $(SQLITE)
......@@ -48,64 +44,70 @@ index 8f8f087..d3215df 100644
-
-clean:
- rm -f *.o libmstoolkitlite.a libmstoolkit.a msSingleScan
+SOVER = 82
+RELVER = $(SOVER).0.0
-
-# zLib objects
+LIBS = -lm -lpthread -ldl -lz -lsqlite3 -lexpat
+LIB_PATH := -L./
-
-adler32.o : $(ZLIB_PATH)/adler32.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/adler32.c -c
+CLEAN_LIBS = libmstoolkitlite.a libmstoolkitlite.so libmstoolkitlite.so.$(SOVER)* libmstoolkit.a libmstoolkit.so libmstoolkit.so.$(SOVER)*
+AR_CFLAGS = -O3 -static -g -I. -I$(HEADER_PATH) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H
+SO_CFLAGS = -O3 -shared -fPIC -g -I. -I$(HEADER_PATH) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H
-compress.o : $(ZLIB_PATH)/compress.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/compress.c -c
+# Original version
+# CFLAGS = -O3 -static -I. -I$(HEADER_PATH) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H
+LIBS = -lm -lpthread -ldl -lz -lsqlite3 -lexpat
-crc32.o : $(ZLIB_PATH)/crc32.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/crc32.c -c
+.PHONY: objects
+objects: $(MZPARSER) $(MZPARSERLITE) $(MSTOOLKIT) $(READER) $(READERLITE)
+CLEAN_LIBS = libmstoolkitlite.a libmstoolkitlite.so libmstoolkitlite.so.$(SOVER)* libmstoolkit.a libmstoolkit.so libmstoolkit.so.$(SOVER)*
-deflate.o : $(ZLIB_PATH)/deflate.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/deflate.c -c
+arlib: CFLAGS += -O3 -static -I. -I$(HEADER_PATH) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H
+arlib: clean_objects objects
+all:
+ make arlib
+ make solib
-inffast.o : $(ZLIB_PATH)/inffast.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/inffast.c -c
+ ar rcs libmstoolkitlite.a $(MZPARSERLITE) $(MSTOOLKIT) $(READERLITE)
+ ar rcs libmstoolkit.a $(MZPARSER) $(MSTOOLKIT) $(READER)
+.PHONY: objects
+objects: $(MZPARSER) $(MZPARSERLITE) $(MSTOOLKIT) $(READER) $(READERLITE)
-inflate.o : $(ZLIB_PATH)/inflate.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/inflate.c -c
+solib: CFLAGS += -shared -fPIC -g -I. -I$(HEADER_PATH) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H
+solib: clean_objects objects
+arlib: CFLAGS = $(AR_CFLAGS)
+arlib: clean_objects objects
+
+ ar rcs libmstoolkitlite.a $(MZPARSERLITE) $(MSTOOLKIT) $(READERLITE)
+ ar rcs libmstoolkit.a $(MZPARSER) $(MSTOOLKIT) $(READER)
+# $(CC) $(CFLAGS) MSTDemo.cpp -L. -lmstoolkitlite -o MSTDemo
+# $(CC) $(CFLAGS) -I./include MSSingleScan/MSSingleScan.cpp -L. -lmstoolkitlite -o msSingleScan.static
+# $(CC) $(CFLAGS) MSConvertFile.cpp -L. -lmstoolkitlite -o MSConvertFile
-infback.o : $(ZLIB_PATH)/infback.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/infback.c -c
+ $(CC) $(CFLAGS) -o libmstoolkitlite.so.$(RELVER) -Wl,-z,relro -Wl,-soname,libmstoolkitlite.so.$(SOVER) $(MZPARSERLITE) $(MSTOOLKIT) $(READERLITE) $(LIB_PATH) $(LIBS)
+ ln -sf libmstoolkitlite.so.$(RELVER) libmstoolkitlite.so.$(SOVER)
+ ln -sf libmstoolkitlite.so.$(SOVER) libmstoolkitlite.so
-inftrees.o : $(ZLIB_PATH)/inftrees.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/inftrees.c -c
+ $(CC) $(CFLAGS) -o libmstoolkit.so.$(RELVER) -Wl,-z,relro -Wl,-soname,libmstoolkit.so.$(SOVER) $(MZPARSER) $(MSTOOLKIT) $(READER) $(LIB_PATH) $(LIBS)
+solib: CFLAGS = $(SO_CFLAGS)
+solib: clean_objects objects
+
+ $(CC) $(CFLAGS) -o libmstoolkitlite.so.$(RELVER) -Wl,-z,relro -Wl,-soname,libmstoolkitlite.so.$(SOVER) $(LIBS) $(MZPARSERLITE) $(MSTOOLKIT) $(READERLITE)
+ ln -sf libmstoolkitlite.so.$(RELVER) libmstoolkitlite.so.$(SOVER)
+ ln -sf libmstoolkitlite.so.$(SOVER) libmstoolkitlite.so
+
+ $(CC) $(CFLAGS) -o libmstoolkit.so.$(RELVER) -Wl,-z,relro -Wl,-soname,libmstoolkit.so.$(SOVER) $(LIBS) $(MZPARSER) $(MSTOOLKIT) $(READER)
+ ln -sf libmstoolkit.so.$(RELVER) libmstoolkit.so.$(SOVER)
+ ln -sf libmstoolkit.so.$(SOVER) libmstoolkit.so
+
+ # Be careful not to include in the linker command line below the compilation -shared -fPIC flags!
+ $(CC) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H -I./include $(LIBS) -L. -lmstoolkitlite MSSingleScan/MSSingleScan.cpp -o msSingleScan
-trees.o : $(ZLIB_PATH)/trees.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/trees.c -c
+all: CFLAGS += -shared -fPIC -g -I. -I$(HEADER_PATH) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H
+all: solib
+ $(CC) $(CFLAGS) -I. -I./include MSSingleScan/MSSingleScan.cpp -L. -lmstoolkitlite -o msSingleScan
-uncompr.o : $(ZLIB_PATH)/uncompr.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/uncompr.c -c
+clean_objects:
+ rm -f *.o msSingleScan
+ rm -f *.o msSingleScan.*
-zutil.o : $(ZLIB_PATH)/zutil.c
- $(GCC) $(CFLAGS) $(ZLIB_PATH)/zutil.c -c
......@@ -116,7 +118,7 @@ index 8f8f087..d3215df 100644
#mzParser objects
@@ -85,23 +73,6 @@ mzp.%_lite.o : $(MZPARSER_PATH)/%.cpp
@@ -85,23 +76,6 @@ mzp.%_lite.o : $(MZPARSER_PATH)/%.cpp
$(CC) $(CFLAGS) $< -c -o $@
......@@ -140,3 +142,10 @@ index 8f8f087..d3215df 100644
#MSToolkit objects
Spectrum.o : $(MST_PATH)/Spectrum.cpp
@@ -123,6 +97,3 @@ pepXMLWriter.o : $(MST_PATH)/pepXMLWriter.cpp
$(CC) $(CFLAGS) $(MST_PATH)/pepXMLWriter.cpp -c
-
-
-
......@@ -30,7 +30,6 @@ manpage:
docbook-to-man debian/libmstoolkit.sgml > debian/libmstoolkit.3
override_dh_auto_build: manpage
make arlib
make all
override_dh_makeshlibs:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment