Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 6 | Rev 16 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/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/dpatch/dpatch.make

CFLAGS = -pipe -Wall -g -DTMPDIR=\"\\\"/tmp\\\"\"

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

# Overrides for the PMK Makefile stuff
CC=gcc
DESTDIR=$(CURDIR)/debian/pmk

export CFLAGS LDFLAGS CC

configure: configure-stamp
configure-stamp:
        dh_testdir
        ./pmkcfg.sh -p /usr
        touch configure-stamp

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

        # Add here commands to compile the package.
        $(MAKE)
        touch build-stamp

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

        # Add here commands to clean up after the build process.
        -$(MAKE) distclean
        rm -f configure-stamp
        dh_clean

install: build-stamp
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs

        # Add here commands to install the package into debian/pmk.
        $(MAKE) install DESTDIR=$(DESTDIR) MANDIR=/usr/share/man

binary-indep: install

# Build architecture-dependent files here.
binary-arch: install
        dh_testdir
        dh_testroot
        dh_installchangelogs Changelog
        dh_installdocs
        dh_installexamples
        dh_installman
        find $(DESTDIR)/usr/share/man -type f | \
          xargs -r sed -i -e '$$!b' -e '/^\.$$/d'
        dh_link
        dh_strip
        dh_compress
        dh_fixperms
        chmod -x $(DESTDIR)/usr/share/doc/pmk/examples/tests/plang_test.c
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
        dh_md5sums
        dh_builddeb

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