[libfann] 20/133: Switch to dh syntax
Christian Kastner
chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:07:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
chrisk-guest pushed a commit to branch master
in repository libfann.
commit 2ae676e4a9153f6488efc26643a58a9455df9a7d
Author: Christian Kastner <debian at kvr.at>
Date: Mon Jun 7 14:59:13 2010 +0200
Switch to dh syntax
This combines two major changes which could not easily be separated. Not only
was the syntax of debian/rules changed to dh, it was also modified to support
all available python versions, and to use python-support for proper package
installation.
---
debian/changelog | 6 ++
debian/control | 3 +-
debian/python-pyfann.dirs | 0
debian/python-pyfann.install | 1 -
debian/pyversions | 1 +
debian/rules | 141 ++++++++++++++-----------------------------
6 files changed, 53 insertions(+), 99 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index bf78346..9403990 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,10 +11,16 @@ libfann2 (2.1.0~beta~dfsg-1) UNRELEASED; urgency=low
- Updated package descriptions
- Updated to Standards-Version 3.8.4
- Build-Depend on debhelper (> 7.0.50~) and add ${misc:Depends}
+ - Added Build-Depends on python-all-dev and python-support for the python
+ extension
* debian/source/format:
- Convert to format 3.0 (quilt)
+ * debian/rules:
+ - Convert to dh syntax
+ - Build python extensions for all available python versions
* libfann2-py:
- Rename package to Python Policy-conform python-pyfann
+ - Removed debhelper helper files no longer needed because of python-support
* debian/patches:
- Added 0001-Link-python-pyfann-dynamically-instead-of-statically.patch
- Added 0002-Link-against-libm.patch (Closes: #558887)
diff --git a/debian/control b/debian/control
index ca76410..6196fdd 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,8 @@ Standards-Version: 3.8.4
Build-Depends:
docbook-utils,
debhelper (>= 7.0.50~),
- python-dev,
+ python-all-dev,
+ python-support (>= 0.90),
swig
Package: libfann2
diff --git a/debian/python-pyfann.dirs b/debian/python-pyfann.dirs
deleted file mode 100644
index e69de29..0000000
diff --git a/debian/python-pyfann.install b/debian/python-pyfann.install
deleted file mode 100644
index a6a0178..0000000
--- a/debian/python-pyfann.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python*/site-packages/pyfann/*
diff --git a/debian/pyversions b/debian/pyversions
new file mode 100644
index 0000000..b3dc41e
--- /dev/null
+++ b/debian/pyversions
@@ -0,0 +1 @@
+2.5-
diff --git a/debian/rules b/debian/rules
index 6eebd53..3d97611 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,20 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
CFLAGS = -Wall -g
-
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
@@ -24,93 +17,47 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
-# shared library versions, option 1
-version=2.0.0
-major=2
-# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
-#version=`ls src/.libs/lib*.so.* | \
-# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
-#major=`ls src/.libs/lib*.so.* | \
-# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
-
-config.status: configure
- dh_testdir
- CFLAGS='$(CFLAGS)' ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
-
-
-build: build-stamp
-build-stamp: config.status
- dh_testdir
-
- # Add here commands to compile the package.
- $(MAKE)
-
- cd python && make build
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- # Add here commands to clean up after the build process.
- -$(MAKE) distclean
- -(cd python; $(MAKE) clean)
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
- cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
- cp -f /usr/share/misc/config.guess config.guess
-endif
-
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/tmp
- $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
- ( cd python && make install ROOT=$(CURDIR)/debian/tmp )
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs ChangeLog
- dh_installdocs
+PYVERS = $(shell pyversions -r -v)
+
+
+%:
+ dh $@
+
+override_dh_auto_build:
+ # Perform regular build process
+ dh_auto_build
+
+ # Build python extensions in python/
+ cd python; \
+ for py in $(PYVERS); do \
+ python$$py setup.py build; \
+ done
+
+override_dh_auto_clean:
+ # Perform regular clean process
+ dh_auto_clean
+
+ # Remove python extensions build directory
+ rm -rf python/build
+
+override_dh_auto_install:
+ # Install python extensions from python/, so dh_pysupport can pick them up
+ cd python; \
+ for py in $(PYVERS); do \
+ python$$py setup.py install -f --root $(CURDIR)/debian/python-pyfann \
+ --install-layout=deb; \
+ done
+
+ # Continue with regular installation process
+ dh_auto_install
+
+override_dh_installexamples:
+ # Perform regular examples install process
dh_installexamples
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_installinit
-# dh_installcron
-# dh_installinfo
- dh_installman
- dh_install --sourcedir=debian/tmp --list-missing
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
-# dh_perl
- dh_makeshlibs -V
- dh_python
- dh_installdeb
- dh_shlibdeps -L libfann
- dh_gencontrol
- dh_md5sums
- dh_builddeb
+
+ # Remove unnecessary executable bits from training data sets
+ chmod 644 debian/libfann2-dev/usr/share/doc/libfann2-dev/examples/datasets/*
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+override_dh_compress:
+ # Don't compress example files and datasets
+ dh_compress -Xexamples
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libfann.git
More information about the debian-science-commits
mailing list