[Pkg-kde-commits] rev 2261 - in trunk/packages/koffice/debian: .
cdbs
Isaac Clerencia
isaac at costa.debian.org
Sun Nov 13 22:00:26 UTC 2005
Author: isaac
Date: 2005-11-13 22:00:26 +0000 (Sun, 13 Nov 2005)
New Revision: 2261
Added:
trunk/packages/koffice/debian/cdbs/
trunk/packages/koffice/debian/cdbs/debian-qt-kde.mk
trunk/packages/koffice/debian/cdbs/kde.mk
trunk/packages/koffice/debian/cdbs/simple-patchsys.mk
trunk/packages/koffice/debian/cdbs/versions.pl
Modified:
trunk/packages/koffice/debian/control
trunk/packages/koffice/debian/rules
Log:
Switch to CDBS
Added: trunk/packages/koffice/debian/cdbs/debian-qt-kde.mk
===================================================================
--- trunk/packages/koffice/debian/cdbs/debian-qt-kde.mk 2005-11-13 21:57:59 UTC (rev 2260)
+++ trunk/packages/koffice/debian/cdbs/debian-qt-kde.mk 2005-11-13 22:00:26 UTC (rev 2261)
@@ -0,0 +1,99 @@
+ifndef _cdbs_bootstrap
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+endif
+
+ifndef _cdbs_class_debian-qt-kde
+_cdbs_class_debian-qt-kde := 1
+
+# Note: This _must_ be included before autotools.mk, or it won't work.
+common-configure-arch common-configure-indep:: debian/stamp-cvs-make
+debian/stamp-cvs-make:
+ if test -n "$(DEB_KDE_CVS_MAKE)" -a ! -f configure; then \
+ $(MAKE) -C $(DEB_SRCDIR) -f admin/Makefile.common dist; \
+ fi
+ touch debian/stamp-cvs-make
+
+include debian/cdbs/kde.mk$(_cdbs_makefile_suffix)
+
+DEB_PATCHDIRS := debian/patches/common debian/patches
+
+DEB_KDE_ENABLE_FINAL := yes
+DEB_INSTALL_DOCS_ALL :=
+
+DEB_DH_MAKESHLIBS_ARGS_ALL := -V
+DEB_SHLIBDEPS_INCLUDE = $(foreach p,$(PACKAGES_WITH_LIBS),debian/$(p)/usr/lib)
+
+common-build-arch:: debian/stamp-man-pages
+debian/stamp-man-pages:
+ if ! test -d debian/man/out; then mkdir -p debian/man/out; fi
+ for f in $$(find debian/man -name '*.sgml'); do \
+ docbook-to-man $$f > debian/man/out/`basename $$f .sgml`.1; \
+ done
+ for f in $$(find debian/man -name '*.man'); do \
+ soelim -I debian/man $$f \
+ > debian/man/out/`basename $$f .man`.`head -n1 $$f | awk '{print $$NF}'`; \
+ done
+ touch debian/stamp-man-pages
+
+common-binary-indep::
+ ( set -e; \
+ tmpf=`mktemp debian/versions.XXXXXX`; \
+ perl debian/cdbs/versions.pl >$$tmpf; \
+ for p in $(DEB_INDEP_PACKAGES); do \
+ cat $$tmpf >>debian/$$p.substvars; \
+ done; \
+ rm -f $$tmpf )
+
+common-binary-arch::
+ ( set -e; \
+ tmpf=`mktemp debian/versions.XXXXXX`; \
+ perl debian/cdbs/versions.pl >$$tmpf; \
+ for p in $(DEB_ARCH_PACKAGES); do \
+ cat $$tmpf >>debian/$$p.substvars; \
+ done; \
+ rm -f $$tmpf )
+
+clean::
+ rm -rf debian/man/out
+ -rmdir debian/man
+ rm -f debian/stamp-man-pages
+ rm -rf debian/shlibs-check
+
+$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
+ if test -x /usr/bin/dh_desktop; then dh_desktop -p$(cdbs_curpkg) $(DEB_DH_DESKTOP_ARGS); fi
+ if test -e debian/$(cdbs_curpkg).lintian; then \
+ install -p -D -m644 debian/$(cdbs_curpkg).lintian \
+ debian/$(cdbs_curpkg)/usr/share/lintian/overrides/$(cdbs_curpkg); \
+ fi
+ if test -e debian/$(cdbs_curpkg).presubj; then \
+ install -p -D -m644 debian/$(cdbs_curpkg).presubj \
+ debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/presubj; \
+ fi
+
+binary-install/$(DEB_SOURCE_PACKAGE)-doc-html::
+ set -e; \
+ for doc in `cd $(DEB_DESTDIR)/usr/share/doc/kde/HTML/en; find . -name index.docbook`; do \
+ pkg=$${doc%/index.docbook}; pkg=$${pkg#./}; \
+ echo Building $$pkg HTML docs...; \
+ mkdir -p $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
+ cd $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
+ meinproc $(DEB_DESTDIR)/usr/share/doc/kde/HTML/en/$$pkg/index.docbook; \
+ done
+ for pkg in $(DOC_HTML_PRUNE) ; do \
+ rm -rf debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
+ done
+
+clean::
+ if test -n "$(DEB_KDE_CVS_MAKE)" && test -d $(DEB_SRCDIR); then \
+ cd $(DEB_SRCDIR); \
+ find . -name Makefile.in -print | \
+ xargs --no-run-if-empty rm -f; \
+ rm -f Makefile.am acinclude.m4 aclocal.m4 config.h.in \
+ configure configure.files configure.in stamp-h.in \
+ subdirs; \
+ fi
+ rm -f debian/stamp-cvs-make
+
+endif
Added: trunk/packages/koffice/debian/cdbs/kde.mk
===================================================================
--- trunk/packages/koffice/debian/cdbs/kde.mk 2005-11-13 21:57:59 UTC (rev 2260)
+++ trunk/packages/koffice/debian/cdbs/kde.mk 2005-11-13 22:00:26 UTC (rev 2261)
@@ -0,0 +1,88 @@
+# -*- mode: makefile; coding: utf-8 -*-
+# Copyright © 2003 Christopher L Cheney <ccheney at debian.org>
+# Description: A class for KDE packages; sets KDE environment variables, etc
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+
+ifndef _cdbs_bootstrap
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+endif
+
+ifndef _cdbs_class_kde
+_cdbs_class_kde := 1
+
+include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
+
+ifdef _cdbs_tarball_dir
+DEB_BUILDDIR = $(_cdbs_tarball_dir)/obj-$(DEB_BUILD_GNU_TYPE)
+else
+DEB_BUILDDIR = obj-$(DEB_BUILD_GNU_TYPE)
+endif
+
+include $(_cdbs_class_path)/autotools.mk$(_cdbs_makefile_suffix)
+
+export kde_cgidir = \$${libdir}/cgi-bin
+export kde_confdir = \$${sysconfdir}/kde3
+export kde_htmldir = \$${datadir}/doc/kde/HTML
+
+ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ cdbs_kde_enable_final = $(if $(DEB_KDE_ENABLE_FINAL),--enable-final,)
+endif
+
+ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ cdbs_kde_enable_final =
+ cdbs_kde_enable_debug = --enable-debug=yes
+else
+ cdbs_kde_enable_debug = --disable-debug
+endif
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+ cdbs_kde_enable_debug = --enable-debug=full
+endif
+
+cdbs_configure_flags += --with-qt-dir=/usr/share/qt3 --disable-rpath --with-xinerama $(cdbs_kde_enable_final) $(cdbs_kde_enable_debug)
+
+DEB_AC_AUX_DIR = $(DEB_SRCDIR)/admin
+DEB_CONFIGURE_INCLUDEDIR = "\$${prefix}/include/kde"
+DEB_COMPRESS_EXCLUDE := .bz2 .css .dcl .docbook -license .tag .sty .el
+
+cleanbuilddir::
+ -if test "$(DEB_BUILDDIR)" != "$(DEB_SRCDIR)"; then rm -rf $(DEB_BUILDDIR); fi
+
+common-build-arch common-build-indep:: debian/stamp-apidox
+debian/stamp-apidox:
+ if test -n "$(DEB_KDE_APIDOX)"; then \
+ $(DEB_MAKE_INVOKE) apidox; \
+ fi
+ touch debian/stamp-apidox
+
+common-install-arch common-install-indep:: install-apidox
+install-apidox::
+ if test -n "$(DEB_KDE_APIDOX)"; then \
+ $(DEB_MAKE_INVOKE) install-apidox DESTDIR=$(DEB_DESTDIR); \
+ fi
+
+clean::
+ rm -f debian/stamp-apidox
+
+buildprep: clean apply-patches
+ make -f admin/Makefile.common dist
+ debian/rules clean
+
+endif
Added: trunk/packages/koffice/debian/cdbs/simple-patchsys.mk
===================================================================
--- trunk/packages/koffice/debian/cdbs/simple-patchsys.mk 2005-11-13 21:57:59 UTC (rev 2260)
+++ trunk/packages/koffice/debian/cdbs/simple-patchsys.mk 2005-11-13 22:00:26 UTC (rev 2261)
@@ -0,0 +1,153 @@
+# -*- mode: makefile; coding: utf-8 -*-
+# Copyright © 2002,2003 Colin Walters <walters at debian.org>
+# Description: A sample patch system which uses separate files in debian/patches
+# Patch suffix is specified by DEB_PATCH_SUFFIX. Defaults to .patch.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+ifndef _cdbs_bootstrap
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+endif
+
+ifndef _cdbs_rules_patchsys
+_cdbs_rules_patchsys := 1
+
+include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
+
+ifeq ($(_cdbs_included_patchsys),)
+_cdbs_included_patchsys := 1
+
+_cdbs_patch_system_apply_rule := apply-patches
+_cdbs_patch_system_unapply_rule := reverse-patches
+
+# uu-encoded patches allowed - Bug ##305857
+DEB_PATCH_SUFFIX ?= .diff .diff.gz .diff.bz2 .diff.uu .patch .patch.gz .patch.bz2 .patch.uu
+DEB_PATCHDIRS ?= debian/patches
+close_parenthesis ?= )
+DEB_PATCHES := $(shell\
+for dir in $(DEB_PATCHDIRS) ; do \
+ for file in $$dir/* ; do \
+ for suffix in $(DEB_PATCH_SUFFIX) ; do \
+ case $$file in *$$suffix$(close_parenthesis) echo $$file ;; esac ; \
+ done ; \
+ done ; \
+done)
+
+# if we have any patches, check if some are patching config.{guess,sub,rpath}
+# and print a warning
+ifneq (, $(DEB_PATCHES))
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), patchutils
+evil_patches_that_do_nasty_things := $(shell\
+if lsdiff=`which lsdiff` ; then \
+ $$lsdiff -H $(DEB_PATCHES) \
+ | egrep "/config\.(guess|sub|rpath)$$" | tr "\n" " " ; \
+fi)
+ifneq (, $(evil_patches_that_do_nasty_things))
+$(warning ** WARNING **: The following patches are modifiing auto-updated files. Please exclude the following files from your patch: $(evil_patches_that_do_nasty_things))
+endif
+endif
+
+post-patches:: apply-patches
+
+# clean up log files in all patch directories - Bug ##296984
+clean:: reverse-patches
+ for dir in $(DEB_PATCHDIRS) ; do \
+ rm -f $$dir/*.log ; \
+ done
+
+# The patch subsystem
+apply-patches: pre-build debian/stamp-patched
+debian/stamp-patched: $(DEB_PATCHES)
+debian/stamp-patched reverse-patches:
+ $(MAKE) -f debian/rules reverse-config
+ @echo "patches: $(DEB_PATCHES)"
+ @set -e ; reverse=""; patches="$(DEB_PATCHES)"; \
+ if [ "$@" = "reverse-patches" ]; then \
+ if [ ! -e debian/stamp-patched ]; then \
+ echo "Not reversing not applied patches."; \
+ exit 0; \
+ fi; \
+ reverse="-R"; \
+ for patch in $$patches; do reversepatches="$$patch $$reversepatches"; done; \
+ patches="$$reversepatches"; \
+ fi; \
+ for patch in $$patches; do \
+ case $$patch in \
+ *.gz) cat=zcat ;; \
+ *.bz2) cat=bzcat ;; \
+ *.uu) cat="uudecode -o -" ;; \
+ *) cat=cat ;; \
+ esac; \
+ level=$$(head $$patch | egrep '^#DPATCHLEVEL=' | cut -f 2 -d '='); \
+ reverse=""; \
+ if [ "$@" = "reverse-patches" ]; then reverse="-R"; fi; \
+ success=""; \
+ if [ -z "$$level" ]; then \
+ echo -n "Trying "; if test -n "$$reverse"; then echo -n "reversed "; fi; echo -n "patch $$patch at level "; \
+ for level in 0 1 2; do \
+ if test -z "$$success"; then \
+ echo -n "$$level..."; \
+ if [ "$(DEB_PATCHDIRS_READONLY)" = "yes" ] ; then \
+ logfile="/dev/null" ; \
+ else \
+ logfile="$$patch.level-$$level.log" ; \
+ fi ; \
+ if $$cat $$patch | patch -d $(DEB_SRCDIR) $$reverse -E --dry-run -p$$level 1>$$logfile 2>&1; then \
+ if $$cat $$patch | patch -d $(DEB_SRCDIR) $$reverse -E --no-backup-if-mismatch -V never -p$$level 1>$$logfile 2>&1; then \
+ success=yes; \
+ touch debian/stamp-patch-$$(basename $$patch); \
+ echo "success."; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ if test -z "$$success"; then \
+ if test -z "$$reverse"; then \
+ echo "failure."; \
+ exit 1; \
+ else \
+ echo "failure (ignored)."; \
+ fi \
+ fi; \
+ else \
+ echo -n "Trying patch $$patch at level $$level..."; \
+ echo -n "$$level..."; \
+ if [ "$(DEB_PATCHDIRS_READONLY)" = "yes" ] ; then \
+ logfile="/dev/null" ; \
+ else \
+ logfile="$$patch.log" ; \
+ fi ; \
+ if $$cat $$patch | patch -d $(DEB_SRCDIR) $$reverse -E --no-backup-if-mismatch -V never -p$$level 1>$$logfile 2>&1; then \
+ touch debian/stamp-patch-$$(basename $$patch); \
+ echo "success."; \
+ else \
+ echo "failure:"; \
+ cat $$logfile; \
+ if test -z "$$reverse"; then exit 1; fi; \
+ fi; \
+ fi; \
+ done
+ if [ "$@" = "debian/stamp-patched" ] ; then touch debian/stamp-patched ; \
+ elif [ "$@" = "reverse-patches" ] ; then rm -f debian/stamp-patch* ; \
+ fi
+ # eliminate update-config when reversing patches - Bug ##299010
+ if [ "$@" != "reverse-patches" ] ; then $(MAKE) -f debian/rules update-config ; fi
+
+endif
+
+endif
Added: trunk/packages/koffice/debian/cdbs/versions.pl
===================================================================
--- trunk/packages/koffice/debian/cdbs/versions.pl 2005-11-13 21:57:59 UTC (rev 2260)
+++ trunk/packages/koffice/debian/cdbs/versions.pl 2005-11-13 22:00:26 UTC (rev 2261)
@@ -0,0 +1,19 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
+my ($version3, $version3_next);
+my ($version2, $version2_next);
+
+($version3 = $version) =~ s/-[^-]+$//;
+($version2 = $version3) =~ s/\.[^.]+$//;
+
+($version3_next = $version3) =~ s/(?<=\.)(\d+)$/($1+1)/e;
+($version2_next = $version2) =~ s/(?<=\.)(\d+)$/($1+1)/e;
+
+print "KDE-Version3=$version3\n";
+print "KDE-Version2=$version2\n";
+print "KDE-Next-Version3=$version3_next\n";
+print "KDE-Next-Version2=$version2_next\n";
Modified: trunk/packages/koffice/debian/control
===================================================================
--- trunk/packages/koffice/debian/control 2005-11-13 21:57:59 UTC (rev 2260)
+++ trunk/packages/koffice/debian/control 2005-11-13 22:00:26 UTC (rev 2261)
@@ -3,8 +3,7 @@
Priority: optional
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>
Uploaders: Ben Burton <bab at debian.org>, Luk Claes <luk at debian.org>, Isaac Clerencia <isaac at debian.org>
-Build-Depends: g++-3.4 [arm hppa m68k], automake1.7, debhelper (>= 4.0.0), flex, kdelibs4-dev (>= 4:3.2.0), libaspell-dev, libfontconfig1-dev, libmagick++9-dev, libpaper-dev, libtiff4-dev, libwv2-dev (>= 0.1.9-0), libxml2-dev, libxslt1-dev, python-dev, libwpd8-dev
-Build-Conflicts: autoconf2.13
+Build-Depends: g++-3.4 [arm hppa m68k], cdbs (>= 0.4.27), debhelper (>= 4.2.30), flex, kdelibs4-dev (>= 4:3.2.0), libaspell-dev, libfontconfig1-dev, libmagick++9-dev, libpaper-dev, libtiff4-dev, libwv2-dev (>= 0.1.9-0), libxml2-dev, libxslt1-dev, python-dev, libwpd8-dev
Standards-Version: 3.6.1
Package: koffice
Modified: trunk/packages/koffice/debian/rules
===================================================================
--- trunk/packages/koffice/debian/rules 2005-11-13 21:57:59 UTC (rev 2260)
+++ trunk/packages/koffice/debian/rules 2005-11-13 22:00:26 UTC (rev 2261)
@@ -1,24 +1,9 @@
#!/usr/bin/make -f
-# 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
+include /usr/share/cdbs/1/rules/debhelper.mk
+include debian/cdbs/debian-qt-kde.mk
+include debian/cdbs/simple-patchsys.mk
-# This is the debhelper compatibility 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)
-
-INSTALL_DIR = install -p -d -o root -g root -m 755
-INSTALL_FILE = install -p -o root -g root -m 644
-
###
GCC4_ICES_HERE := arm m68k hppa
@@ -29,252 +14,3 @@
export CPP=cpp-3.4
export CXX=g++-3.4
endif
-
-###
-
-objdir = $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
-
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
- INSTALL_PROGRAM += -s
-endif
-
-# These options are for distributed compiling.
-# DEB_CONCURRENCY_LEVEL must always be >= 1.
-DEB_CONCURRENCY_LEVEL ?= 1
-do_parallel = -j$(DEB_CONCURRENCY_LEVEL)
-DEB_DISTCC_HOSTS ?= localhost
-export DISTCC_HOSTS = $(DEB_DISTCC_HOSTS)
-
-ifeq ($(DEB_BUILD_GNU_TYPE),i386-linux)
- # Uncomment the following 2 lines to enable i686 optimziation
- # You may want to tweak the settings to your likings
- #export CFLAGS=-O3 -march=i686 -ffast-math -finline-functions
- #export CXXFLAGS=-O3 -march=i686 -ffast-math -finline-functions
-endif
-
--include debian/debiandirs
-
-debian/debiandirs: admin/debianrules
- perl -w admin/debianrules echodirs > debian/debiandirs
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
-
- # Apply Debian specific patches
- if test ! -f patch-stamp; then \
- for patch in $(CURDIR)/debian/patches/*.diff ;\
- do \
- echo APPLYING PATCH\: $${patch##*/};\
- if cat $$patch | patch -p1 --dry-run >/dev/null 2>&1; then \
- cat $$patch | patch -p1; \
- else \
- cat $$patch | patch -p0; \
- fi; \
- done ;\
- touch patch-stamp ;\
- fi
-
- # Force a rerun of automake/etc since this is required by the
- # debian patches.
- $(MAKE) -f admin/Makefile.common ;\
-
- # make build directory
- mkdir $(objdir)
-
- # ensure configure is executable
- chmod +x configure
-
- # run configure with build tree $(objdir)
- cd $(objdir) && \
- DO_NOT_COMPILE=kexi ../configure $(configkde)
-
- touch configure-stamp
-
-build: build-stamp
-build-stamp: configure-stamp
- dh_testdir
-
- cd $(objdir) && \
- $(MAKE) $(do_parallel)
-
- touch build-stamp
-
-debian-clean:
- dh_testdir
- dh_testroot
-
- dh_clean
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp debian/debiandirs
-
- # Remove Debian specific patches
- if test -f patch-stamp; then \
- for patch in $(CURDIR)/debian/patches/*.diff ;\
- do \
- echo REMOVING PATCH\: $${patch##*/}; \
- if cat $$patch | patch -p1 -R --dry-run > /dev/null 2>&1; then \
- cat $$patch | patch -p1 -R; \
- else \
- cat $$patch | patch -p0 -R; \
- fi; \
- done ;\
- rm -f patch-stamp ;\
- fi
-
- # Remove build tree
- rm -rf $(objdir)
-
- # if Makefile exists run distclean
- if test -f Makefile; then \
- $(MAKE) distclean; \
- fi
-
- if test -d CVS; then \
- $(MAKE) -f admin/Makefile.common cvs-clean ;\
- fi
-
- dh_clean
-
-install: DH_OPTIONS=
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- cd $(objdir) && \
- $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
-
- # Generate HTML docs.
- for i in `find debian/tmp -name "index.docbook"`; do \
- ( cd `dirname $$i`; meinproc `basename $$i` ); \
- done
-
- # Split into separate binary packages.
- dh_install --sourcedir=debian/tmp --list-missing
-
- # Don't override the openoffice.org mimelnk entries with our own.
- rm -f debian/koffice-data/usr/share/mimelnk/application/vnd.sun.xml.*.desktop
-
- # Install standard documentation links.
- for pkg in `dh_listpackages`; do \
- if test -d debian/$$pkg/usr/share/doc/kde/HTML/en/$$pkg; then \
- dh_link -p$$pkg usr/share/doc/kde/HTML/en/$$pkg \
- usr/share/doc/$$pkg/html; \
- fi; \
- done
-
- # Install lintian and linda overrides.
- for pkg in `dh_listpackages`; do \
- if test -e debian/$$pkg.override; then \
- $(INSTALL_DIR) debian/$$pkg/usr/share/lintian/overrides; \
- $(INSTALL_FILE) debian/$$pkg.override \
- debian/$$pkg/usr/share/lintian/overrides/$$pkg; \
- fi; \
- if test -e debian/$$pkg.linda; then \
- $(INSTALL_DIR) debian/$$pkg/usr/share/linda/overrides; \
- $(INSTALL_FILE) debian/$$pkg.linda \
- debian/$$pkg/usr/share/linda/overrides/$$pkg; \
- fi; \
- done
-
-# This single target is used to build all the packages, all at once, or
-# one at a time. So keep in mind: any options passed to commands here will
-# affect _all_ packages. Anything you want to only affect one package
-# should be put in another target, such as the install target.
-binary-common:
- dh_testdir
- dh_testroot
-
- # Install the correct upstream changelogs.
- for pkg in `dh_listpackages`; do \
- case "$$pkg" in \
- karbon | kchart | kexi | kivio | kpresenter | kspread | kugar | kword ) \
- DH_OPTIONS='' dh_installchangelogs -p$$pkg $$pkg/CHANGES ;; \
- koffice-libs ) \
- DH_OPTIONS='' dh_installchangelogs -p$$pkg lib/CHANGES ;; \
- * ) \
- DH_OPTIONS='' dh_installchangelogs -p$$pkg ;; \
- esac; \
- done
-
- dh_installdocs
- dh_installexamples
- dh_installman
- dh_installmenu
- dh_installmime
-
- # Rename some newly installed files, ensure all demo files
- # are once compressed and fix incorrect man page installations.
- for pkg in `dh_listpackages`; do \
- case "$$pkg" in \
- kugar ) \
- mv debian/kugar/usr/share/doc/kugar/examples/kugar.examples.README \
- debian/kugar/usr/share/doc/kugar/examples/README.examples; \
- ;; \
- kword | kspread ) \
- for eg in debian/$$pkg/usr/share/doc/$$pkg/examples/*.k??; do \
- if ! gzip -t $$eg > /dev/null 2>&1; then \
- gzip -9 $$eg; \
- mv $$eg.gz $$eg; \
- fi; \
- done; \
- ;; \
- kpresenter ) \
- mv debian/kpresenter/usr/share/man/pl/man1/kprconverter.1 \
- debian/kpresenter/usr/share/man/man1/kprconverter.pl.1; \
- rm -rf debian/kpresenter/usr/share/man/pl; \
- ;; \
- esac; \
- done
-
- dh_strip
- dh_link
- dh_compress -X.docbook -X.css -X-license -X.dcl -X.bz2 -X.ksp -X.kwd -X.kwt
- dh_fixperms
- dh_makeshlibs -V
- dh_installdeb
- dh_perl
-
- # Run dh_shlibdeps with package-specific library search paths.
- for pkg in `dh_listpackages`; do \
- echo "Checking dependencies for $$pkg..."; \
- case "$$pkg" in \
- koffice | koffice-doc-html ) \
- DH_OPTIONS='' dh_shlibdeps -p$$pkg ;; \
- koffice-* ) \
- DH_OPTIONS='' dh_shlibdeps -p$$pkg -ldebian/koffice-libs/usr/lib ;; \
- kexi ) \
- DH_OPTIONS='' dh_shlibdeps -p$$pkg \
- -ldebian/koffice-libs/usr/lib:debian/kugar/usr/lib:debian/$$pkg/usr/lib ;; \
- * ) \
- DH_OPTIONS='' dh_shlibdeps -p$$pkg \
- -ldebian/koffice-libs/usr/lib:debian/$$pkg/usr/lib ;; \
- esac; \
- done
-
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-# Build architecture independant packages using the common target.
-binary-indep: build install
- $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
-
-# Build architecture dependant packages using the common target.
-binary-arch: build install
- $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
-
-# Any other binary targets build just one binary package at a time.
-binary-%: build install
- $(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
More information about the pkg-kde-commits
mailing list