#!/usr/bin/make -f #export DH_VERBOSE=1 # Set architecture variables for cross-compiling and for saving the configure # script from having to guess our platform (since we know it already) # Also sets multiarch lib vars include /usr/share/dpkg/architecture.mk configure_flags = --prefix=/usr/share \ --exec-prefix=/usr \ --mandir=/usr/share/man \ --with-x \ --host=$(DEB_HOST_GNU_TYPE) ifeq ($(DEB_HOST_ARCH_OS),linux) configure_flags += --enable-gpm else # libgpm is not supported by non-linux architectures: #345268 #95843 configure_flags += --disable-gpm endif ifneq ($(DEB_HOST_ARCH_OS),hurd) configure_flags += --enable-xft else # The xrender extension is not supported on the hurd: #95843 configure_flags += --disable-xft endif #to successfully build with a multiarch slang we need to explicitly specify #include and library directories. configure_flags += --with-slanglib=/usr/lib/$(DEB_HOST_MULTIARCH) --with-slanginc=/usr/include export DEB_BUILD_MAINT_OPTIONS = hardening=+all debdir = $(CURDIR)/debian comdir = $(debdir)/jed-common shrdir = $(comdir)/usr/share jeddir = $(shrdir)/jed docdir = $(jeddir)/doc tmpdir = $(debdir)/tmp mandir = $(tmpdir)/usr/share/man/man1 export AUTOHEADER = true %: dh $@ --no-parallel execute_after_dh_autoreconf: mv autoconf/configure . override_dh_auto_configure: dh_auto_configure -- $(configure_flags) override_dh_auto_build-arch: dh_auto_build -- jed xjed override_dh_auto_build-indep: mkdir -p html cp doc/manual/jed.tex html cd html ; \ hevea -fix -o jed.hevea jed.tex ; \ hacha jed.hevea ; \ rm jed.hevea jed.haux jed.htoc jed.tex override_dh_auto_install: # Empty target. The installation is done by the targets # override_dh_install-{arch,indep} override_dh_install-arch: $(MAKE) -C src DESTDIR=$(tmpdir) install_bin dh_install -a # Create the manual page for xjed cp doc/manual/jed.1 doc/manual/xjed.1 # Fix dh_missing rm -rf $(tmpdir)/usr/bin/jed-script override_dh_install-indep: $(MAKE) -C src DESTDIR=$(tmpdir) JED_MAN_FILES= install_data dh_install -i mkdir -p $(jeddir)/compile install $(debdir)/compile $(jeddir)/compile/jed-common rm -rf $(docdir)/manual execute_after_dh_installdocs-indep: # Fix package-contains-documentation-outside-usr-share-doc rm -f $(jeddir)/lib/colors/README override_dh_compress: dh_compress --exclude=.txt execute_after_dh_installinfo-indep: # Fix info-document-has-wrong-extension cd $(shrdir)/info && \ for i in 1 2 3; do mv jed.$${i}in jed.info-$$i; done && \ sed -i '/jed\..in/s/jed\.\([123]\)in/jed.info-\1/' jed.info execute_after_dh_auto_test-arch: $(MAKE) -C src runtests execute_before_dh_installdeb: for p in jed xjed ; do \ priority_editor=$$(test $$p = jed && echo 42 || echo 35) ; \ priority_jed_script=$$(test $$p = jed && echo 50 || echo 40) ; \ for s in prerm postinst ; do \ sed "s/#PROG#/$$p/g; \ s/#PRIORITY-EDITOR#/$$priority_editor/g; \ s/#PRIORITY-JED-SCRIPT#/$$priority_jed_script/g;" \ < $(debdir)/$$s.in > $(debdir)/$$p.$$s ; \ done ; \ cp $(debdir)/triggers.in $(debdir)/$$p.triggers ; \ done