[singular] 02/03: misc rules

felix salfelder felix-guest at moszumanska.debian.org
Sun May 4 07:23:40 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 a3958cda75cca91e449b212c8b17d6d9cb991217
Author: Felix Salfelder <felix at salfelder.org>
Date:   Sat May 3 17:19:59 2014 +0200

    misc rules
    
    - enable python
    - fix nodoc
    - some cleanup
---
 debian/rules | 80 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/debian/rules b/debian/rules
index c5ed548..436ce0e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,31 +21,37 @@ else
 	DOC_FALSE=\#
 endif
 
+WITH_PYTHON = --with-python
+
 CFLAGS += -Wall
 CXXFLAGS += -Wall
 
 DEB_CONFIGURE_EXTRA_FLAGS += --prefix=/usr/lib/singular-$(VERSION) \
                              --exec-prefix=/usr/lib/singular-$(VERSION) \
                              --libdir=/usr/lib \
-                             --includedir=/usr/include --without-lex \
+                             --includedir=/usr/include \
                              --with-apint=gmp \
+                             --with-factory=$(CURDIR)/factory \
                              --with-gmp=/usr/lib \
+                             --with-libfac=$(CURDIR)/libfac \
                              --with-malloc=system \
                              --with-NTL \
-                             --with-python \
-                             --without-MP \
+                             $(WITH_PYTHON) \
+                             --without-bison \
                              --without-Boost \
                              --without-flint \
-                             --enable-gmp=/usr/lib \
-                             --enable-Singular \
+                             --without-lex \
+                             --without-MP \
+                             $(ENABLE_DOC) \
                              --enable-factory \
-                             --enable-libfac \
+                             --enable-gmp=/usr/lib \
                              --enable-IntegerProgramming \
-                             --without-bison \
-                             --enable-doc \
-                             --with-factory=$(CURDIR)/factory \
-                             --with-libfac=$(CURDIR)/libfac \
-                             --with-debug
+                             --enable-libfac \
+                             --enable-Singular
+
+# BUG (see singular/spkg-install)
+# singular apparently doesnt work without debug
+DEB_CONFIGURE_EXTRA_FLAGS += --with-debug
 
 clean:
 	if [ -f doc/Makefile ] ; then $(MAKE) -C doc clean ; fi
@@ -95,7 +101,7 @@ binary-arch: install
 	ln -sf ../lib/singular-$(VERSION)/Singular debian/singular/usr/bin/
 	ln -sf ../lib/singular-$(VERSION)/TSingular debian/singular/usr/bin/
 	ln -sf ../lib/singular-$(VERSION)/ESingular debian/singular/usr/bin/
-	for dir in info html doc examples emacs ; do \
+	for dir in info html $(DOCDIR) examples emacs ; do \
 		mkdir -p debian/libsingular-$(VERSION)/usr/share/singular-$(VERSION)/$$dir ; \
 		ln -sf /usr/share/singular-$(VERSION)/$$dir \
 			debian/libsingular-$(VERSION)/usr/lib/singular-$(VERSION)/$$dir ; \
@@ -132,8 +138,7 @@ configure-stamp:
 	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; \
+	LDFLAGS="$(LDFLAGS) -L$(CURDIR)/factory -L$(CURDIR)/libfac -L$(CURDIR)/omalloc"; \
 	./configure $(DEB_CONFIGURE_EXTRA_FLAGS); \
 	cd factory; ./configure \
 	            --prefix=/usr \
@@ -142,7 +147,6 @@ configure-stamp:
 	            --with-NTL=/usr \
 	            --without-flint \
 	            --with-gmp=/usr \
-	            --includedir=/usr/include \
 	            --exec-prefix=/usr \
 	            --bindir=/usr/bin \
 	            --libdir=/usr/lib \
@@ -154,7 +158,6 @@ configure-stamp:
 	            --exec-prefix=/usr \
 	            --bindir=/usr/bin \
 	            --libdir=/usr/lib \
-	            --with-Singular=yes \
 	            $(WITH_DEBUG)
 
 	# don't look in system directories first:
@@ -187,6 +190,7 @@ configure-stamp:
 build build-arch: build-stamp
 
 EXAMPLE_EXCLUDE=-exclude MP -exclude gfan -exclude normaliz -exclude sing4ti2 -exclude memory -exclude dynlib
+PYTHON_INCLUDE=-I/usr/include/python2.7
 
 build-stamp: configure-stamp
 	$(MAKE) LD='$(CXX) $(CXXFLAGS) -fPIC $(LDFLAGS)' \
@@ -194,7 +198,7 @@ build-stamp: configure-stamp
 	           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
+	$(MAKE) -C Singular CPPFLAGS='-I. -I.. $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(PYTHON_INCLUDE)' libparse ESingular TSingular Singular
 	touch $@
 
 emacs-stamp: doc-stamp
@@ -212,21 +216,25 @@ emacs-stamp: doc-stamp
 	touch $@
 
 doc-stamp: build-stamp
+	[ -x Singular/libparse ]
+	touch Singular/libparse
 	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 .
-	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' \
-		-C doc \
-		standalone-txt standalone-html html singular.idx singular.hlp
-	rm -r debian/doclddir
+	$(DOC_TRUE)cd Singular && ln -sf ../kernel/p_*.so .
+	$(DOC_TRUE)cd debian/doclddir; ln -sf ../../kernel/p_*.so .
+	$(DOC_TRUE)export SINGULAR_BIN_DIR=$(CURDIR)/Singular \
+	$(DOC_TRUE)       SINGULAR_ROOT_DIR=$(CURDIR)/Singular \
+	$(DOC_TRUE)       LD_LIBRARY_PATH='$(CURDIR)/debian/doclddir'"$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}}" \
+	$(DOC_TRUE)       PATH="$(CURDIR)/Singular:$(CURDIR)/kernel:$(CURDIR)/IntegerProgramming:$$PATH" \
+	$(DOC_TRUE)       PBORI_NOSAGE=YES; \
+	$(DOC_TRUE)$(MAKE) \
+	$(DOC_TRUE)	DOC2TEX_EXAMPLE_EXCLUSIONS="$(EXAMPLE_EXCLUDE)" \
+	$(DOC_TRUE)	bindir="$(CURDIR)/Singular" \
+	$(DOC_TRUE)	SINGULAR='$(CURDIR)/Singular/Singular' \
+	$(DOC_TRUE)	-C doc \
+	$(DOC_TRUE)	standalone-txt standalone-html html singular.idx singular.hlp
+	$(DOC_TRUE)rm -r debian/doclddir
+	$(DOC_FALSE)touch doc/singular.hlp
+	$(DOC_FALSE)-mkdir doc/examples
 	touch $@
 
 install: build-stamp doc-stamp emacs-stamp
@@ -255,7 +263,7 @@ install: build-stamp doc-stamp emacs-stamp
 	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)/
+	install debian/tmp/usr/lib/dbmsr.so debian/tmp/usr/lib/singular-$(VERSION)/
 	# get rid of AIX specific headers
 	rm -f debian/tmp/usr/include/*limits.h
 	#don't use them
@@ -263,12 +271,4 @@ install: build-stamp doc-stamp emacs-stamp
 	# 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