2
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
3
# Some lines taken from debmake, by Cristoph Lameter.
5
# Uncomment this to turn on verbose mode.
8
debian_patches = libintl.h morefunctions doc-update
12
TMP = `pwd`/debian/liblocale-gettext-perl
14
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
17
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
24
build-stamp: patched-stamp
28
# Add here commands to compile the package.
29
perl Makefile.PL INSTALLDIRS=vendor
30
$(MAKE) OPTIMIZE="-Wall $(CFLAGS)"
37
rm -f build-stamp install-stamp
39
# Add here commands to clean up after the build process.
43
debian/rules reverse-patches
45
install: install-stamp
46
install-stamp: build-stamp
52
# Add here commands to install the package into debian/tmp.
53
$(MAKE) install PREFIX=$(TMP)/usr
58
# Build architecture-independent files here.
59
binary-indep: build install
60
# We have nothing to do by default.
62
# Build architecture-dependent files here.
63
binary-arch: build install
88
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
90
binary: binary-indep binary-arch
91
.PHONY: build clean binary-indep binary-arch binary
93
# ---------------------------------------------------------------------------
94
# various rules to unpack addons and (un)apply patches.
95
# borrowed from egcs package
97
patch_dir = debian/patches
99
apply-patches: patched-stamp
101
@for stamp in none patched-*; do \
102
case "$$stamp" in none|patched-stamp|patched-\*) continue; esac; \
103
patch=`echo $$stamp | sed -e 's/patched-//'`; \
104
echo "trying to revert patch $$patch ..."; \
105
if [ -x $(patch_dir)/$$patch.dpatch ]; then true; else \
106
chmod +x $(patch_dir)/$$patch.dpatch; fi; \
107
if $(patch_dir)/$$patch.dpatch -unpatch; then \
108
echo "reverted $$patch patch."; \
111
echo "error in reverting $$patch patch."; \
117
patched-%: $(patch_dir)/%.dpatch
118
@if [ -x $< ]; then true; else chmod +x $<; fi
119
@if [ -f $@ ]; then \
120
echo "$* patches already applied."; exit 1; \
123
@echo "$* patches applied." > $@
125
patched-stamp: $(foreach p,$(debian_patches),patched-$(p))
126
@echo -e "\nPatches applied:" >> pxxx
127
@for i in none $(debian_patches); do \
128
if [ -r debian/patches/$$i.dpatch ]; then \
129
echo -e "\n$$i:" >> pxxx; \
130
sed -n 's/^# *DP: */ /p' debian/patches/$$i.dpatch >> pxxx; \
133
mv -f pxxx patched-stamp