Package: display-dhammapada

I just finished packaging display-dhammapada for Fedora and so went through 
this package.

1. The man page needs updating as it contains undefined macros and dead links / 
url.

Here are the patches for display-dhammapada.1 :

--- display-dhammapada-0.23/display-dhammapada.1 2003-08-13 11:56:31.000000000 
-0600
+++ display-dhammapada-0.23-fedora/display-dhammapada.1 2012-06-15 
22:00:40.090200049 -0600
@@ -1,6 +1,5 @@
 .\" -*- coding: UTF-8 -*-
-.DD April 13, 2003
-.TH DISPLAY-DHAMMAPADA 1 "late 20th - early 21th century"
+.TH DISPLAY-DHAMMAPADA 1 "April 2003" "0.23" "display-dhammapada man page"
 .SH NAME
 display-dhammapada \- display a verse from the Dhammapada
 .SH SYNOPSIS
@@ -73,7 +72,7 @@

 .fi
 .\" $bash1$ display-dhammapada -r all |perl -0777 -pe 's/\n\s*\n\s*\n/\n%\n/g' 
>~/.kde/share/apps/amor/tips
-.Ed
+.P
 Then start amor K->Toys->Amor, right click on amor animation, select "Options" 
and check "Show random tips".
 .SH FILES
 .I /usr/local/share/display-dhammapada/dhammapada-english-transl.txt
