1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
#!/usr/bin/make -f
CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
refresh-patches:
@dh_testdir
@echo 'refreshing debian/patches:'
@rm -rf '$(CURDIR)'/debian/patches
@mkdir -p '$(CURDIR)'/debian/patches
@cd '$(CURDIR)'/debian/patches && \
git format-patch -N upstream..upstream+patches
@echo .
PATCH_OPTS := -p1 -E --no-backup-if-mismatch
patch: patch-stamp
patch-stamp:
dh_testdir
set -e; [ -f patch-stamp ] || \
for f in `ls -1 debian/patches/*.patch || :`; do \
patch $(PATCH_OPTS) <$$f >/dev/null; \
done
touch $@
unpatch:
dh_testdir
set -e; [ ! -f patch-stamp ] || \
for f in `ls -1r debian/patches/*.patch || :`; do \
patch -R $(PATCH_OPTS) <$$f >/dev/null; \
done
rm -f patch-stamp
build-arch: build-arch-stamp
build-arch-stamp: patch
dh_testdir
./configure --prefix=/usr --with-diffutils
$(MAKE) CFLAGS="$(CFLAGS)"
touch $@
clean: unpatch really-clean
really-clean:
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) -i distclean
dh_clean -XTAGS
install-arch: build-arch
dh_testdir
dh_testroot
dh_prep
$(MAKE) prefix=$(CURDIR)/debian/rcs/usr install
build-indep:
install-indep: build-indep
binary-indep: build-indep install-indep
binary-arch: build-arch install-arch
dh_testdir
dh_testroot
dh_installdocs
dh_installchangelogs ChangeLog
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build build-arch clean binary-arch binary-indep binary install
|