[GiNaC-list] [PATCH] simpler debian/*

Sheplyakov Alexei varg at theor.jinr.ru
Thu Jun 30 08:23:29 CEST 2005


Here is yet another patch. 

This ought to be in the ChangeLog:

* provide -dbg package (unstripped shared object with debugging symbols)
* switch to CDBS, so debian/rules is *much* simpler

Best regards, 
  Alexei

-- 
ROOT: an octopus made by nailing extra legs onto a cat.

-------------- next part --------------
diff --exclude CVS -Nru ginac-1.3-orig/debian/control ginac-1.3/debian/control
--- ginac-1.3-orig/debian/control	2005-02-05 01:32:55.000000000 +0300
+++ ginac-1.3/debian/control	2005-05-21 15:55:41.000000000 +0400
@@ -2,7 +2,7 @@
 Section: math
 Priority: optional
 Maintainer: Richard Kreckel <kreckel at ginac.de>
-Build-Depends: debhelper (>= 4.0.0), libcln-dev, libgmp3-dev, libreadline5-dev, flex, bison
+Build-Depends: cdbs (>= 0.4.28), debhelper (>= 4.0.0), libcln-dev, libgmp3-dev, libreadline5-dev, flex, bison
 Standards-Version: 3.6.1
 
 Package: libginac1.3
@@ -22,7 +22,7 @@
 Architecture: any
 Section: libdevel
 Depends: libginac1.3 (= ${Source-Version}), libc6-dev, g++, libcln-dev
-Recommends: info | info-browser
+Recommends: info | info-browser, libginac1.3-dbg (= ${Source-Version})
 Suggests: ginac-tools
 Description: The GiNaC framework (development files)
  GiNaC (which stands for "GiNaC is Not a CAS (Computer Algebra System)") is a
@@ -44,3 +44,20 @@
  This package provides some additional tools, like the popular ginsh (GiNaC
  interactive shell) and viewgar (for inspecting GiNaC archive files).  See
  <http://www.ginac.de/> for detailed information about GiNaC.
+
+Package: libginac1.3-dbg
+Architecture: any
+Section: libdevel
+Depends: libginac1.3 (= ${Source-Version})
+Recommends: gdb (>= 6.3) 
+Description: The GiNaC framework (debugging symbols)
+ GiNaC (which stands for "GiNaC is Not a CAS (Computer Algebra System)") is a
+ library for doing symbolic (i.e. non-numeric) computation directly in the C++
+ programming language.
+ .
+ This package provides unstripped shared object with debugging symbols. The 
+ library is installed in /usr/lib/debug and will be automatically used by
+ gdb while debugging programs using the GiNaC library. Most people will not
+ need this package. For detailed information about GiNaC see 
+ <http://www.ginac.de/>
+
diff --exclude CVS -Nru ginac-1.3-orig/debian/docs ginac-1.3/debian/docs
--- ginac-1.3-orig/debian/docs	2003-07-02 20:47:01.000000000 +0400
+++ ginac-1.3/debian/docs	1970-01-01 03:00:00.000000000 +0300
@@ -1,3 +0,0 @@
-NEWS
-README
-AUTHORS
diff --exclude CVS -Nru ginac-1.3-orig/debian/ginac-tools.files ginac-1.3/debian/ginac-tools.files
--- ginac-1.3-orig/debian/ginac-tools.files	2003-08-29 00:34:38.000000000 +0400
+++ ginac-1.3/debian/ginac-tools.files	1970-01-01 03:00:00.000000000 +0300
@@ -1,5 +0,0 @@
-usr/bin/ginsh
-usr/bin/viewgar
-usr/share/man/man1/ginsh*
-usr/share/man/man1/viewgar*
-usr/share/pixmaps/ginac.xpm
diff --exclude CVS -Nru ginac-1.3-orig/debian/ginac-tools.install ginac-1.3/debian/ginac-tools.install
--- ginac-1.3-orig/debian/ginac-tools.install	1970-01-01 03:00:00.000000000 +0300
+++ ginac-1.3/debian/ginac-tools.install	2005-05-21 15:04:23.000000000 +0400
@@ -0,0 +1,5 @@
+debian/tmp/usr/bin/ginsh
+debian/tmp/usr/bin/viewgar
+debian/tmp/usr/share/man/man1/ginsh*
+debian/tmp/usr/share/man/man1/viewgar*
+debian/ginac.xpm usr/share/pixmaps
diff --exclude CVS -Nru ginac-1.3-orig/debian/libginac1.3.dirs ginac-1.3/debian/libginac1.3.dirs
--- ginac-1.3-orig/debian/libginac1.3.dirs	2004-10-08 22:49:44.000000000 +0400
+++ ginac-1.3/debian/libginac1.3.dirs	1970-01-01 03:00:00.000000000 +0300
@@ -1 +0,0 @@
-usr/lib
diff --exclude CVS -Nru ginac-1.3-orig/debian/libginac1.3.files ginac-1.3/debian/libginac1.3.files
--- ginac-1.3-orig/debian/libginac1.3.files	2004-10-08 22:49:44.000000000 +0400
+++ ginac-1.3/debian/libginac1.3.files	1970-01-01 03:00:00.000000000 +0300
@@ -1 +0,0 @@
-usr/lib/libginac*.so.*
diff --exclude CVS -Nru ginac-1.3-orig/debian/libginac1.3.install ginac-1.3/debian/libginac1.3.install
--- ginac-1.3-orig/debian/libginac1.3.install	1970-01-01 03:00:00.000000000 +0300
+++ ginac-1.3/debian/libginac1.3.install	2005-05-21 02:50:36.000000000 +0400
@@ -0,0 +1 @@
+debian/tmp/usr/lib/libginac*.so.*
diff --exclude CVS -Nru ginac-1.3-orig/debian/libginac-dev.dirs ginac-1.3/debian/libginac-dev.dirs
--- ginac-1.3-orig/debian/libginac-dev.dirs	2004-10-06 15:40:20.000000000 +0400
+++ ginac-1.3/debian/libginac-dev.dirs	1970-01-01 03:00:00.000000000 +0300
@@ -1,4 +0,0 @@
-usr/include/ginac
-usr/share/info
-usr/share/aclocal
-usr/lib/pkgconfig
diff --exclude CVS -Nru ginac-1.3-orig/debian/libginac-dev.files ginac-1.3/debian/libginac-dev.files
--- ginac-1.3-orig/debian/libginac-dev.files	2004-10-06 15:40:20.000000000 +0400
+++ ginac-1.3/debian/libginac-dev.files	1970-01-01 03:00:00.000000000 +0300
@@ -1,9 +0,0 @@
-usr/lib/libginac.la
-usr/lib/libginac.a
-usr/lib/libginac.so
-usr/include/ginac
-usr/bin/ginac-config
-usr/share/man/man1/ginac-config*
-usr/share/info/ginac*
-usr/share/aclocal/ginac.m4
-usr/lib/pkgconfig/ginac.pc
diff --exclude CVS -Nru ginac-1.3-orig/debian/libginac-dev.install ginac-1.3/debian/libginac-dev.install
--- ginac-1.3-orig/debian/libginac-dev.install	1970-01-01 03:00:00.000000000 +0300
+++ ginac-1.3/debian/libginac-dev.install	2005-05-21 02:53:14.000000000 +0400
@@ -0,0 +1,9 @@
+debian/tmp/usr/lib/libginac.la
+debian/tmp/usr/lib/libginac.a
+debian/tmp/usr/lib/libginac.so
+debian/tmp/usr/include/ginac/*
+debian/tmp/usr/bin/ginac-config
+debian/tmp/usr/share/aclocal/ginac.m4
+debian/tmp/usr/lib/pkgconfig/ginac.pc
+debian/tmp/usr/share/info/ginac*
+debian/tmp/usr/share/man/man1/ginac-config*
diff --exclude CVS -Nru ginac-1.3-orig/debian/rules ginac-1.3/debian/rules
--- ginac-1.3-orig/debian/rules	2004-06-15 01:54:01.000000000 +0400
+++ ginac-1.3/debian/rules	2005-05-25 11:01:24.000000000 +0400
@@ -1,86 +1,20 @@
 #!/usr/bin/make -f
+include /usr/share/cdbs/1/rules/buildcore.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/debhelper.mk
+export DH_COMPAT
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# This is the debhelper compatability version to use.
-export DH_COMPAT=4
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
-
-# 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)
-
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	export CXXFLAGS = -O0
-else
-	export CXXFLAGS = -O2 -finline-limit=1200
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
+ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CXXFLAGS += -finline-limit=1200
 endif
 
-config.status: configure
-	dh_testdir
-	# Add here commands to configure the package.
-	# The Makefile is removed on error in order to prevent the build at this early stage.
-	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info || rm -f Makefile
-
-build: build-arch
-
-build-arch: build-arch-stamp
-build-arch-stamp:  config.status
-	# Add here commands to compile the arch part of the package.
-	$(MAKE)
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-arch-stamp config-stamp
-	-$(MAKE) distclean
-	dh_clean
-
-install: install-arch
-install-arch:
-	dh_testdir
-	dh_testroot
-	dh_clean -k -a
-	dh_installdirs -a
-	# Add here commands to install the arch part of the package into 
-	# debian/tmp.
-	$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
-	mkdir -p $(CURDIR)/debian/tmp/usr/share/pixmaps
-	cp $(CURDIR)/debian/ginac.xpm $(CURDIR)/debian/tmp/usr/share/pixmaps/
-
-# Must not depend on anything. This is to be called by
-# binary-arch/binary-multi
-# in another 'make' thread.
-binary-common:
-	dh_testdir
-	dh_testroot
-	dh_installdocs
-	dh_installmenu
-	dh_installman
-	dh_installinfo
-	dh_installchangelogs ChangeLog
-	dh_movefiles
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_makeshlibs
-	dh_shlibdeps --libpackage=libginac1.3 -l debian/libginac1.3/usr/lib
-	dh_gencontrol
-	dh_installdeb
-	dh_md5sums
-	dh_builddeb
-
-# Build architecture dependant packages using the common target.
-binary-arch: build-arch install-arch
-	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+# 1.3.1-1-blah (Debian version) ==> 1.3 (LT_RELEASE)
+GINAC_RELEASE := $(shell echo $(DEB_VERSION) | cut -f 1,2 -d . )
+GINACLIB := libginac$(GINAC_RELEASE)
+
+DEB_DH_MAKESHLIBS_ARGS := -V"$(GINACLIB) (>= $(GINAC_RELEASE).0)"
+DEB_DH_SHLIBDEPS_ARGS := --libpackage=$(GINACLIB) -l debian/$(GINACLIB)/usr/lib
+DEB_DH_STRIP_ARGS := --dbg-package=$(GINACLIB)
+# menu entry for ginsh
+DEB_INSTALL_MENU_ginac-tools := debian/ginac-tools.menu
 
-binary: binary-arch
-.PHONY: build clean binary-arch binary install install-arch 
diff --exclude CVS -Nru ginac-1.3-orig/debian/shlibs ginac-1.3/debian/shlibs
--- ginac-1.3-orig/debian/shlibs	2005-02-05 01:32:55.000000000 +0300
+++ ginac-1.3/debian/shlibs	1970-01-01 03:00:00.000000000 +0300
@@ -1 +0,0 @@
-libginac-1.3	0	libginac1.3 (>= 1.3.0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20050630/441acf72/attachment.pgp


More information about the GiNaC-list mailing list