File: debianization-documentation.patch

package info (click to toggle)
texmacs 1%3A2.1.4%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 145,080 kB
  • sloc: cpp: 227,393; lisp: 197,386; ansic: 5,395; python: 1,939; makefile: 1,065; sh: 781; perl: 339; xml: 100; awk: 36
file content (134 lines) | stat: -rw-r--r-- 5,428 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Description: debianization-documentation
 Meant to address Debian specific requirements and stuff for documentation.
Origin: debian
Forwarded: not-needed
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2024-07-25

--- a/misc/m4/tm_install.m4
+++ b/misc/m4/tm_install.m4
@@ -63,6 +63,15 @@
   if test "$datarootdir" = '${prefix}/share'; then
     datarootdir='${prefix}/share'
   fi
+  if test "$docrootdir" = ""; then
+    docrootdir='${datarootdir}/doc'
+  fi
+  if test "$docrootdir" = "NONE"; then
+    docrootdir='${datarootdir}/doc'
+  fi
+  if test "$docrootdir" = '${datarootdir}/doc'; then
+    docrootdir='${datarootdir}/doc'
+  fi
   if test "$datadir" = ""; then
     datadir='${prefix}/share'
   fi
@@ -97,11 +106,14 @@
   tmsrc=${curdir}/${tmdir}
   tmbin=${libexecdir}/${DEBIAN_PACKAGE}
   tmdata=${datadir}/${DEBIAN_PACKAGE}
+  tmdoc=${docrootdir}/${DEBIAN_PACKAGE}
   AC_SUBST(tmorig)
+  AC_SUBST(docrootdir)
   AC_SUBST(tmdir)
   AC_SUBST(tmsrc)
   AC_SUBST(tmbin)
   AC_SUBST(tmdata)
+  AC_SUBST(tmdoc)
 
   if test "$DEVEL_RELEASE" = "1"; then
     tm_devel=${PACKAGE}-${DEVEL_VERSION}
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,11 +14,15 @@
 libdir = @libdir@
 bindir = @bindir@
 datarootdir = @datarootdir@
+docrootdir = @docrootdir@
 datadir = @datadir@
 mandir = @mandir@
 tmdir = @tmdir@
 tmbin = @tmbin@
 tmdata = @tmdata@
+tmdoc = @tmdoc@
+tmumandir = documentation
+tmutildir = utilities
 verinfo = ${tmdir}/verinfo.txt
 tm_devel_version = @DEVEL_VERSION@
 tm_devel = @tm_devel@
@@ -117,15 +121,23 @@
 ###############################################################################
 
 LICENSE_CANDIDATE := LICENSE lppl-1.3.txt
