r44370 - in /packages/nlopt/trunk/debian: control python-nlopt.install pyversions rules

trophime-guest at users.alioth.debian.org trophime-guest at users.alioth.debian.org
Thu Jan 12 17:34:46 UTC 2012


Author: trophime-guest
Date: Thu Jan 12 17:34:46 2012
New Revision: 44370

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=44370
Log:
simplify debian/rules

Added:
    packages/nlopt/trunk/debian/python-nlopt.install
Removed:
    packages/nlopt/trunk/debian/pyversions
Modified:
    packages/nlopt/trunk/debian/control
    packages/nlopt/trunk/debian/rules

Modified: packages/nlopt/trunk/debian/control
URL: http://svn.debian.org/wsvn/debian-science/packages/nlopt/trunk/debian/control?rev=44370&op=diff
==============================================================================
--- packages/nlopt/trunk/debian/control (original)
+++ packages/nlopt/trunk/debian/control Thu Jan 12 17:34:46 2012
@@ -2,12 +2,12 @@
 Section: devel
 Priority: extra
 Maintainer: Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>
-Build-Depends: quilt, debhelper (>= 7.0.50~), autotools-dev, libtool, automake,
+Build-Depends: quilt, debhelper (>= 8), autotools-dev, libtool, automake,
  gcc (>= 4.2), g++ (>= 4.2), octave-pkg-dev (>= 0.7.0), 
- python-support, python-all-dev, python-numpy, 
+ python-all-dev (>= 2.6.6-3~), python-numpy, 
  guile-1.8, guile-1.8-dev
 Standards-Version: 3.9.2
-XS-Python-Version: >= 2.5
+X-Python-Version: >= 2.5
 Homepage: http://ab-initio.mit.edu/wiki/index.php/NLopt
 Vcs-Svn: svn://svn.debian.org/svn/debian-science/packages/nlopt
 Vcs-Browser: http://svn.debian.org/viewsvn/debian-science/packages/nlopt
@@ -54,7 +54,7 @@
 Package: python-nlopt
 Architecture: any
 Section: python
-XB-Python-Version: ${python:Versions}
+X-Python-Version: ${python:Versions}
 Depends: libnlopt0, ${shlibs:Depends}, ${python:Depends}, ${misc:Depends}
 Provides: ${python:Provides}
 Description: python bindings for nlopt

Added: packages/nlopt/trunk/debian/python-nlopt.install
URL: http://svn.debian.org/wsvn/debian-science/packages/nlopt/trunk/debian/python-nlopt.install?rev=44370&op=file
==============================================================================
--- packages/nlopt/trunk/debian/python-nlopt.install (added)
+++ packages/nlopt/trunk/debian/python-nlopt.install Thu Jan 12 17:34:46 2012
@@ -1,0 +1,1 @@
+usr/lib/python*

Modified: packages/nlopt/trunk/debian/rules
URL: http://svn.debian.org/wsvn/debian-science/packages/nlopt/trunk/debian/rules?rev=44370&op=diff
==============================================================================
--- packages/nlopt/trunk/debian/rules (original)
+++ packages/nlopt/trunk/debian/rules Thu Jan 12 17:34:46 2012
@@ -1,25 +1,5 @@
 #!/usr/bin/make -f
 
-# Uncomment this to turn on verbose mode. 
-export DH_VERBOSE=1
-
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
-  confflags += --build $(DEB_HOST_GNU_TYPE)
-else
-  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-endif
-
-# CFLAGS is not honoured by the build system.
-CC  ?= gcc
-CXX ?= g++
-
-ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-  CC  += -O2
-  CXX += -O2
-endif
 
 PYVERS := $(shell pyversions -vr debian/control)
 
@@ -29,57 +9,55 @@
 mpath = /usr/share/octave/packages/$(octver)
 bpath = /usr/lib/octave/packages/$(octver)
 
-CONFIGURE = \
-	CC="$(CC)" CXX="$(CXX)" ../configure $(confflags) \
-		--prefix=/usr \
-		--enable-shared
-#
-#		--with-cxx
+BUILDDIR = $(CURDIR)/debian/build
 
-autotools-update-stamp:
+%:
+	dh $@ --buildsystem=autoconf --builddirectory=$(BUILDDIR) --with python2
+
+override_dh_auto_reconf:
 	[ -e bin/scripts ] || mkdir -p bin/scripts
-	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
 	cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub bin/scripts
 	libtoolize --automake
 	aclocal -Im4
 	autoreconf -i
 	automake
