[singular] 01/01: rules. pull in stuff from 3-1-5 package + cleanup/fix
felix salfelder
felix-guest at moszumanska.debian.org
Thu May 1 18:05:32 UTC 2014
This is an automated email from the git hooks/post-receive script.
felix-guest pushed a commit to branch master
in repository singular.
commit 18dea18a5f4302f9a245ecaea2936eafbeb0660f
Author: Felix Salfelder <felix at salfelder.org>
Date: Wed Apr 30 14:19:42 2014 +0200
rules. pull in stuff from 3-1-5 package + cleanup/fix
---
debian/rules | 136 +++++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 96 insertions(+), 40 deletions(-)
diff --git a/debian/rules b/debian/rules
index 950a934..c5ed548 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,21 +11,41 @@ CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+DOC_TRUE=
+DOC_FALSE=
+ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
+ DOC_TRUE=\#
+else
+ ENABLE_DOC=--enable-doc
+ DOCDIR=doc
+ DOC_FALSE=\#
+endif
+
CFLAGS += -Wall
CXXFLAGS += -Wall
-DEB_CONFIGURE_EXTRA_FLAGS += --with-apint=gmp --with-gmp=/usr/lib --disable-NTL \
- --with-python \
- --without-MP --enable-gmp=/usr/lib \
- --enable-Singular --enable-factory --enable-libfac \
- --enable-IntegerProgramming --disable-debug \
- --prefix=/usr/lib/singular-$(VERSION) \
+DEB_CONFIGURE_EXTRA_FLAGS += --prefix=/usr/lib/singular-$(VERSION) \
--exec-prefix=/usr/lib/singular-$(VERSION) \
--libdir=/usr/lib \
--includedir=/usr/include --without-lex \
- --without-bison --enable-doc --without-Boost \
+ --with-apint=gmp \
+ --with-gmp=/usr/lib \
+ --with-malloc=system \
+ --with-NTL \
+ --with-python \
+ --without-MP \
+ --without-Boost \
+ --without-flint \
+ --enable-gmp=/usr/lib \
+ --enable-Singular \
+ --enable-factory \
+ --enable-libfac \
+ --enable-IntegerProgramming \
+ --without-bison \
+ --enable-doc \
--with-factory=$(CURDIR)/factory \
- --with-libfac=$(CURDIR)/libfac
+ --with-libfac=$(CURDIR)/libfac \
+ --with-debug
clean:
if [ -f doc/Makefile ] ; then $(MAKE) -C doc clean ; fi
@@ -103,31 +123,49 @@ binary-arch: install
dh_md5sums
dh_builddeb
+ENABLE_DEBUGOUTPUT=--disable-debugoutput
+WITH_DEBUG=--without-debug
+
configure-stamp:
cp -f /usr/share/misc/config.guess config.guess
cp -f /usr/share/misc/config.sub config.sub
- (export CFLAGS="$(CFLAGS) -fPIC" \
+ export CFLAGS="$(CFLAGS) -fPIC" \
CXXFLAGS="$(CXXFLAGS) -fPIC" \
CPPFLAGS="$(CPPFLAGS) -DMAKE_DISTRIBUTION -I../omalloc -I$(CURDIR)/factory" \
LDFLAGS="$(LDFLAGS) -L$(CURDIR)/factory -L$(CURDIR)/libfac -L$(CURDIR)/omalloc" \
enable_NTL=no; \
./configure $(DEB_CONFIGURE_EXTRA_FLAGS); \
- cd factory; ./configure $(DEB_CONFIGURE_EXTRA_FLAGS) \
+ cd factory; ./configure \
+ --prefix=/usr \
--includedir=/usr/include/factory \
--with-Singular=yes \
- )
-
+ --with-NTL=/usr \
+ --without-flint \
+ --with-gmp=/usr \
+ --includedir=/usr/include \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --libdir=/usr/lib \
+ --enable-gmp \
+ --enable-NTL \
+ $(ENABLE_DEBUGOUTPUT); \
+ cd $(CURDIR)/libfac; ./configure \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --libdir=/usr/lib \
+ --with-Singular=yes \
+ $(WITH_DEBUG)
# don't look in system directories first:
- sed -e 's#-I/usr/lib/singular-[0-9.-]*\>#-I'"$(CURDIR)"'#g' \
- -e 's#-I/usr/\(local/\)\?include\( \|$$\)##g' \
- -e 's#-I$${prefix}\( \|$$\)#-I'"$(CURDIR)"' #g' \
- -e 's#-L/usr/local/lib\( \|$$\)##g' \
- -e 's#-L/usr/lib\( \|$$\)##g' \
- -e 's#-L$${libdir}\( \|$$\)##g' \
- -i \
- Makefile omalloc/Makefile kernel/Makefile Singular/Makefile \
- libfac/Makefile factory/GNUmakefile IntegerProgramming/Makefile
+ sed -e 's#-I/usr/lib/singular-[0-9.-]*\>#-I'"$(CURDIR)"'#g' \
+ -e 's#-I/usr/\(local/\)\?include\( \|$$\)##g' \
+ -e 's#-I$${prefix}\( \|$$\)#-I'"$(CURDIR)"' #g' \
+ -e 's#-L/usr/local/lib\( \|$$\)##g' \
+ -e 's#-L/usr/lib\( \|$$\)##g' \
+ -e 's#-L$${libdir}\( \|$$\)##g' \
+ -i Makefile omalloc/Makefile kernel/Makefile Singular/Makefile \
+ libfac/Makefile factory/GNUmakefile IntegerProgramming/Makefile
sed -e 's#-I$$(includedir) ##' -i factory/GNUmakefile
# ncurses or termcap is only needed for the internal readline not available with glibc:
sed -e 's# *-lncurses##' -e 's# *-ltermcap##' \
@@ -151,10 +189,13 @@ build build-arch: build-stamp
EXAMPLE_EXCLUDE=-exclude MP -exclude gfan -exclude normaliz -exclude sing4ti2 -exclude memory -exclude dynlib
build-stamp: configure-stamp
- $(MAKE) LD='$(CXX) $(CXXFLAGS) -fPIC $(LDFLAGS)' LIBSINGULAR_FLAGS='-shared -Wl,-soname,libsingular-$(VERSION).so $(CXXFLAGS) -fPIC $(LDFLAGS) -L../omalloc' LD_DYN_FLAGS2='' DL_LIBSG='' GLIBC_DYN_FIX="-lc"
+ $(MAKE) LD='$(CXX) $(CXXFLAGS) -fPIC $(LDFLAGS)' \
+ LIBSINGULAR_FLAGS='-shared -Wl,-soname,libsingular-$(VERSION).so $(CXXFLAGS) -fPIC $(LDFLAGS) -L../omalloc' \
+ LD_DYN_FLAGS2='' DL_LIBSG='' GLIBC_DYN_FIX="-lc"
# libparse is needed for doc-building ESingular and TSingular not built by "all".
# and the makefile here uses the wrong flags (only CPPFLAGS, not CXXFLAGS)
$(MAKE) -C Singular CPPFLAGS='-I. -I.. $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)' libparse ESingular TSingular
+ touch $@
emacs-stamp: doc-stamp
cd Singular && ln -sf ../kernel/p_*.so .
@@ -174,10 +215,12 @@ doc-stamp: build-stamp
mkdir -p debian/doclddir && ln -sf ../../Singular/libsingular.so debian/doclddir/libsingular-$(VERSION).so
cd Singular && ln -sf ../kernel/p_*.so .
cd debian/doclddir; ln -sf ../../kernel/p_*.so .
- SINGULAR_BIN_DIR=$(CURDIR)/Singular \
- LD_LIBRARY_PATH='$(CURDIR)/debian/doclddir'"$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}}" \
- PATH="$(CURDIR)/Singular:$(CURDIR)/kernel:$(CURDIR)/IntegerProgramming:$$PATH" \
- $(MAKE) \
+ export SINGULAR_BIN_DIR=$(CURDIR)/Singular \
+ SINGULAR_ROOT_DIR=$(CURDIR)/Singular \
+ LD_LIBRARY_PATH='$(CURDIR)/debian/doclddir'"$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}}" \
+ PATH="$(CURDIR)/Singular:$(CURDIR)/kernel:$(CURDIR)/IntegerProgramming:$$PATH" \
+ PBORI_NOSAGE=YES; \
+ $(MAKE) \
DOC2TEX_EXAMPLE_EXCLUSIONS="$(EXAMPLE_EXCLUDE)" \
bindir="$(CURDIR)/Singular" \
SINGULAR='$(CURDIR)/Singular/Singular' \
@@ -192,27 +235,40 @@ install: build-stamp doc-stamp emacs-stamp
dh_prep
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp/ DL_LIBSG='' install-libsingular
$(MAKE) -C Singular DESTDIR=$(CURDIR)/debian/tmp/ DL_LIBSG='' install
- $(MAKE) -C doc \
- bindir="$(CURDIR)/Singular" \
- SINGULAR='$(CURDIR)/Singular/Singular' \
- install_prefix=$(CURDIR)/debian/tmp/usr/share/singular-$(VERSION) \
- install-sharedist
- $(MAKE) -C emacs \
- prefix="$(CURDIR)" \
- examplesdir="$(CURDIR)/doc/examples" \
- SINGULAR='$(CURDIR)/Singular/Singular' \
- install_prefix=$(CURDIR)/debian/tmp/usr/share/singular-$(VERSION) \
- install-sharedist
+ $(DOC_TRUE)$(MAKE) -C doc \
+ $(DOC_TRUE) bindir="$(CURDIR)/Singular" \
+ $(DOC_TRUE) SINGULAR='$(CURDIR)/Singular/Singular' \
+ $(DOC_TRUE) install_prefix=$(CURDIR)/debian/tmp/usr/share/singular-$(VERSION) \
+ $(DOC_TRUE) install-sharedist
+ $(DOC_FALSE)mkdir -p $(CURDIR)/debian/tmp/usr/share/singular-$(VERSION)/info
+ $(DOC_FALSE)mkdir -p $(CURDIR)/debian/tmp/usr/share/singular-$(VERSION)/examples
+ $(DOC_FALSE)mkdir -p $(CURDIR)/debian/tmp/usr/share/singular-$(VERSION)/html
+ $(DOC_FALSE)mkdir -p $(CURDIR)/debian/tmp/usr/share/singular-$(VERSION)/doc
+ $(DOC_FALSE)mkdir -p $(CURDIR)/debian/tmp/usr/share/singular-$(VERSION)/emacs
+ $(DOC_TRUE)$(MAKE) -C emacs \
+ $(DOC_TRUE) prefix="$(CURDIR)" \
+ $(DOC_TRUE) examplesdir="$(CURDIR)/doc/examples" \
+ $(DOC_TRUE) SINGULAR='$(CURDIR)/Singular/Singular' \
+ $(DOC_TRUE) install_prefix=$(CURDIR)/debian/tmp/usr/share/singular-$(VERSION) \
+ $(DOC_TRUE) install-sharedist
# surfex is not included due to missing sources, so do not install wrappers, either:
- rm debian/tmp/usr/lib/singular-$(VERSION)/LIB/surfex.lib
- rm debian/tmp/usr/lib/singular-$(VERSION)/surfex
+ rm -f debian/tmp/usr/lib/singular-$(VERSION)/LIB/surfex.lib
+ rm -f debian/tmp/usr/lib/singular-$(VERSION)/surfex
# move as installed to libdir but searched in bindir:
mv debian/tmp/usr/lib/dbmsr.so debian/tmp/usr/lib/singular-$(VERSION)/
# get rid of AIX specific headers
- rm debian/tmp/usr/include/*limits.h
+ rm -f debian/tmp/usr/include/*limits.h
#don't use them
sed -e 's#mylimits\.h#limits.h#' -i debian/tmp/usr/include/singular/*.h
# remove executeable bits from .gif files:
find debian/tmp -name "*.gif" -exec chmod a-x {} \;
+ # fix later.
+ install -d debian/tmp/usr/include/factory
+ mv debian/tmp/usr/include/templates debian/tmp/usr/include/factory
+ mv debian/tmp/usr/include/cf_gmp.h \
+ debian/tmp/usr/include/factoryconf.h \
+ debian/tmp/usr/include/factory.h \
+ debian/tmp/usr/include/factory
+
.PHONY: build-arch build-indep build install binary-arch binary-indep binary clean
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/singular.git
More information about the debian-science-commits
mailing list