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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
#!/usr/bin/make -f
# debian/rules for the Debian GNU Libtool package.
# Copyright © 2003, 2004 Scott James Remnant <scott@netsplit.com>
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# In case they are dropped
SERIAL=4441
VERSION=2.5.4
include /usr/share/dpkg/architecture.mk
DEB_CFLAGS_MAINT_PREPEND := -Wall
DPKG_EXPORT_BUILDFLAGS := 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk
# Always use triplet-prefixed tools with gfortran-for-host.
ifeq ($(origin FC),default)
export FC := $(DEB_HOST_GNU_TYPE)-gfortran
endif
export F77 ?= $(FC)
# libltdl needs to conform to policy
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
AM_VERSION=$(shell aclocal --version | sed 's/.* \([0-9]\+\.[0-9]\+\)\(\.[0-9]\+\)\?$$/\1/;q')
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += --build=$(DEB_HOST_GNU_TYPE)
make_check = yes
else
confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
make_check = no
endif
# Takes too long
#ifeq (m68k, $(DEB_HOST_ARCH))
# make_check = no
#endif
%:
dh $@ --without=autoreconf
override_dh_auto_clean:
if [ -f debian/.version~ ]; then mv debian/.version~ .version; fi
[ ! -f Makefile ] || dh_auto_clean
execute_before_dh_auto_configure:
dh_assistant restore-file-on-clean \
aclocal.m4 configure libtoolize.in maint.mk GNUmakefile INSTALL Makefile.in \
build-aux/announce-gen build-aux/compile build-aux/depcomp \
build-aux/do-release-commit-and-tag build-aux/gendocs.sh \
build-aux/gnu-web-doc-update build-aux/gnupload build-aux/install-sh \
build-aux/ltmain.in build-aux/ltmain.sh build-aux/mdate-sh build-aux/missing \
build-aux/test-driver build-aux/texinfo.tex build-aux/update-copyright \
build-aux/useless-if-before-free build-aux/vc-list-files \
doc/gendocs_template doc/libtool.1 doc/libtool.info doc/libtool.info-1 \
doc/libtool.info-2 doc/libtoolize.1 doc/stamp-vti doc/version.texi \
gnulib-tests/Makefile.in gnulib-tests/Makefile.am gnulib-tests/init.sh \
gnulib-tests/test-init.sh gnulib-tests/test-update-copyright.sh \
gnulib-tests/test-vc-list-files-cvs.sh gnulib-tests/test-vc-list-files-git.sh \
libltdl/Makefile.in libltdl/aclocal.m4 libltdl/configure \
m4/00gnulib.m4 m4/gnulib-common.m4 m4/gnulib-comp.m4 m4/zzgnulib.m4 \
tests/testsuite
mv -f .version debian/.version~
# dot files may have been lost in git
echo ${SERIAL} > .serial || true
echo ${VERSION} > .version || true
echo ${VERSION} > .tarball-version || true
sed -i -e "s/\$$scriptversion.*/\$$scriptversion Debian-$(DEB_VERSION)/" libtoolize.in
sed -i -e "s/\$$scriptversion.*/\$$scriptversion Debian-$(DEB_VERSION)/" build-aux/ltmain.in
sed -i -e 's/^VERSION.*/VERSION="@VERSION@ Debian-$(DEB_VERSION)"/' build-aux/ltmain.in
touch README-release
./bootstrap --force --no-git --skip-po --gnulib-srcdir=/usr/share/gnulib/ --copy
override_dh_auto_configure:
CONFIG_SHELL=/bin/bash /bin/bash ./configure \
--prefix=/usr \
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
$(confflags) \
GREP=/bin/grep \
SED=/bin/sed
execute_after_dh_auto_build:
# The system libtool script in Debian must be able to support
# invoking gcc as cc
echo '# ### BEGIN LIBTOOL TAG CONFIG: BINCC' >> libtool
sed -n -e '/^# ### BEGIN LIBTOOL CONFIG/,/^# ### END LIBTOOL CONFIG/p' < libtool \
| grep -B 2 -A 1 -e '^LTCC=' -e '^CC=' \
| sed '/^--/d;s/gcc/cc/g' >> libtool
echo '# ### END LIBTOOL TAG CONFIG: BINCC' >> libtool
echo >> libtool
# The system libtool script in Debian must be able to support
# invoking g++ both by the g++ and c++ names.
sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: CXX$$/,/^# ### END LIBTOOL TAG CONFIG: CXX$$/p' < libtool \
| sed -e 's/CONFIG: CXX/CONFIG: BINCXX/g' \
-e 's/g++/c++/g' >> libtool
echo >> libtool
# Add our BINCC and BINCXX tags
sed -e 's/^\(available_tags\)=\"\(.*\)\"/\1=\"\2 BINCC BINCXX\"/' \
< libtool > libtool.tags
mv libtool.tags libtool
# Don't hardcode gcc path information, and don't use nostdlib
sed -e 's/^\(predep_objects\)=.*/\1=""/' \
-e 's/^\(postdep_objects\)=.*/\1=""/' \
-e 's/^\(compiler_lib_search_path\)=.*/\1=""/' \
-e 's:^\(sys_lib_search_path_spec\)=.*:\1="/lib/ /usr/lib/ /usr/X11R6/lib/ /usr/local/lib/":' \
-e 's/^\(archive_cmds=\".*\) -nostdlib /\1 /' \
-e 's/^\(archive_expsym_cmds=\".*\) -nostdlib /\1 /' \
< libtool > libtool.gcc-indep
mv libtool.gcc-indep libtool
# Make libtool executable again
chmod 755 libtool
cd doc && makeinfo libtool.texi
cd doc && makeinfo --html --no-split libtool.texi
override_dh_auto_test:
ifeq ($(make_check), yes)
dh_auto_test || touch tests-failed
-cat test-suite.log
-cat tests/testsuite.log
@test ! -f tests-failed
endif
execute_after_dh_auto_install-arch:
# The file-prefix-map/debug-prefix-map contain the build path,
# which results in unreproducible builds. Strip these arguments
# out of the manpage.
sed -i -e "s, ....-fdebug.-prefix.-map=.*=\. , ,g" \
-e "s, ....-ffile.-prefix.-map=.*=\. , ,g" \
debian/tmp/usr/share/man/man1/libtool.1
execute_after_dh_install-indep:
# Create symlinks to the one in autotools-dev
rm -f debian/libtool/usr/share/libtool/build-aux/config.guess
ln -s ../../misc/config.guess debian/libtool/usr/share/libtool/build-aux
rm -f debian/libtool/usr/share/libtool/build-aux/config.sub
ln -s ../../misc/config.sub debian/libtool/usr/share/libtool/build-aux
chmod +x debian/libtool/usr/share/libtool/build-aux/ltmain.sh
# Sanitize /usr-merge path builds
( set -e ; for f in \
debian/libtool/usr/bin/libtoolize ; do sed \
-e 's%/usr/bin/grep%/bin/grep%g' \
-e 's%/usr/bin/sed%/bin/sed%g' \
-e 's%/usr/bin/dd%/bin/dd%g' \
-e 's%${CURDIR}%/build/libtool-$(DEB_VERSION_UPSTREAM)%g' \
$$f > debian/tmpff && \
mv debian/tmpff $$f ; \
done )
execute_after_dh_install-arch:
# Sanitize /usr-merge path builds
(set -e ; for f in \
debian/libtool-bin/usr/share/man/man1/libtool.1 \
debian/libtool-bin/usr/bin/libtool ; do sed \
-e 's%/usr/bin/grep%/bin/grep%g' \
-e 's%/usr/bin/sed%/bin/sed%g' \
-e 's%/usr/bin/dd%/bin/dd%g' \
-e 's%${CURDIR}%/build/libtool-$(DEB_VERSION_UPSTREAM)%g' \
$$f > debian/tmpff && \
mv debian/tmpff $$f ; \
done )
execute_before_dh_gencontrol:
echo 'automake=automake (>= ${AM_VERSION})' > debian/libltdl-dev.substvars
override_dh_installdocs:
dh_installdocs -plibtool -plibtool-doc -plibtool-bin -plibltdl7
dh_installdocs -plibltdl-dev --link-doc libltdl7
|