All pastes #4720 Raw Edit

forKinni

public text v1 · immutable
#4720 ·published 2005-01-25 17:30 UTC
rendered paste body
#!/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

# This is the debhelper compatability version to use.
export DH_COMPAT=3

# 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)

# C compiler information
CC              = gcc
CFLAGS          = -Wall -g

INSTALL         = install

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL += -s
endif

export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  confflags += --build $(DEB_HOST_GNU_TYPE)
else
  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

include /usr/share/dpatch/dpatch.make
PACKAGE=gnome-system-tools

include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk

configure: patch-stamp configure-stamp
configure-stamp:
	dh_testdir

	./configure $(confflags) \
		--prefix=/usr \
		--exec-prefix=/usr \
		--sysconfdir=/etc \
		--enable-platform-gnome2 \
		--disable-schemas-install

	touch configure-stamp


build: configure build-stamp
build-stamp:
	dh_testdir

	$(MAKE)

	touch build-stamp

clean:: clean-patched unpatch
clean-patched:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	-$(MAKE) distclean

	-rm -f intltool-extract
	-rm -f intltool-merge
	-rm -f intltool-update

	-rm -f src/common/System.directory.in
	-rm -f src/location-manager/Makefile
	-rm -f gnome-system-tools.schemas

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 $(MAKE) install \
		DESTDIR=$(CURDIR)/debian/gnome-system-tools 

binary-indep:
	dh_gencontrol
	dh_md5sums
	dh_builddeb


binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installman
	dh_installinfo
	dh_installchangelogs ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs -V
	dh_installdeb
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure