[med-svn] [libfastahack] 02/02: Inject Debian packaging
Andreas Tille
tille at debian.org
Thu Jun 23 09:12:06 UTC 2016
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository libfastahack.
commit a692cd4e66c4db1a83d2f37ff930d57103f36a5e
Author: Andreas Tille <tille at debian.org>
Date: Thu Jun 23 11:10:37 2016 +0200
Inject Debian packaging
---
debian/changelog | 5 ++
debian/compat | 1 +
debian/control | 86 +++++++++++++++++++++++++
debian/copyright | 11 ++++
debian/get-orig-source | 25 ++++++++
debian/patches/autoconf.patch | 143 ++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 24 +++++++
debian/source/format | 1 +
debian/watch | 2 +
10 files changed, 299 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..6e49f0f
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+libfastahack (0.0+20160309-1) UNRELEASED; urgency=medium
+
+ * Initial release (Closes: #<bug>)
+
+ -- Andreas Tille <tille at debian.org> Thu, 23 Jun 2016 09:52:29 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d402ae9
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,86 @@
+Source: libfastahack
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Uploaders: Andreas Tille <tille at debian.org>
+Section: science
+Priority: optional
+Build-Depends: debhelper (>= 9),
+ dh-autoreconf,
+ d-shlibs
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/libfastahack.git
+Vcs-Git: https://anonscm.debian.org/git/debian-med/libfastahack.git
+Homepage: https://github.com/ekg/fastahack
+
+Package: libfastahack0
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends},
+ ${misc:Depends}
+Description: utilities for indexing and sequence extraction from FASTA files (lib)
+ fastahack is a small application for indexing and extracting sequences and
+ subsequences from FASTA files. The included Fasta.cpp library provides a FASTA
+ reader and indexer that can be embedded into applications which would benefit
+ from directly reading subsequences from FASTA files. The library automatically
+ handles index file generation and use.
+ .
+ Features:
+ * FASTA index (.fai) generation for FASTA files
+ * Sequence extraction
+ * Subsequence extraction
+ * Sequence statistics (currently only entropy is provided)
+ .
+ Sequence and subsequence extraction use fseek64 to provide fastest-possible
+ extraction without RAM-intensive file loading operations. This makes fastahack
+ a useful tool for bioinformaticists who need to quickly extract many
+ subsequences from a reference FASTA sequence.
+ .
+ This package contains the dynamic library.
+
+Package: libfastahack-dev
+Architecture: any
+Section: libdevel
+Depends: libfastahack0 (= ${binary:Version}),
+ ${shlibs:Depends},
+ ${misc:Depends}
+Description: utilities for indexing and sequence extraction from FASTA files (devel)
+ fastahack is a small application for indexing and extracting sequences and
+ subsequences from FASTA files. The included Fasta.cpp library provides a FASTA
+ reader and indexer that can be embedded into applications which would benefit
+ from directly reading subsequences from FASTA files. The library automatically
+ handles index file generation and use.
+ .
+ Features:
+ * FASTA index (.fai) generation for FASTA files
+ * Sequence extraction
+ * Subsequence extraction
+ * Sequence statistics (currently only entropy is provided)
+ .
+ Sequence and subsequence extraction use fseek64 to provide fastest-possible
+ extraction without RAM-intensive file loading operations. This makes fastahack
+ a useful tool for bioinformaticists who need to quickly extract many
+ subsequences from a reference FASTA sequence.
+ .
+ This is the development package containing the statically linked
+ library and the header files.
+
+Package: fastahack
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends}
+Description: utilities for indexing and sequence extraction from FASTA files
+ fastahack is a small application for indexing and extracting sequences and
+ subsequences from FASTA files. The included Fasta.cpp library provides a FASTA
+ reader and indexer that can be embedded into applications which would benefit
+ from directly reading subsequences from FASTA files. The library automatically
+ handles index file generation and use.
+ .
+ Features:
+ * FASTA index (.fai) generation for FASTA files
+ * Sequence extraction
+ * Subsequence extraction
+ * Sequence statistics (currently only entropy is provided)
+ .
+ Sequence and subsequence extraction use fseek64 to provide fastest-possible
+ extraction without RAM-intensive file loading operations. This makes fastahack
+ a useful tool for bioinformaticists who need to quickly extract many
+ subsequences from a reference FASTA sequence.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..552ad2a
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,11 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: <pkg>
+Source: <path_to_download>
+
+Files: *
+Copyright: © 20xx-20yy <upstream>
+License: <license>
+
+Files: debian/*
+Copyright: © 2016 maintainername <maintainer at e.mail>
+License: <license>
diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..a48f374
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+COMPRESS=xz
+
+NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+ORIGNAME=`echo $NAME | sed 's/^lib//'`
+MVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/^\([0-9\.]\+\)[+~][-0-9]\+$/\1/'`
+
+mkdir -p ../tarballs
+cd ../tarballs
+# need to clean up the tarballs dir first because upstream tarball might
+# contain a directory with unpredictable name
+rm -rf *
+git clone --quiet https://github.com/ekg/fastahack
+cd $ORIGNAME
+VERSION=${MVERSION}+`date -d @$(git show --format="%at" | head -n1) +%Y%m%d`
+# for esthetical reasons set file timestamps (if git-restore-mtime is installed)
+git restore-mtime || true
+cd ..
+TARDIR=${NAME}-${VERSION}
+mv ${ORIGNAME} ${TARDIR}
+rm -rf ${TARDIR}/.git
+
+GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESS} "${TARDIR}"
+rm -rf ${TARDIR}
diff --git a/debian/patches/autoconf.patch b/debian/patches/autoconf.patch
new file mode 100644
index 0000000..5045599
--- /dev/null
+++ b/debian/patches/autoconf.patch
@@ -0,0 +1,143 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Wed, 22 Jun 2016 16:27:46 +0200
+Description: Add autoconf stuff to enable simple library creation
+
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,13 @@
++lib_LTLIBRARIES = libfastahack.la
++
++libfastahackdir=$(includedir)/fastahack
++libfastahack_HEADERS=Fasta.h
++libfastahack_la_SOURCES = Fasta.cpp split.cpp disorder.c
++libfastahack_la_LDFLAGS = -version-info @LIB_VERSION@
++
++libfastahack_la_CPPFLAGS = $(INCLUDES)
++
++bin_PROGRAMS = fastahack
++fastahack_SOURCES = FastaHack.cpp
++LDADD = -lfastahack
++
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,61 @@
++# -*- Autoconf -*-
++# Process this file with autoconf to produce a configure script.
++
++AC_INIT(fastahack, 0.0, erik.garrison at bc.edu)
++AC_CONFIG_HEADERS([config.h])
++
++AC_PREREQ(2.57)
++
++# Directory that contains install-sh and other auxiliary files
++AC_CONFIG_AUX_DIR([config])
++
++################################################################################
++# According to (http://www.mail-archive.com/autoconf@gnu.org/msg14232.html)
++# this macro should be after AC_INIT but before AM_INIT_AUTOMAKE
++################################################################################
++AC_CONFIG_MACRO_DIR(config)
++
++AM_INIT_AUTOMAKE([1.6 foreign dist-zip tar-ustar filename-length-max=299])
++
++LIB_VERSION=0:0
++
++AC_SUBST([VERSION])
++AC_SUBST([LIB_VERSION])
++
++AC_SUBST([VERSION])
++
++# Checks for programs.
++AC_PROG_LN_S
++AC_PROG_INSTALL
++AC_PROG_LIBTOOL
++
++################################################################################
++# calling AC_PROG_CXX resets CXXFLAGS, we use our own flags set in the
++# the AX_CXXFLAGS macro below.
++# So we cache the argument to configure
++# here in ARG_CXX_FLAGS (so that our macro does not override them)
++################################################################################
++ARG_CXX_FLAGS="$CXXFLAGS"
++AC_PROG_CXX
++
++#Ranlib handled by check for libtool
++CXXFLAGS="$ARG_CXX_FLAGS"
++AX_CXXFLAGS
++
++AC_SUBST(CXXFLAGS)
++
++CPPFLAGS="-I\$(top_srcdir) $CPPFLAGS"
++# Checks for libraries.
++
++# Checks for header files.
++AC_HEADER_STDC
++AC_CHECK_HEADERS([stdlib.h])
++
++AC_PROG_MAKE_SET
++
++AC_CONFIG_FILES([
++ Makefile
++ libfastahack.pc
++ ])
++AC_OUTPUT
++
+--- /dev/null
++++ b/libfastahack.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include/fastahack
++
++
++Name: libfastahack
++Version: @VERSION@
++Description: utilities for indexing and sequence extraction from FASTA files
++Libs: -L${libdir} -lfastahack
++Cflags: -I${includedir}
+--- a/Makefile
++++ /dev/null
+@@ -1,42 +0,0 @@
+-
+-# Use ?= to allow overriding from the env or command-line
+-CXX ?= g++
+-CXXFLAGS ?= -O3
+-PREFIX ?= ./stage
+-STRIP_CMD ?= strip
+-INSTALL ?= install -c
+-MKDIR ?= mkdir -p
+-
+-# Required flags that we shouldn't override
+-CXXFLAGS += -D_FILE_OFFSET_BITS=64
+-
+-OBJS = Fasta.o FastaHack.o split.o disorder.o
+-
+-all: fastahack
+-
+-fastahack: $(OBJS)
+- $(CXX) $(CXXFLAGS) $(OBJS) -o fastahack
+-
+-FastaHack.o: Fasta.h FastaHack.cpp
+- $(CXX) $(CXXFLAGS) -c FastaHack.cpp
+-
+-Fasta.o: Fasta.h Fasta.cpp
+- $(CXX) $(CXXFLAGS) -c Fasta.cpp
+-
+-split.o: split.h split.cpp
+- $(CXX) $(CXXFLAGS) -c split.cpp
+-
+-disorder.o: disorder.c disorder.h
+- $(CXX) $(CXXFLAGS) -c disorder.c
+-
+-install: fastahack
+- $(MKDIR) $(DESTDIR)$(PREFIX)/bin
+- $(INSTALL) fastahack $(DESTDIR)$(PREFIX)/bin
+-
+-install-strip: install
+- $(STRIP_CMD) $(DESTDIR)$(PREFIX)/bin/fastahack
+-
+-clean:
+- rm -rf fastahack *.o stage
+-
+-.PHONY: clean
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9ac37bf
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+autoconf.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..47fce28
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+# DH_VERBOSE := 1
+
+DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+
+# export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
+
+%:
+ dh $@ --with autoreconf
+
+override_dh_install:
+ dh_install
+ d-shlibmove --commit \
+ --multiarch \
+ --devunversioned \
+ --exclude-la \
+ --movedev debian/tmp/usr/include/* usr/include \
+ --movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
+ debian/tmp/usr/lib/*/$(DEBPKGNAME).so
+
+get-orig-source:
+ . debian/get-orig-source
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..ce144f4
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+# version=3
+# Upstream does not tag releases
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libfastahack.git
More information about the debian-med-commit
mailing list