X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=debian%2Frules;h=1bc08c6e2d4c410ec09d7f2ee9c23cbd79b980bc;hp=a6d80b1937391037d2704a659c36c62c91522f25;hb=40d2f5d1ddacf71991adb447b163a19136ee2179;hpb=68fdf425abf14d016d5f95ee7b9d06a19a3c5926 diff --git a/debian/rules b/debian/rules index a6d80b19..1bc08c6e 100755 --- a/debian/rules +++ b/debian/rules @@ -1,85 +1,17 @@ #!/usr/bin/make -f -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/debhelper.mk -# 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 -fomit-frame-pointer -finline-limit=1200 +ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CXXFLAGS += -finline-limit=1200 endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - -config.status: configure - dh_testdir - # Add here commands to configure the package. - ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info - -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) prefix=$(CURDIR)/debian/tmp/usr infodir=$(CURDIR)/debian/tmp/usr/share/info mandir=$(CURDIR)/debian/tmp/usr/share/man - -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/X11R6/include/X11/pixmaps - cp $(CURDIR)/debian/ginac.xpm $(CURDIR)/debian/tmp/usr/X11R6/include/X11/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.1 -l debian/libginac1.1/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.5.1-1-blah (Debian version) ==> 1.5 (LT_RELEASE) +GINAC_RELEASE := $(shell echo $(DEB_VERSION) | cut -f 1,2 -d . ) +GINACLIB := libginac$(GINAC_RELEASE) -binary: binary-arch -.PHONY: build clean binary-arch binary install install-arch +DEB_DH_MAKESHLIBS_ARGS := -V"$(GINACLIB) (>= $(GINAC_RELEASE).0)" +DEB_DH_SHLIBDEPS_ARGS := --libpackage=$(GINACLIB) -l debian/$(GINACLIB)/usr/lib +DEB_DBG_PACKAGE_ALL = +DEB_DBG_PACKAGE_$(GINACLIB) = $(GINACLIB)-dbg