1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
#!/usr/bin/make -f
# DH_VERBOSE := 1
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
TMPDIR := $(CURDIR)/install_spades
LIBDIR := debian/$(DEBPKGNAME)/usr/lib/spades
mandir := $(CURDIR)/debian/man
debfolder := $(CURDIR)/debian
PREFIX:=/usr
BUILD_DIR:=$(CURDIR)/build_spades
DEB_CMAKE_EXTRA_FLAGS = -DSPADES_BOOST_ROOT=/usr/include
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export LC_ALL = C
%:
dh $@ --with python2 --sourcedirectory=src --buildsystem=cmake
override_dh_clean:
dh_clean -X.orig
override_dh_auto_clean:
dh_auto_clean
rm -rf build_spades
rm -rf install_spades
rm -rf spades_test
find . -name "*.pyc" -delete
rm -rf $(debfolder)/man_src/*.html $(debfolder)/man_src/*.?
rm -rf $(mandir)
override_dh_auto_configure:
echo "Simply use spades_compile.sh in auto_build"
override_dh_auto_build:
PREFIX=$(TMPDIR) ./spades_compile.sh
# Use Debian-packaged yaml module
find $(TMPDIR) \
-type f \
-print0 \
-exec sed -i 's/pyyaml[2|3]/yaml/' {} +
override_dh_installman:
mkdir -p $(mandir)
asciidoctor -a docdate='' -b manpage $(debfolder)/man_src/*.adoc
cp $(debfolder)/man_src/*.? $(mandir)
dh_installman --
override_dh_auto_test:
$(TMPDIR)/bin/spades.py --test
$(TMPDIR)/bin/dipspades.py --test
$(TMPDIR)/bin/metaspades.py --test
$(TMPDIR)/bin/rnaspades.py --test
# Difficult to test truSPAdes before installing because bwa-spades
# is still not in the right place. Let's do this later in an
# autopkgtest.
# $(TMPDIR)/bin/truspades.py --test
override_dh_auto_install:
echo "Nothing to install"
override_dh_install:
dh_install
mkdir -p $(LIBDIR)
mv debian/$(DEBPKGNAME)/usr/bin $(LIBDIR)
mkdir -p debian/$(DEBPKGNAME)/usr/bin
install debian/bin/spades debian/$(DEBPKGNAME)/usr/bin/
chmod +x debian/$(DEBPKGNAME)/usr/bin/spades
rm -f debian/$(DEBPKGNAME)/usr/share/spades/GPLv2.txt
rm -f debian/$(DEBPKGNAME)/usr/share/spades/LICENSE
override_dh_installdocs:
dh_installdocs
override_dh_installchangelogs:
LANG="C" LANGUAGE="en_US:en" LC_ALL=C.UTF-8 lynx -dump changelog.html > changelog
dh_installchangelogs changelog
rm changelog
|