+README_CANDIDATE := README README.md ReadMe.txt LisezMoi.txt CONTRIBUTING.md
+XREADME_CANDIDATE := Makefile.lazy src.lazy ps
 
 ALL_LICENSE := $(addprefix $(tmdir)/*/,$(LICENSE_CANDIDATE))
 ALL_LICENSE += $(addprefix $(tmdir)/*/*/,$(LICENSE_CANDIDATE))
 ALL_LICENSE += $(addprefix $(tmdir)/*/*/*/,$(LICENSE_CANDIDATE))
 ALL_LICENSE := $(wildcard $(ALL_LICENSE))
 PLUGINS_ALL := $(wildcard plugins/*)
+PLUGINS_README := $(wildcard $(addprefix plugins/,$(README_CANDIDATE)))
+PLUGINS_README += $(wildcard $(addprefix plugins/*/,$(README_CANDIDATE)))
+PLUGINS_XREADME := $(wildcard $(addprefix plugins/*/,$(XREADME_CANDIDATE)))
 PLUGINS_MAKEFILE := $(wildcard plugins/*/Makefile)
 PLUGINS_COMPILE := $(patsubst %Makefile,%COMPILE,$(PLUGINS_MAKEFILE))
 PLUGINS_CLEAN := $(patsubst %Makefile,%CLEAN,$(PLUGINS_MAKEFILE))
+PLUGINS_WITHDOC := $(patsubst %/doc,%,$(wildcard plugins/*/doc))
+TOOLS_AWK := $(wildcard $(tmdir)/langs/*/*.awk)
+
 
 plugins/%/COMPILE:
 	$(MKDIR) plugins/$*/bin
@@ -171,7 +183,7 @@
 	@echo installed TeXmacs executables in $(DESTDIR)$(tmbin)
 	$(MKDIR) $(DESTDIR)$(tmdata)
 	#$(CP) $(tmdir)/LICENSE $(DESTDIR)$(tmdata)
-	$(CP) $(tmdir)/doc $(DESTDIR)$(tmdata)
+	#$(CP) $(tmdir)/doc $(DESTDIR)$(tmdata)
 	$(CP) $(tmdir)/examples $(DESTDIR)$(tmdata)
 	$(CP) $(tmdir)/fonts $(DESTDIR)$(tmdata)
 	$(CP) $(tmdir)/langs $(DESTDIR)$(tmdata)
@@ -182,15 +194,33 @@
 	$(CP) $(tmdir)/texts $(DESTDIR)$(tmdata)
 	$(RM) $(addprefix $(DESTDIR)$(tmdata)/,$(patsubst $(tmdir)/%,%,$(ALL_LICENSE)))
 	$(RM) $(DESTDIR)$(tmdata)/examples/*/Makefile.in
+	$(RM) $(DESTDIR)$(tmdata)/langs/encoding/*.awk
+	$(RM) -r $(DESTDIR)$(tmdata)/misc/bib
 	$(RM) -r $(DESTDIR)$(tmdata)/misc/latex
 	$(CHMOD) -R go=rX $(DESTDIR)$(tmdata)
 	@echo installed TeXmacs data in $(DESTDIR)$(tmdata)
 	$(CP) plugins $(DESTDIR)$(tmdata)
+	$(RM) $(DESTDIR)$(tmdata)/plugins/*/CMakeLists.txt
 	$(RM) $(DESTDIR)$(tmdata)/plugins/*/Makefile
 	$(RM) -r $(DESTDIR)$(tmdata)/plugins/*/src
 	$(RM) -r $(DESTDIR)$(tmdata)/plugins/*/bin
 	$(RM) -r $(DESTDIR)$(tmdata)/plugins/*/lib
+	$(RM) -r $(DESTDIR)$(tmdata)/plugins/*/doc
+	$(RM) -r $(addprefix $(DESTDIR)$(tmdata)/,$(PLUGINS_README) $(PLUGINS_XREADME))
 	@echo installed TeXmacs plugins data in $(DESTDIR)$(tmdata)/plugins
+	$(MKDIR) $(DESTDIR)$(tmdoc)
+	$(MKDIR) $(addprefix $(DESTDIR)$(tmdoc)/,$(dir $(PLUGINS_README) $(PLUGINS_XREADME)))
+	$(foreach rdm,$(PLUGINS_README) $(PLUGINS_XREADME), $(CP) $(rdm) $(DESTDIR)$(tmdoc)/$(dir $(rdm)) ;)
+	$(MKDIR) $(DESTDIR)$(tmdoc)/$(tmumandir)
+	$(MKDIR) $(DESTDIR)$(tmdoc)/$(tmutildir)
+	$(MKDIR) $(addprefix $(DESTDIR)$(tmdoc)/$(tmumandir)/,$(PLUGINS_WITHDOC))
+	$(MKDIR) $(addprefix $(DESTDIR)$(tmdoc)/$(tmutildir)/,$(sort $(dir $(patsubst $(tmdir)/%,%,$(TOOLS_AWK)))))
+	$(CP) $(tmdir)/doc/about $(DESTDIR)$(tmdoc)/$(tmumandir)
+	$(CP) $(tmdir)/doc/main  $(DESTDIR)$(tmdoc)/$(tmumandir)
+	$(CP) $(tmdir)/doc/devel $(DESTDIR)$(tmdoc)/$(tmumandir)
+	$(foreach pif,$(PLUGINS_WITHDOC), $(CP) $(pif)/doc/* $(DESTDIR)$(tmdoc)/$(tmumandir)/$(pif) ;)
+	$(foreach awk,$(TOOLS_AWK), $(CP) $(awk) $(DESTDIR)$(tmdoc)/$(tmutildir)/$(patsubst $(tmdir)/%,%,$(basename $(awk))) ;)
+	@echo installed TeXmacs documentation in $(DESTDIR)$(tmdoc)
 	$(MKDIR) $(DESTDIR)$(datadir)/pixmaps
 	$(CP) $(tmdir)/misc/pixmaps/TeXmacs.xpm $(DESTDIR)$(datadir)/pixmaps
 	packages/linux/icons.sh install $(tmdir)/misc/images texmacs text-x-texmacs
@@ -221,6 +251,8 @@
 	@echo removed TeXmacs executables from $(tmbin)
 	$(RM) -r $(tmdata)
 	@echo removed TeXmacs data from $(tmdata)
+	$(RM) -r $(tmdoc)
+	@echo removed TeXmacs documentation from $(tmdoc)
 	$(RM) $(datadir)/pixmaps/TeXmacs.xpm
 	packages/linux/mime.sh uninstall $(tmdir)/misc/mime
 	packages/linux/icons.sh uninstall $(tmdir)/misc/images texmacs text-x-texmacs