-	touch $@
+ 
+override_dh_auto_clean:
+	for v in $(PYVERS); do \
+	   rm -rf $(BUILDDIR)$$v; \
+	done
+	-rm bin/scripts/config.guess bin/scripts/config.sub
+	-rm ltmain.sh octave/nlopt_optimize-oct.o m4/ltversion.m4 m4/libtool.m4 m4/ltoptions.m4 m4/lt~obsolete.m4
+	-rm aclocal.m4
+	-rm -rf autom4te.cache
+	-rm configure
+	find . -name Makefile.in | xargs -r rm 
 
-build-%/config.status: autotools-update-stamp
-	dh_testdir
-	-mkdir build-$*
-	cd build-$* && $(CONFIGURE) PYTHON=/usr/bin/python$* OCT_INSTALL_DIR=$(bpath) M_INSTALL_DIR=$(mpath) GUILE=guile GUILE_CONFIG=guile-config
+override_dh_auto_configure: override_dh_auto_reconf
+	for v in $(PYVERS); do \
+	dh_auto_configure --builddirectory=$(BUILDDIR)$$v \
+	   -- $(extra_flags) \
+		--prefix=/usr \
+		--srcdir=$(CURDIR) \
+		--enable-shared \
+	   PYTHON=/usr/bin/python$$v  OCT_INSTALL_DIR=$(bpath) M_INSTALL_DIR=$(mpath) GUILE=guile GUILE_CONFIG=guile-config ;\
+	done
 
-build: build-stamp
-build-stamp: $(PYVERS:%=build-stamp-%)
-	touch $@
-
-build-stamp-%: build-%/config.status
-	dh_testdir
-	$(MAKE) -C build-$*
-	#
+override_dh_auto_build:
 	# to prevent bug in install due to build-%/config.status being deleted after build targt is done
 	mkdir -p $(CURDIR)/debian/tmp
-	$(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/tmp
-	touch $@
 
-clean:
-	dh_testdir
-	dh_testroot
-	-rm -rf build*
-	-rm -rf *-stamp
-	-find . -name "*.pyc" -exec rm {} \;
-	-rm bin/scripts/config.guess bin/scripts/config.sub
-	QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
-	dh_clean
-	-rm ltmain.sh octave/nlopt_optimize-oct.o m4/ltversion.m4
+	for v in $(PYVERS); do \
+	   dh_auto_build --builddirectory=$(BUILDDIR)$$v; \
+	done
 
-install: build
-	dh_testdir
-	dh_testroot
+override_dh_auto_install:
+	for v in $(PYVERS); do \
+	  dh_auto_install --builddirectory=$(BUILDDIR)$$v; \
+	done
+
 	#
-	# to prevent bug in install due to build-%/config.status being deleted after build targt is done
+	# to prevent bug in install due to build-%/config.status being deleted after build target is done
 	dh_prep --exclude=debian/tmp
 	find . -name "*.pyc" -exec rm {} \;
 	#
@@ -91,51 +69,8 @@
 	#
 	mkdir -p  $(CURDIR)/debian/tmp/usr/share/lintian/overrides/
 	cp debian/octave-nlopt.lintian-overrides $(CURDIR)/debian/tmp/usr/share/lintian/overrides/octave-nlopt
-	dh_install --sourcedir=debian/tmp --list-missing
-	
-	
-
-# Build architecture-independent files here.
-binary-indep: build install
-	dh_testdir -i
-	dh_testroot -i
-	dh_installdirs -i
-	dh_installdocs -i
-	dh_installexamples -i
-	dh_installman -i
-	dh_installchangelogs -i
-	dh_link -i
-	dh_compress -i -X.pdf
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir -a
-	dh_testroot -a
-	dh_installdirs -a
-	dh_installdocs -a
-	dh_installexamples -a
-	dh_installman -a
-	dh_installchangelogs -a
-	dh_link -a
-	dh_compress -a
-	dh_fixperms -a
-	dh_makeshlibs -p libnlopt0
-	dh_makeshlibs -p libnlopt-guile0
-	dh_pysupport -ppython-nlopt
-	dh_installdeb -a
-	octave-depends
-	dh_shlibdeps -a
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+	#
+	find $(CURDIR)/debian/tmp/usr/lib -name \*.la | xargs rm
 
 # Grab the version before +dfsg
 DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p')




More information about the debian-science-commits mailing list