@@ -87,11 +86,12 @@
 .SH AUTHORS
 Program: Copyright \(co 1997-2003 Richard Cepas, placed in the public domain.
 .br
-See http://www.angelfire.com/me/rch/dd.html
+See http://unicode.strangled.net/me/rch/dd.html
 .P
 Richards' English translation of the Dhammapada: Copyright (C) 1993 John
 Richards, Pembrokeshire (UK), permission granted for use here.
-See 
ftp://coombs.anu.edu.au/coombspapers/otherarchives/electronic-buddhist-archives/buddhism-general/e-texts/sutras-translations/dhammapada-english-transl.txt
+./" Old link - See 
ftp://coombs.anu.edu.au/coombspapers/otherarchives/electronic-buddhist-archives/buddhism-general/e-texts/sutras-translations/dhammapada-english-transl.txt
+See http://eawc.evansville.edu/anthology/dhammapada.htm - John Richards 
(19.Oct.1993)
 .P
 Muller's translation of the Dhammapada: Public Domain, used here courtesy of
 Project Gutenberg.

And display-dhammapada.1.in :
--- display-dhammapada-0.23/display-dhammapada.1.in 2003-08-13 
10:23:50.000000000 -0600
+++ display-dhammapada-0.23-fedora/display-dhammapada.1.in 2012-06-15 
22:39:39.631166846 -0600
@@ -1,6 +1,5 @@
 .\" -*- coding: UTF-8 -*-
-.DD April 13, 2003
-.TH DISPLAY-DHAMMAPADA 1 "late 20th - early 21th century"
+.TH DISPLAY-DHAMMAPADA 1 "April 2003" "0.23" "display-dhammapada man page"
 .SH NAME
 display-dhammapada \- display a verse from the Dhammapada
 .SH SYNOPSIS
@@ -73,7 +72,7 @@

 .fi
 .\" $bash1$ display-dhammapada -r all |perl -0777 -pe 's/\n\s*\n\s*\n/\n%\n/g' 
>~/.kde/share/apps/amor/tips
-.Ed
+.P
 Then start amor K->Toys->Amor, right click on amor animation, select "Options" 
and check "Show random tips".
 .SH FILES
 .I /usr/share/display-dhammapada/dhammapada-english-transl.txt
@@ -87,11 +86,12 @@
 .SH AUTHORS
 Program: Copyright \(co 1997-2003 Richard Cepas, placed in the public domain.
 .br
-See http://www.angelfire.com/me/rch/dd.html
+See http://unicode.strangled.net/me/rch/dd.html
 .P
 Richards' English translation of the Dhammapada: Copyright (C) 1993 John
 Richards, Pembrokeshire (UK), permission granted for use here.
-See 
ftp://coombs.anu.edu.au/coombspapers/otherarchives/electronic-buddhist-archives/buddhism-general/e-texts/sutras-translations/dhammapada-english-transl.txt
+.\" Old link - See 
ftp://coombs.anu.edu.au/coombspapers/otherarchives/electronic-buddhist-archives/buddhism-general/e-texts/sutras-translations/dhammapada-english-transl.txt
+See http://eawc.evansville.edu/anthology/dhammapada.htm - John Richards 
(19.Oct.1993)
 .P
 Muller's translation of the Dhammapada: Public Domain, used here courtesy of
-Project Gutenberg.
+Project Gutenberg.

I will add those as attachments.

2. When reviewing the package, the Makefile appears to be intended to be run as 
root. This is sort of outdated as most packaging is done as users using 
fakeroot. I had to patch the Makefile for Fedora, you may wish to review this 
in the .deb

3. You may wish to review the locations of the display-dhammapada .txt files. 
By default , /usr/lib and /usr/local/lib are used. I am not sure if either are 
appropriate, so I moved it to /usr/share

in display-dhammapada.c

#define DPPATHNAME 
"/usr/local/lib/display-dhammapada/dhammapada-english-transl.txt:/usr/lib/display-dhammapada/dhammapada-english-transl.txt:/usr/share/display-dhammapada/dhammapada-english-transl.txt"

#define DPPATHNAME_ALT 
"/usr/local/lib/display-dhammapada/dhammapada-alternate.txt:/usr/lib/display-dhammapada/dhammapada-alternate.txt:/usr/share/display-dhammapada/dhammapada-alternate.txt"

#define DPPATHNAME_PL 
"/usr/local/lib/display-dhammapada/dhammapada-polish-transl.txt:/usr/lib/display-dhammapada/dhammapada-polish-transl.txt:/usr/share/display-dhammapada/dhammapada-polish-transl.txt"

4. I think the file examples/xsession should start with a shee-bang

#! /bin/sh

Thank you
--- display-dhammapada-0.23/display-dhammapada.1	2003-08-13 11:56:31.000000000 -0600
+++ display-dhammapada-0.23-fedora/display-dhammapada.1	2012-06-16 23:59:30.642549277 -0600
@@ -1,6 +1,5 @@
 .\" -*- coding: UTF-8 -*-
-.DD April 13, 2003
-.TH DISPLAY-DHAMMAPADA 1  "late 20th - early 21th century"
+.TH DISPLAY-DHAMMAPADA 1  "April 2003" "0.23" "display-dhammapada man page"
 .SH NAME
 display-dhammapada \- display a verse from the Dhammapada
 .SH SYNOPSIS
@@ -73,12 +72,12 @@
 
 .fi
 .\" $bash1$ display-dhammapada -r all |perl -0777 -pe 's/\n\s*\n\s*\n/\n%\n/g' >~/.kde/share/apps/amor/tips
-.Ed
+.P
 Then start amor K->Toys->Amor, right click on amor animation, select "Options" and check "Show random tips".
 .SH FILES
-.I /usr/local/share/display-dhammapada/dhammapada-english-transl.txt
+.I /usr/share/display-dhammapada/dhammapada-english-transl.txt
 .br
-.I /usr/local/share/display-dhammapada/dhammapada-alternate.txt
+.I /usr/share/display-dhammapada/dhammapada-alternate.txt
 .SH "SEE ALSO"
 .BR xmessage (1),
 .BR tput (1).
@@ -87,11 +86,12 @@
 .SH AUTHORS
 Program: Copyright \(co 1997-2003 Richard Cepas, placed in the public domain.
 .br
-See http://www.angelfire.com/me/rch/dd.html
+See http://unicode.strangled.net/me/rch/dd.html
 .P
 Richards' English translation of the Dhammapada: Copyright (C) 1993 John
 Richards, Pembrokeshire (UK), permission granted for use here.
-See ftp://coombs.anu.edu.au/coombspapers/otherarchives/electronic-buddhist-archives/buddhism-general/e-texts/sutras-translations/dhammapada-english-transl.txt
+.\" Old link - See ftp://coombs.anu.edu.au/coombspapers/otherarchives/electronic-buddhist-archives/buddhism-general/e-texts/sutras-translations/dhammapada-english-transl.txt
+See http://eawc.evansville.edu/anthology/dhammapada.htm - John Richards (19.Oct.1993)
 .P
 Muller's translation of the Dhammapada: Public Domain, used here courtesy of
 Project Gutenberg. 
--- display-dhammapada-0.23/display-dhammapada.1.in	2003-08-13 10:23:50.000000000 -0600
+++ display-dhammapada-0.23-fedora/display-dhammapada.1.in	2012-06-16 23:59:58.276582196 -0600
@@ -1,6 +1,5 @@
 .\" -*- coding: UTF-8 -*-
-.DD April 13, 2003
-.TH DISPLAY-DHAMMAPADA 1  "late 20th - early 21th century"
+.TH DISPLAY-DHAMMAPADA 1  "April 2003" "0.23" "display-dhammapada man page"
 .SH NAME
 display-dhammapada \- display a verse from the Dhammapada
 .SH SYNOPSIS
@@ -73,7 +72,7 @@
 
 .fi
 .\" $bash1$ display-dhammapada -r all |perl -0777 -pe 's/\n\s*\n\s*\n/\n%\n/g' >~/.kde/share/apps/amor/tips
-.Ed
+.P
 Then start amor K->Toys->Amor, right click on amor animation, select "Options" and check "Show random tips".
 .SH FILES
 .I /usr/share/display-dhammapada/dhammapada-english-transl.txt
@@ -87,11 +86,12 @@
 .SH AUTHORS
 Program: Copyright \(co 1997-2003 Richard Cepas, placed in the public domain.
 .br
-See http://www.angelfire.com/me/rch/dd.html
+See http://unicode.strangled.net/me/rch/dd.html
 .P
 Richards' English translation of the Dhammapada: Copyright (C) 1993 John
 Richards, Pembrokeshire (UK), permission granted for use here.
-See ftp://coombs.anu.edu.au/coombspapers/otherarchives/electronic-buddhist-archives/buddhism-general/e-texts/sutras-translations/dhammapada-english-transl.txt
+.\" Old link - See ftp://coombs.anu.edu.au/coombspapers/otherarchives/electronic-buddhist-archives/buddhism-general/e-texts/sutras-translations/dhammapada-english-transl.txt
+See http://eawc.evansville.edu/anthology/dhammapada.htm - John Richards (19.Oct.1993)
 .P
 Muller's translation of the Dhammapada: Public Domain, used here courtesy of
-Project Gutenberg. 
+Project Gutenberg.
--- display-dhammapada-0.23/display-dhammapada.c	2003-08-13 09:41:54.000000000 -0600
+++ display-dhammapada-0.23-fedora/display-dhammapada.c	2012-06-16 19:37:36.442441294 -0600
@@ -14,13 +14,13 @@
 #define max_string_length 278
 #define mark_length 5
 #ifndef DPPATHNAME
-#define DPPATHNAME "/usr/local/lib/display-dhammapada/dhammapada-english-transl.txt:/usr/lib/display-dhammapada/dhammapada-english-transl.txt"
+#define DPPATHNAME "/usr/local/lib/display-dhammapada/dhammapada-english-transl.txt:/usr/lib/display-dhammapada/dhammapada-english-transl.txt:/usr/share/display-dhammapada/dhammapada-english-transl.txt"
 #endif
 #ifndef DPPATHNAME_ALT
-#define DPPATHNAME_ALT "/usr/local/lib/display-dhammapada/dhammapada-alternate.txt:/usr/lib/display-dhammapada/dhammapada-alternate.txt"
+#define DPPATHNAME_ALT "/usr/local/lib/display-dhammapada/dhammapada-alternate.txt:/usr/lib/display-dhammapada/dhammapada-alternate.txt:/usr/share/display-dhammapada/dhammapada-alternate.txt"
 #endif
 #ifndef DPPATHNAME_PL
-#define DPPATHNAME_PL "/usr/local/lib/display-dhammapada/dhammapada-polish-transl.txt:/usr/lib/display-dhammapada/dhammapada-polish-transl.txt"
+#define DPPATHNAME_PL "/usr/local/lib/display-dhammapada/dhammapada-polish-transl.txt:/usr/lib/display-dhammapada/dhammapada-polish-transl.txt:/usr/share/display-dhammapada/dhammapada-polish-transl.txt"
 #endif
 #ifndef NO_LOCALE
 #include <locale.h>
--- display-dhammapada-0.23/Makefile	2003-08-13 11:56:22.000000000 -0600
+++ display-dhammapada-0.23-fedora/Makefile	2012-06-16 14:33:06.022289057 -0600
@@ -12,7 +12,7 @@
 # flags for your C compiler:
 OPT = -O2
 WARN = -ansi -Wall -Wno-unused -Wno-parentheses
-CFLAGS = $(OPT) $(WARN) $(DEFS) -I/usr/local/include
+#CFLAGS = $(OPT) $(WARN) $(DEFS) -I/usr/local/include
 # if you get undefined reference to `iconv_open' add this:
 # CFLAGS += -L/usr/local/lib -liconv
 # Or you may get rid off locale support completely:
@@ -20,14 +20,14 @@
 
 # install files with this ownership:
 owner=root
-group=wheel
+group=root
 
 install_own = -o $(owner) -g $$Group
-INSTALL_DATA = install -c    $(install_own) -m 664
+INSTALL_DATA = install -c -m 644
 INSTALL_MAN = $(INSTALL_DATA)
-INSTALL_PROGRAM = install -c -s $(install_own) -m 775
-INSTALL_SCRIPT =  install -c $(install_own) -m 775
-MKDIR = install -d $(install_own) -m 2775
+INSTALL_PROGRAM = install -c -m 755
+INSTALL_SCRIPT =  install -c -m 755
+MKDIR = install -d -m 755
 BIN      = display-dhammapada
 BINshort = dp
 CC      = cc
@@ -44,13 +44,13 @@
 MAN1	= $(Package).1
 #GZIPDOCS = yes
 SRCS    = $(BIN).c $(Package).spec.in Makefile INSTALL
-PREFIX  = /usr/local
+PREFIX  = /usr
 prefix  = ${PREFIX}
 exec_prefix = $(prefix)
 bindir  = $(exec_prefix)/bin
 docsdir  = $(prefix)/share/doc/$(Package)
 examplesdir = $(docsdir)/examples
-mandir  = $(prefix)/man
+mandir  = $(prefix)/share/man
 datadir  = $(prefix)/share/$(Package)
 # relative symlink from docsdir to datadir:
 relDATADIR = ../../$(Package)
@@ -121,6 +121,7 @@
 	$(INSTALL_DATA)		$(DPALT)	$(datadir); \
 	$(INSTALL_DATA)		$(DPPL)		$(datadir); \
 	if [ _$$NODOCS = _ ]; then \
+	    test -e $(mandir)/man1 || $(MKDIR)  $(mandir)/man1; \
 	    $(INSTALL_MAN)		$(MAN1)	$(mandir)/man1; \
 	    test -e $(docsdir) || $(MKDIR)	$(docsdir); \
 	    for f in $(DOCS); do \

Reply via email to