[med-svn] [Git][med-team/trnascan-se][master] Overhaul packaging for new build system
Afif Elghraoui
gitlab at salsa.debian.org
Sat Feb 24 23:22:00 UTC 2018
Afif Elghraoui pushed to branch master at Debian Med / trnascan-se
Commits:
eaa5f2e0 by Afif Elghraoui at 2018-02-24T18:21:15-05:00
Overhaul packaging for new build system
Things are much simpler now due to the use of autotools.
- - - - -
11 changed files:
- debian/docs
- − debian/patches/cflags.patch
- − debian/patches/install-location.patch
- − debian/patches/ldflags.patch
- − debian/patches/manpage-errors.patch
- − debian/patches/perl5dir.patch
- + debian/patches/pkg-data.patch
- debian/patches/series
- debian/rules
- debian/trnascan-se-common.install
- debian/trnascan-se.install
Changes:
=====================================
debian/docs
=====================================
--- a/debian/docs
+++ b/debian/docs
@@ -1,2 +1 @@
README
-MANUAL
=====================================
debian/patches/cflags.patch deleted
=====================================
--- a/debian/patches/cflags.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: Append to CFLAGS and don't forcibly set CC
-Author: Afif Elghraoui
-Forwarded: no
-Last-Update: 2015-10-30
---- trnascan-se.orig/Makefile
-+++ trnascan-se/Makefile
-@@ -33,11 +33,8 @@
- ## where you want temporary files stored
- TEMPDIR = /tmp
-
--## your compiler
--CC = gcc # GNU cc (if available) otherwise use vendor's cc
--
- ## any special compiler flags you want
--CFLAGS = -O # ok for most machines (remove -O for DEC OSF/1 cc compiler)
-+CFLAGS += -O # ok for most machines (remove -O for DEC OSF/1 cc compiler)
-
- ## machine specific definitions
- # You shouldn't need any. The specific #define's in squid are historical.
=====================================
debian/patches/install-location.patch deleted
=====================================
--- a/debian/patches/install-location.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: Set install destination directories
-Author: Afif Elghraoui <afif at ghraoui.name>
-Forwarded: not-needed
-Last-Update: 2015-10-30
---- trnascan-se.orig/Makefile
-+++ trnascan-se/Makefile
-@@ -20,9 +20,9 @@
- PERLBIN = perl
-
- ## where you want things installed
--BINDIR = $(HOME)/bin
--LIBDIR = $(HOME)/lib/tRNAscan-SE
--MANDIR = $(HOME)/man
-+BINDIR = $(DESTDIR)/usr/bin
-+LIBDIR = $(DESTDIR)/usr/share/tRNAscan-SE
-+MANDIR = $(DESTDIR)/usr/share/man
-
- ## NOTE !! If you later manually move the location of
- ## binaries or data files in the BINDIR or LIBDIR directories,
=====================================
debian/patches/ldflags.patch deleted
=====================================
--- a/debian/patches/ldflags.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-Description: Honor LDFLAGS in calls to CC
-Author: Afif Elghraoui <afif at ghraoui.name>
-Forwarded: no
-Last-Update: 2015-10-30
---- trnascan-se.orig/Makefile
-+++ trnascan-se/Makefile
-@@ -107,17 +107,17 @@
- all: $(PROGS) tRNAscan-SE setpaths
-
- covels-SE: $(OBJ) scan_main.o
-- $(CC) $(CFLAGS) $(RFLAGS) -o covels-SE scan_main.o $(OBJ) $(LIBS)
-+ $(CC) $(CFLAGS) $(RFLAGS) -o covels-SE scan_main.o $(OBJ) $(LIBS) $(LDFLAGS)
-
- coves-SE: $(OBJ) score_main.o
-- $(CC) $(CFLAGS) $(RFLAGS) -o coves-SE score_main.o $(OBJ) $(LIBS)
-+ $(CC) $(CFLAGS) $(RFLAGS) -o coves-SE score_main.o $(OBJ) $(LIBS) $(LDFLAGS)
-
- eufindtRNA: $(SQUIDOBJ) pavesi.o eufind_main.o
- $(CC) $(CFLAGS) -o eufindtRNA eufind_main.o \
-- pavesi.o $(SQUIDOBJ) $(LIBS)
-+ pavesi.o $(SQUIDOBJ) $(LIBS) $(LDFLAGS)
-
- trnascan-1.4: trnascan.o
-- $(CC) $(CFLAGS) -DTSCANDIR=\"$(LIBDIR)\" -o trnascan-1.4 trnascan.c
-+ $(CC) $(CFLAGS) -DTSCANDIR=\"$(LIBDIR)\" -o trnascan-1.4 trnascan.c $(LDFLAGS)
-
- tRNAscan-SE:
- $(PERLDIR)/$(PERLBIN) checkversion.pl
-@@ -199,12 +199,12 @@
- noambig: trnascan-1.4-NA eufindtRNA-NA
-
- trnascan-1.4-NA: trnascan.o
-- $(CC) $(CFLAGS) -DNO_AMBIG -DTSCANDIR=\"$(LIBDIR)\" -o trnascan-1.4-NA trnascan.c
-+ $(CC) $(CFLAGS) -DNO_AMBIG -DTSCANDIR=\"$(LIBDIR)\" -o trnascan-1.4-NA trnascan.c $(LDFLAGS)
-
- eufindtRNA-NA: $(SQUIDOBJ) eufind_main.o
-- $(CC) $(CFLAGS) -DNO_AMBIG -c -o pavesi-NA.o pavesi.c
-+ $(CC) $(CFLAGS) -DNO_AMBIG -c -o pavesi-NA.o pavesi.c $(LDFLAGS)
- $(CC) $(CFLAGS) -o eufindtRNA-NA eufind_main.o \
-- pavesi-NA.o $(SQUIDOBJ) $(LIBS)
-+ pavesi-NA.o $(SQUIDOBJ) $(LIBS) $(LDFLAGS)
-
-
- clean:
-@@ -219,7 +219,7 @@
- rmdir -ps $(MANDIR)
-
- .c.o:
-- $(CC) $(CFLAGS) $(MDEFS) -c $<
-+ $(CC) $(CFLAGS) $(MDEFS) -c $< $(LDFLAGS)
-
- ## programs from Sean Eddy's sequence i/o function library not
- ## needed for tRNAscan-SE but included for their utility
-@@ -232,16 +232,16 @@
- cp $(UTILS) $(BINDIR)/.
-
- reformat: $(SQUIDOBJ) reformat_main.o
-- $(CC) $(CFLAGS) $(MDEFS) -o reformat $(SQUIDOBJ) reformat_main.o $(LIBS)
-+ $(CC) $(CFLAGS) $(MDEFS) -o reformat $(SQUIDOBJ) reformat_main.o $(LIBS) $(LDFLAGS)
-
- revcomp: $(SQUIDOBJ) revcomp_main.o
-- $(CC) $(CFLAGS) $(MDEFS) -o revcomp $(SQUIDOBJ) revcomp_main.o $(LIBS)
-+ $(CC) $(CFLAGS) $(MDEFS) -o revcomp $(SQUIDOBJ) revcomp_main.o $(LIBS) $(LDFLAGS)
-
- seqstat: $(SQUIDOBJ) seqstat_main.o
-- $(CC) $(CFLAGS) $(MDEFS) -o seqstat $(SQUIDOBJ) seqstat_main.o $(LIBS)
-+ $(CC) $(CFLAGS) $(MDEFS) -o seqstat $(SQUIDOBJ) seqstat_main.o $(LIBS) $(LDFLAGS)
-
- shuffle: $(SQUIDOBJ) shuffle_main.o
-- $(CC) $(CFLAGS) $(MDEFS) -o shuffle $(SQUIDOBJ) shuffle_main.o $(LIBS)
-+ $(CC) $(CFLAGS) $(MDEFS) -o shuffle $(SQUIDOBJ) shuffle_main.o $(LIBS) $(LDFLAGS)
-
- ## other programs in Cove package (below) not needed for
- ## tRNAscan-SE, but are included for users who wish to apply
-@@ -254,25 +254,25 @@
- cp $(COVE_SUITE) $(BINDIR)/.
-
- covea: $(OBJ) align_main.o
-- $(CC) $(CFLAGS) $(RFLAGS) -o covea align_main.o $(OBJ) $(LIBS)
-+ $(CC) $(CFLAGS) $(RFLAGS) -o covea align_main.o $(OBJ) $(LIBS) $(LDFLAGS)
-
- coveb: $(OBJ) build_main.o
-- $(CC) $(CFLAGS) $(RFLAGS) -o coveb build_main.o $(OBJ) $(LIBS)
-+ $(CC) $(CFLAGS) $(RFLAGS) -o coveb build_main.o $(OBJ) $(LIBS) $(LDFLAGS)
-
- covee: $(OBJ) emit_main.o
-- $(CC) $(CFLAGS) $(RFLAGS) -o covee emit_main.o $(OBJ) $(LIBS)
-+ $(CC) $(CFLAGS) $(RFLAGS) -o covee emit_main.o $(OBJ) $(LIBS) $(LDFLAGS)
-
- covet: $(OBJ) train_main.o
-- $(CC) $(CFLAGS) $(RFLAGS) -o covet train_main.o $(OBJ) $(LIBS)
-+ $(CC) $(CFLAGS) $(RFLAGS) -o covet train_main.o $(OBJ) $(LIBS) $(LDFLAGS)
-
- covels: $(OBJ) scan_main.o
-- $(CC) $(CFLAGS) $(RFLAGS) -o covels scan_main.o $(OBJ) $(LIBS)
-+ $(CC) $(CFLAGS) $(RFLAGS) -o covels scan_main.o $(OBJ) $(LIBS) $(LDFLAGS)
-
- coves: $(OBJ) score_main.o
-- $(CC) $(CFLAGS) $(RFLAGS) -o coves score_main.o $(OBJ) $(LIBS)
-+ $(CC) $(CFLAGS) $(RFLAGS) -o coves score_main.o $(OBJ) $(LIBS) $(LDFLAGS)
-
- structcheck: $(OBJ) structcheck_main.o
-- $(CC) $(CFLAGS) $(RFLAGS) -o structcheck structcheck_main.o $(OBJ) $(LIBS)
-+ $(CC) $(CFLAGS) $(RFLAGS) -o structcheck structcheck_main.o $(OBJ) $(LIBS) $(LDFLAGS)
-
-
- ## Maspar memory limits
=====================================
debian/patches/manpage-errors.patch deleted
=====================================
--- a/debian/patches/manpage-errors.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Description: Fix warnings regarding tRNAscan-SE manpage
- Fix the "bad whatis entry" and "manpage has errors from man"
- lintian warnings. The latter was caused by quoted string at the beginning
- of the line that man apparently tried to interpret as a macro. That string
- was moved so that it wasn't at the beginning of the line anymore.
-Author: Afif Elghraoui <afif at ghraoui.name>
-Forwarded: no
-Last-Update: 2015-10-30
---- trnascan-se.orig/tRNAscan-SE.man
-+++ trnascan-se/tRNAscan-SE.man
-@@ -1,11 +1,7 @@
- .TH "tRNAscan-SE" 1 "November 1997" "tRNAscan-SE 1.1"
-
- .SH NAME
--.TP
--.I tRNAscan-SE
--
--- a program for improved detection of transfer RNA genes
--in genomic sequence
-+tRNAscan-SE \- improved detection of transfer RNA genes in genomic sequence
- .SH SYNOPSIS
- .B tRNAscan-SE [options] seqfile(s)
- .SH DESCRIPTION
-@@ -308,8 +304,8 @@
- translation table that is specified at the end of the tRNAscan-SE.src
- source file. This option allows the user to specify exceptions to the
- default translation table. The user may use any one of several
--alternate translation code files included in this package (see files
--'gcode.*'), or create a new alternate translation file. See Manual
-+alternate translation code files included in this package (see
-+files 'gcode.*'), or create a new alternate translation file. See Manual
- documentation for specification of file format, or refer to included
- examples files.
- .sp 1
=====================================
debian/patches/perl5dir.patch deleted
=====================================
--- a/debian/patches/perl5dir.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Description: install perl modules where they belong
-Author: Afif Elghraoui <afif at ghraoui.name>
-Forwarded: no
-Last-Update: 2015-10-30
---- trnascan-se.orig/Makefile
-+++ trnascan-se/Makefile
-@@ -23,6 +23,7 @@
- BINDIR = $(DESTDIR)/usr/bin
- LIBDIR = $(DESTDIR)/usr/share/tRNAscan-SE
- MANDIR = $(DESTDIR)/usr/share/man
-+PERL5DIR = $(DESTDIR)/usr/share/perl5
-
- ## NOTE !! If you later manually move the location of
- ## binaries or data files in the BINDIR or LIBDIR directories,
-@@ -158,17 +159,18 @@
- @echo "be sure to make the following changes:"
- @echo ""
- @echo "1) Add $(BINDIR) to your PATH variable"
-- @echo "2) Add $(BINDIR) to your PERl5LIB variable"
-+ @echo "2) Add $(PERL5DIR) to your PERl5LIB variable"
- @echo "3) Add $(MANDIR) to your MANPATH variable"
- @echo ""
-
- install: $(PROGS) tRNAscanSE
- @if test -d $(BINDIR); then echo .; else mkdir -p $(BINDIR); fi
- @if test -d $(LIBDIR); then echo .; else mkdir -p $(LIBDIR); fi
-+ @if test -d $(PERL5DIR); then echo .; else mkdir -p $(PERL5DIR); fi
- @if test -d $(TEMPDIR); then echo .; else mkdir -p $(TEMPDIR); fi
- @if test -d $(MANDIR)/man$(MANSUFFIX); then echo .; else mkdir -p $(MANDIR)/man$(MANSUFFIX); fi
- cp $(PROGS) tRNAscan-SE $(BINDIR)/.
-- cp -R tRNAscanSE $(BINDIR)/
-+ cp -R tRNAscanSE $(PERL5DIR)/
- cp TPCsignal Dsignal *.cm gcode.* $(LIBDIR)/.
- @if test -r trnascan-1.4-NA; then cp trnascan-1.4-NA $(BINDIR)/.; fi
- @if test -r eufindtRNA-NA; then cp eufindtRNA-NA $(BINDIR)/.; fi
=====================================
debian/patches/pkg-data.patch
=====================================
--- /dev/null
+++ b/debian/patches/pkg-data.patch
@@ -0,0 +1,47 @@
+Description: use pkgdatadir and DESTDIR in install-data-hook
+ omitting DESTDIR causes build problems, and pkgdatadir is more appropriate
+ than libdir for these file types.
+Author: Afif Elghraoui <afif at debian.org>
+Forwarded: no
+Last-Update: 2018-02-24
+--- trnascan-se.orig/Makefile.am
++++ trnascan-se/Makefile.am
+@@ -23,7 +23,7 @@
+ bin_PROGRAMS = bin/eufindtRNA bin/trnascan-1.4 bin/covels-SE bin/coves-SE
+ bin_eufindtRNA_SOURCES = $(SQUIDHDRS) $(SQUIDSRC) $(EUFIND)
+ bin_trnascan_1_4_SOURCES = src/trnascan.c
+-bin_trnascan_1_4_CFLAGS = -DTSCANDIR=\"$(libdir)\/tRNAscan-SE\/models\" $(AM_CFLAGS)
++bin_trnascan_1_4_CFLAGS = -DTSCANDIR=\"$(pkgdatadir)\/tRNAscan-SE\/models\" $(AM_CFLAGS)
+ bin_covels_SE_SOURCES = $(COVESRC) src/scan_main.c
+ bin_coves_SE_SOURCES = $(COVESRC) src/score_main.c
+
+@@ -32,7 +32,7 @@
+ dist_bin_SCRIPTS = bin/sstofa bin/fasta2gsi bin/EukHighConfidenceFilter tRNAscan-SE tRNAscan-SE.conf
+ # for a few files, need to substitute perl path, bin directory, and lib directory
+ # first, define a function for it
+-do_subst = sed -e 's,\@bindir\@,$(bindir),g' -e 's,\@libdir\@,$(libdir),g' -e 's,[@]PERL[@],$(PERL),g' -e 's,\@INFERNAL\@,$(INFERNAL),g'
++do_subst = sed -e 's,\@bindir\@,$(bindir),g' -e 's,\@pkgdatadir\@,$(pkgdatadir),g' -e 's,[@]PERL[@],$(PERL),g' -e 's,\@INFERNAL\@,$(INFERNAL),g'
+
+ # extra steps for cleaning/distribution
+ CLEANFILES = $(dist_bin_SCRIPTS) $(srcdir)/lib/*
+@@ -61,16 +61,8 @@
+ $(do_subst) < $(srcdir)/EukHighConfidenceFilter.in > bin/EukHighConfidenceFilter
+ chmod +x bin/EukHighConfidenceFilter
+
+-# copy libraries. We don't have "libraries" in the libgmp.so.4 kind, but we do have data libraries, so we don't have to deal with lib_LTLIBRARIES.
++# copy data libraries
+ install-data-hook:
+- chmod u+w $(exec_prefix)
+- test -d $(libdir) || mkdir $(libdir)
+- chmod u+w $(libdir)
+- test -d $(libdir)/tRNAscan-SE || mkdir $(libdir)/tRNAscan-SE
+- cp -rf $(srcdir)/lib/* $(libdir)/tRNAscan-SE
+-
+-# remove lib/ files during uninstallation. A bit of a hack, since lib files are write-protected by default. Files
+-uninstall-hook:
+- chmod -R u+w $(libdir)/tRNAscan-SE
+- rm -rf $(libdir)/tRNAscan-SE
+-
++ test -d $(DESTDIR)/$(pkgdatadir) || mkdir -p $(DESTDIR)/$(pkgdatadir)
++ chmod u+w $(DESTDIR)/$(pkgdatadir)
++ cp -rf $(srcdir)/lib/* $(DESTDIR)/$(pkgdatadir)
=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1 @@
-install-location.patch
-perl5dir.patch
-cflags.patch
-ldflags.patch
-manpage-errors.patch
+pkg-data.patch
=====================================
debian/rules
=====================================
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,4 @@
#!/usr/bin/make -f
-CFLAGS := $(CPPFLAGS) $(CFLAGS)
-
%:
dh $@
=====================================
debian/trnascan-se-common.install
=====================================
--- a/debian/trnascan-se-common.install
+++ b/debian/trnascan-se-common.install
@@ -1,2 +1 @@
-debian/tmp/usr/share/tRNAscan-SE usr/share
-debian/tmp/usr/share/perl5 usr/share
+usr/share/trnascan-se
=====================================
debian/trnascan-se.install
=====================================
--- a/debian/trnascan-se.install
+++ b/debian/trnascan-se.install
@@ -1,2 +1 @@
-debian/tmp/usr/bin usr
-debian/tmp/usr/share/man usr/share
+usr/bin
View it on GitLab: https://salsa.debian.org/med-team/trnascan-se/commit/eaa5f2e0fb830c636cff61b66836ccf4d5dfd07d
---
View it on GitLab: https://salsa.debian.org/med-team/trnascan-se/commit/eaa5f2e0fb830c636cff61b66836ccf4d5dfd07d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-med-commit/attachments/20180224/5bbf802d/attachment-0001.html>
More information about the debian-med-commit
mailing list