From 12d20b461aec127a22daa4b633eca0064167ac1d Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Thu, 22 Jun 2017 22:08:35 +0100 Subject: debian/rules: clean up rules + split into multiple .debhelper files --- debian/changelog | 1 + debian/contrib/figlet.el | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ debian/contrib/moolets | 13 +++++++++++ debian/examples/moolets | 13 ----------- debian/figlet.el | 56 ------------------------------------------------ debian/figlet.examples | 1 + debian/figlet.install | 1 + debian/rules | 5 ++--- 8 files changed, 74 insertions(+), 72 deletions(-) create mode 100644 debian/contrib/figlet.el create mode 100755 debian/contrib/moolets delete mode 100755 debian/examples/moolets delete mode 100644 debian/figlet.el create mode 100644 debian/figlet.examples create mode 100644 debian/figlet.install diff --git a/debian/changelog b/debian/changelog index ce0ac4e..6622457 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ figlet (2.2.5-3) UNRELEASED; urgency=low * debian/rules: add hardening=+all to DEB_BUILD_MAINT_OPTIONS * debian/control: minor fixes to package description; s/figlet/FIGlet/g * Install figlet.el emacs file using dh_installemacsen (closes: #807297) + * debian/rules: clean up rules + split into multiple .debhelper files -- Jonathan McCrohan Tue, 18 Dec 2012 22:44:16 +0000 diff --git a/debian/contrib/figlet.el b/debian/contrib/figlet.el new file mode 100644 index 0000000..a59e4df --- /dev/null +++ b/debian/contrib/figlet.el @@ -0,0 +1,56 @@ +;; filename: figlet.el +;; Kirby Files, 9/18/94. kfiles@bbn.com +;; add font completion: James LewisMoss 27 Oct 2000, dres@debian.org +;; feel free to modify and distribute; there's not a lot here. +;; call M-x figlet-message to insert a large ascii text in your buffer. +;; Current option is to center text. Feel free to change this if you'd +;; like. +(defvar fig-options "-c") + +(setq save-eval-depth max-lisp-eval-depth) +(setq max-lisp-eval-depth 1000) + +(defun collapse-lists (da-list) + (cond ((stringp da-list) (list da-list)) + ((null da-list) nil) + (t (append (collapse-lists (car da-list)) + (collapse-lists (cdr da-list)))))) + +(defun generate-figlet-font-list (loc-list) + "Generate a list of figlet fonts." + (mapcar + '(lambda (element) + (cons element nil)) + (mapcar + '(lambda (one-file) + (let ((point (string-match ".flf" one-file))) + (substring one-file 0 point))) + (collapse-lists + (mapcar + '(lambda (dir-string) + (directory-files (expand-file-name dir-string) + nil ".*\.flf")) + loc-list))))) + +;; replace this with "figlet -I2" to get the default font dir +(defvar fig-font-locations '("/usr/share/figlet")) + +(defvar fig-font-list (generate-figlet-font-list fig-font-locations)) + +(defun figlet-message () + "Inserts large message of text in ASCII font into current buffer" + (interactive "*") + (setq str (read-from-minibuffer "Enter message: ")) + (setq font + (completing-read "Which font: " fig-font-list nil t)) + ;; If the user enters nothing then font is empty string "". + ;; Omit the -f option in that case, giving figlet's default font. + (let ((args (append (and (not (equal font "")) (list "-f" font)) + (list fig-options str)))) + (apply 'call-process "figlet" nil t t args)) + (message "Done printing")) + + +(setq max-lisp-eval-depth save-eval-depth) + +(provide 'figlet) diff --git a/debian/contrib/moolets b/debian/contrib/moolets new file mode 100755 index 0000000..3e0b74e --- /dev/null +++ b/debian/contrib/moolets @@ -0,0 +1,13 @@ +#!/bin/sh + +# Prints "Moo" using every font installed on /usr/share/figlet +# Written by Sandro Tosi +# Modified by Jonathan McCrohan + +for file in /usr/share/figlet/*.flf ; do + FONT=`basename $file | sed 's|\(.*\)\.\(.*\)|\1|'` + + printf "Font: $FONT\n" + figlet -f $FONT Moo + printf "\n" +done diff --git a/debian/examples/moolets b/debian/examples/moolets deleted file mode 100755 index 3e0b74e..0000000 --- a/debian/examples/moolets +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# Prints "Moo" using every font installed on /usr/share/figlet -# Written by Sandro Tosi -# Modified by Jonathan McCrohan - -for file in /usr/share/figlet/*.flf ; do - FONT=`basename $file | sed 's|\(.*\)\.\(.*\)|\1|'` - - printf "Font: $FONT\n" - figlet -f $FONT Moo - printf "\n" -done diff --git a/debian/figlet.el b/debian/figlet.el deleted file mode 100644 index a59e4df..0000000 --- a/debian/figlet.el +++ /dev/null @@ -1,56 +0,0 @@ -;; filename: figlet.el -;; Kirby Files, 9/18/94. kfiles@bbn.com -;; add font completion: James LewisMoss 27 Oct 2000, dres@debian.org -;; feel free to modify and distribute; there's not a lot here. -;; call M-x figlet-message to insert a large ascii text in your buffer. -;; Current option is to center text. Feel free to change this if you'd -;; like. -(defvar fig-options "-c") - -(setq save-eval-depth max-lisp-eval-depth) -(setq max-lisp-eval-depth 1000) - -(defun collapse-lists (da-list) - (cond ((stringp da-list) (list da-list)) - ((null da-list) nil) - (t (append (collapse-lists (car da-list)) - (collapse-lists (cdr da-list)))))) - -(defun generate-figlet-font-list (loc-list) - "Generate a list of figlet fonts." - (mapcar - '(lambda (element) - (cons element nil)) - (mapcar - '(lambda (one-file) - (let ((point (string-match ".flf" one-file))) - (substring one-file 0 point))) - (collapse-lists - (mapcar - '(lambda (dir-string) - (directory-files (expand-file-name dir-string) - nil ".*\.flf")) - loc-list))))) - -;; replace this with "figlet -I2" to get the default font dir -(defvar fig-font-locations '("/usr/share/figlet")) - -(defvar fig-font-list (generate-figlet-font-list fig-font-locations)) - -(defun figlet-message () - "Inserts large message of text in ASCII font into current buffer" - (interactive "*") - (setq str (read-from-minibuffer "Enter message: ")) - (setq font - (completing-read "Which font: " fig-font-list nil t)) - ;; If the user enters nothing then font is empty string "". - ;; Omit the -f option in that case, giving figlet's default font. - (let ((args (append (and (not (equal font "")) (list "-f" font)) - (list fig-options str)))) - (apply 'call-process "figlet" nil t t args)) - (message "Done printing")) - - -(setq max-lisp-eval-depth save-eval-depth) - -(provide 'figlet) diff --git a/debian/figlet.examples b/debian/figlet.examples new file mode 100644 index 0000000..efa499a --- /dev/null +++ b/debian/figlet.examples @@ -0,0 +1 @@ +debian/contrib/moolets diff --git a/debian/figlet.install b/debian/figlet.install new file mode 100644 index 0000000..cbb9f42 --- /dev/null +++ b/debian/figlet.install @@ -0,0 +1 @@ +debian/contrib/figlet.el usr/share/emacs/site-lisp diff --git a/debian/rules b/debian/rules index 592b27c..2a6b6a0 100755 --- a/debian/rules +++ b/debian/rules @@ -5,13 +5,12 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all +# rename figlet to figlet-figlet to free up figlet for alternatives override_dh_auto_install: dh_auto_install mv debian/figlet/usr/bin/figlet debian/figlet/usr/bin/figlet-figlet - dh_installdirs /usr/share/emacs/site-lisp - dh_install debian/figlet.el /usr/share/emacs/site-lisp - dh_installexamples debian/examples/moolets +# rename figlet.6 to figlet-figlet.6 to free up figlet.6 for alternative slave override_dh_installman: dh_installman mv debian/figlet/usr/share/man/man6/figlet.6 debian/figlet/usr/share/man/man6/figlet-figlet.6 -- cgit v1.2.3