diff options
author | sabetts <sabetts> | 2000-12-16 22:03:48 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2000-12-16 22:03:48 +0000 |
commit | accc0050e2c972244878f72a9b265223f09d6483 (patch) | |
tree | d456704397ed4cc859fe1d68012df578223b037e /debian/rules | |
parent | 52d00ac0d9d32cbfd4d2e09dbdf91ca341e99c4d (diff) | |
download | ratpoison-accc0050e2c972244878f72a9b265223f09d6483.zip |
debianization
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..1ef40f8 --- /dev/null +++ b/debian/rules @@ -0,0 +1,110 @@ +#!/usr/bin/make -f +# by Gergely Nagy <8@free.bsd.hu> +# patch and unpatch based on debian/rules.d/patch.mk in glibc-2.1.95-1 + +export DH_COMPAT=2 +CFLAGS = -O2 +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif + +configure: patch configure-stamp +configure-stamp: + dh_testdir + CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man + touch configure-stamp + +patch: patch-stamp +patch-stamp: + test -d debian/patched || install -d debian/patched + @echo "Patches applied in the Debian version of ratpoison:" > $@T + @for patch in `cat debian/patches/00list`; do \ + stamp=debian/patched/$$patch.dpatch; \ + patch=debian/patches/$$patch.dpatch; \ + test -x $$patch || chmod +x $$patch; \ + if test -f $$stamp; then \ + echo "$$patch already applied."; \ + echo -e "\n$$patch:" >> $@T; \ + sed -n 's/^# *DP: */ /p' $$patch >> $@T; \ + else \ + echo "trying to apply patch $$patch..."; \ + if $$patch -patch >$$stamp.new 2>&1; then \ + mv $$stamp.new $$stamp; \ + touch $$stamp; \ + echo -e "\n$$patch:" >> $@T; \ + sed -n 's/^# *DP: */ /p' $$patch >> $@T; \ + else \ + echo "error in applying $$patch patch."; \ + exit 1; \ + fi; \ + fi; \ + done + mv -f $@T $@ + +unpatch: + @for patch in `tac debian/patches/00list`; do \ + stamp=debian/patched/$$patch.dpatch; \ + patch=debian/patches/$$patch.dpatch; \ + test -x $$patch || chmod +x $$patch; \ + if test -f $$stamp; then \ + echo "trying to revert patch $$patch..."; \ + if $$patch -unpatch; then \ + echo "reverted $$patch patch."; \ + rm -f $$stamp; \ + else \ + echo "error in reverting $$patch patch."; \ + exit 1; \ + fi; \ + fi; \ + done + rm -f patch-stamp + +build: configure build-stamp +build-stamp: + dh_testdir + $(MAKE) + touch build-stamp + +clean: clean1 unpatch +clean1: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp patch-stamp + -$(MAKE) distclean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) install prefix=`pwd`/debian/`dh_listpackages`/usr + +binary-indep: build install + +binary-arch: build install + dh_testversion 2.0.89 + dh_testdir + dh_testroot + dh_installdocs + dh_installexamples + dh_installmenu + dh_installmanpages + dh_installinfo + dh_installchangelogs src/ChangeLog + dh_installwm + 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 clean binary-indep binary-arch binary install unpatch \ + clean1 patch configure |