[pkg-kde-commits] rev 2564 - trunk/packages/kdesdk/debian

Christopher Martin chrsmrtn at costa.debian.org
Tue Dec 6 18:13:48 UTC 2005


Author: chrsmrtn
Date: 2005-12-06 18:13:48 +0000 (Tue, 06 Dec 2005)
New Revision: 2564

Modified:
   trunk/packages/kdesdk/debian/rules
Log:
New cdbs rules file.


Modified: trunk/packages/kdesdk/debian/rules
===================================================================
--- trunk/packages/kdesdk/debian/rules	2005-12-06 18:12:57 UTC (rev 2563)
+++ trunk/packages/kdesdk/debian/rules	2005-12-06 18:13:48 UTC (rev 2564)
@@ -1,18 +1,23 @@
 #!/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
+include /usr/share/cdbs/1/rules/utils.mk
 
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
+DEB_DH_STRIP_ARGS := --dbg-package=kdesdk-dbg
 
-# 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)
+PACKAGES_WITH_LIBS := kbabel kompare kspy kunittest libcvsservice0
 
+DEB_DH_MAKESHLIBS_ARGS_kbabel			:= -V'kbabel (>= 4:3.5.0-1)'
+DEB_DH_MAKESHLIBS_ARGS_kompare			:= -V'kompare (>= 4:3.5.0-1)'
+DEB_DH_MAKESHLIBS_ARGS_kspy			:= -V'kspy (>= 4:3.5.0-1)'
+DEB_DH_MAKESHLIBS_ARGS_kunittest		:= -V'kunittest (>= 4:3.5.0-1)'
+DEB_DH_MAKESHLIBS_ARGS_libcvsservice0		:= -V'libcvsservice0 (>= 4:3.5.0-1)'
+
+#shlibs_ver = 4:3.5.0-1
+#$(foreach p,$(PACKAGES_WITH_LIBS),$(eval DEB_DH_MAKESHLIBS_ARGS_$(p) := -V'$(p) (>= $(shlibs_ver))'))
+
 ###
 
 GCC4_ICES_HERE := arm m68k hppa
@@ -25,250 +30,39 @@
 endif
 
 ###
-	    
-INSTALL_DIR = install -p -d -o root -g root -m 755
-INSTALL_FILE = install -p -o root -g root -m 644
-INSTALL_BIN = install -p -o root -g root -m 755
 
-objdir = $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
+DEB_INSTALL_CHANGELOGS_cervisia := cervisia/ChangeLog
+DEB_INSTALL_CHANGELOGS_kapptemplate := kapptemplate/ChangeLog
+DEB_INSTALL_CHANGELOGS_kbabel := kbabel/ChangeLog
+DEB_INSTALL_CHANGELOGS_kcachegrind := kcachegrind/ChangeLog
+DEB_INSTALL_CHANGELOGS_kompare := kompare/ChangeLog
+DEB_INSTALL_CHANGELOGS_umbrello := umbrello/ChangeLog
 
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
+binary-install/kdesdk-scripts::
+	mv -f debian/kdesdk-scripts/usr/share/man/pl/man1/kdemangen.1 \
+		debian/kdesdk-scripts/usr/share/man/man1/kdemangen.pl.1; \
+	mv -f debian/kdesdk-scripts/usr/share/man/pl/man1/png2mng.1 \
+		debian/kdesdk-scripts/usr/share/man/man1/png2mng.pl.1; \
+	mv -f debian/kdesdk-scripts/usr/share/man/py/man1/kdelnk2desktop.1 \
+		debian/kdesdk-scripts/usr/share/man/man1/kdelnk2desktop.py.1; \
+	mv -f debian/kdesdk-scripts/usr/share/man/py/man1/zonetab2pot.1 \
+		debian/kdesdk-scripts/usr/share/man/man1/zonetab2pot.py.1; \
+	mv -f debian/kdesdk-scripts/usr/share/man/sh/man1/build-progress.1 \
+		debian/kdesdk-scripts/usr/share/man/man1/build-progress.sh.1; \
+	rm -rf debian/kdesdk-scripts/usr/share/man/pl; \
+	rm -rf debian/kdesdk-scripts/usr/share/man/py; \
+	rm -rf debian/kdesdk-scripts/usr/share/man/sh; \
+	install -p -D -m644 scripts/kde-buildrc \
+		debian/kdesdk-scripts/usr/share/doc/kdesdk-scripts/kde-buildrc.example
 
--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##*/};\
-			patch -p1 < $$patch ;\
-		done ;\
-		touch patch-stamp ;\
-	fi
-
-	# KDE CVS does not have aclocal.m4 or configure
-	# if test ! -f configure; then \
-	# 	$(MAKE) -f admin/Makefile.common ;\
-	# fi
-
-	# Force a rerun of Makefile.common, since the debian patches touch
-	# the Makefile.ams.
-	$(MAKE) -f admin/Makefile.common dist
-
-	# make build directory
-	mkdir $(objdir)
-
-	# run configure with build tree $(objdir)
-	cd $(objdir) && \
-	../configure $(configkde)
-
-	touch configure-stamp
-
-build: build-stamp
-build-stamp: configure-stamp 
-	dh_testdir
-
-	cd $(objdir) && $(MAKE)
-	cd $(objdir) && $(MAKE) check
-
-	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##*/};\
-			patch -p1 -R < $$patch ;\
-		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
-
-	# Install testkspy.
-	$(INSTALL_BIN) $(objdir)/kspy/.libs/testkspy debian/tmp/usr/bin
-
-	# Generate HTML docs.
-	for i in `find debian/tmp/usr/share/doc -name "index.docbook"`; do \
-	  ( cd `dirname $$i`; meinproc `basename $$i` ); \
-	done
-
-	# Install miscellaneous docs.
-	$(INSTALL_DIR) debian/tmp/usr/share/doc/kdesdk-misc
-	$(INSTALL_FILE) kdeaccounts-plugin/README \
-	  debian/tmp/usr/share/doc/kdesdk-misc/README.kdeaccounts-plugin
-	$(INSTALL_FILE) kioslave/svn/AUTHORS \
-	  debian/tmp/usr/share/doc/kdesdk-misc/AUTHORS.kioslave-svn
-	$(INSTALL_FILE) kioslave/svn/README \
-	  debian/tmp/usr/share/doc/kdesdk-misc/README.kioslave-svn
-	$(INSTALL_FILE) kprofilemethod/README \
-	  debian/tmp/usr/share/doc/kdesdk-misc/README.kprofilemethod
-	$(INSTALL_FILE) scheck/README \
-	  debian/tmp/usr/share/doc/kdesdk-misc/README.scheck
-
-	$(INSTALL_DIR) debian/tmp/usr/share/doc/kdesdk-scripts
-	$(INSTALL_FILE) scripts/kde-buildrc \
-	  debian/tmp/usr/share/doc/kdesdk-scripts/kde-buildrc.example
-
-	# Split into separate binary packages.
-	dh_install --list-missing \
-	  -Xusr/share/man/man1/cvscheck.1
-
-	# Remove spurious CVS directories.
-	rm -rf `find debian/kdesdk-scripts -type d -name CVS`
-
-	# 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 \
-	    cervisia | kapptemplate | kbabel | kcachegrind | kompare | umbrello ) \
-	      DH_OPTIONS='' dh_installchangelogs -p$$pkg $$pkg/ChangeLog ;; \
-	    kbabel-dev ) \
-	      DH_OPTIONS='' dh_installchangelogs -p$$pkg kbabel/ChangeLog ;; \
-	    * ) \
-	      DH_OPTIONS='' dh_installchangelogs -p$$pkg ;; \
-	  esac; \
-	done
-
-	dh_installdocs
-	dh_installexamples
-	dh_installman
-	dh_installmenu
-	dh_installmime
-
-	# Move some incorrectly installed man pages.
-	for pkg in `dh_listpackages`; do \
-	  case "$$pkg" in \
-	    kdesdk-scripts ) \
-	      mv debian/kdesdk-scripts/usr/share/man/pl/man1/kdemangen.1 \
-	        debian/kdesdk-scripts/usr/share/man/man1/kdemangen.pl.1; \
-	      mv debian/kdesdk-scripts/usr/share/man/pl/man1/png2mng.1 \
-	        debian/kdesdk-scripts/usr/share/man/man1/png2mng.pl.1; \
-	      mv debian/kdesdk-scripts/usr/share/man/py/man1/kdelnk2desktop.1 \
-	        debian/kdesdk-scripts/usr/share/man/man1/kdelnk2desktop.py.1; \
-	      mv debian/kdesdk-scripts/usr/share/man/py/man1/zonetab2pot.1 \
-	        debian/kdesdk-scripts/usr/share/man/man1/zonetab2pot.py.1; \
-	      mv debian/kdesdk-scripts/usr/share/man/sh/man1/build-progress.1 \
-	        debian/kdesdk-scripts/usr/share/man/man1/build-progress.sh.1; \
-	      rm -rf debian/kdesdk-scripts/usr/share/man/pl; \
-	      rm -rf debian/kdesdk-scripts/usr/share/man/py; \
-	      rm -rf debian/kdesdk-scripts/usr/share/man/sh; \
-	    ;; \
-	  esac; \
-	done
-
-	dh_strip
-	dh_link
-	dh_compress -X.docbook -X.css -X-license -X.dcl -X.bz2
-	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 \
-	    kbabel | kompare | kspy ) \
-	      DH_OPTIONS='' dh_shlibdeps -p$$pkg \
-	        -ldebian/$$pkg/usr/lib ;; \
-	    cervisia ) \
-	      DH_OPTIONS='' dh_shlibdeps -p$$pkg \
-	        -ldebian/$$pkg/usr/lib:debian/libcvsservice0/usr/lib ;; \
-	    * ) \
-	      DH_OPTIONS='' dh_shlibdeps -p$$pkg ;; \
-	  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
+binary-install/kdesdk-misc::
+	install -p -D -m644 kdeaccounts-plugin/README \
+		debian/kdesdk-misc/usr/share/doc/kdesdk-misc/README.kdeaccounts-plugin
+	install -p -D -m644 kioslave/svn/AUTHORS \
+		debian/kdesdk-misc/usr/share/doc/kdesdk-misc/AUTHORS.kioslave-svn
+	install -p -D -m644 kioslave/svn/README \
+		debian/kdesdk-misc/usr/share/doc/kdesdk-misc/README.kioslave-svn
+	install -p -D -m644 kprofilemethod/README \
+		debian/kdesdk-misc/usr/share/doc/kdesdk-misc/README.kprofilemethod
+	install -p -D -m644 scheck/README \
+		debian/kdesdk-misc/usr/share/doc/kdesdk-misc/README.scheck




More information about the pkg-kde-commits mailing list