summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--Makefile18
-rw-r--r--README19
-rw-r--r--src/Info.plist6
-rw-r--r--src/icon.pngbin1617 -> 719 bytes
-rwxr-xr-xsrc/index.sh2
6 files changed, 32 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index 9941ba2..6126ef8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
-/GNU_Make.docset
-/GNU_Make.tgz
+/debmake.docset
+/debmake.tgz
/tmp
diff --git a/Makefile b/Makefile
index ac6a91b..554db64 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,9 @@
-DOCSET_NAME = GNU_Automake
+DOCSET_NAME = debmake
+PACKAGE_NAME = debmake-doc
+
+ifndef $(LOCALE)
+ LOCALE=en
+endif
DOCSET_DIR = $(DOCSET_NAME).docset
CONTENTS_DIR = $(DOCSET_DIR)/Contents
@@ -10,8 +15,7 @@ INDEX_FILE = $(RESOURCES_DIR)/docSet.dsidx
ICON_FILE = $(DOCSET_DIR)/icon.png
ARCHIVE_FILE = $(DOCSET_NAME).tgz
-MANUAL_URL = https://www.gnu.org/software/automake/manual/automake.html_node.tar.gz
-MANUAL_FILE = tmp/automake.html_node.tar.gz
+MANUAL_SOURCE = /usr/share/doc/$(PACKAGE_NAME)/html
DOCSET = $(INFO_PLIST_FILE) $(INDEX_FILE) $(ICON_FILE)
@@ -29,7 +33,6 @@ $(ARCHIVE_FILE): $(DOCSET)
tar --exclude='.DS_Store' -czf $@ $(DOCSET_DIR)
$(MANUAL_FILE): tmp
- curl -o $@ $(MANUAL_URL)
$(DOCSET_DIR):
mkdir -p $@
@@ -41,8 +44,13 @@ $(RESOURCES_DIR): $(CONTENTS_DIR)
mkdir -p $@
$(DOCUMENTS_DIR): $(RESOURCES_DIR) $(MANUAL_FILE)
+ifeq (,$(wildcard $(MANUAL_SOURCE)))
+ $(error Missing debmake-doc package)
+endif
mkdir -p $@
- tar -x -z -f $(MANUAL_FILE) -C $@
+ cp -r $(MANUAL_SOURCE)/*.$(LOCALE).* $@
+ cp -r $(MANUAL_SOURCE)/*css $@
+ cp -r $(MANUAL_SOURCE)/images $@
$(INFO_PLIST_FILE): src/Info.plist $(CONTENTS_DIR)
cp src/Info.plist $@
diff --git a/README b/README
index ff57476..f9812d4 100644
--- a/README
+++ b/README
@@ -1,15 +1,22 @@
-Here is a script and a Makefile for generating a GNU Automake docset for Dash. The script is loosely based on benzado's script for GNU Make https://github.com/benzado/gnu-make-dash-docset.
+Here is a script and a Makefile for generating a debmake docset for Dash. It is built from documentation provided by the [debmake-doc](https://salsa.debian.org/debian/debmake-doc) package and provides guides useful for the creation of deb packages. The script is loosely based on benzado's script for GNU Make https://github.com/benzado/gnu-make-dash-docset.
-- GNU Automake: https://www.gnu.org/software/automake/
+- debmake: https://salsa.debian.org/debian/debmake
- Dash: https://kapeli.com/dash
-To generate a docset from the latest edition of the GNU Automake Manual, simply
-execute `make` from the same directory as this README file. The latest edition
-will be downloaded from www.gnu.org and packaged appropriately.
-
Requirements:
- any POSIX-compliant shell
- curl
- make
- sqlite3
+
+In addition, this script is designed to be run on a Debian or Debian-based system where the debmake-doc package can be installed, as the script will check to make sure it can source the docset's html pages from /usr/share/doc/debmake-doc/html
+
+To generate a docset from the the debmake-doc package, simply execute `make` from the same directory as this README file. The version installed on the system will be packaged appropriately. The default locale is English (en). Alternative locales can be specified by executing `make LOCALE=$(locale)` (where $(locale) is the short form, i.e. "en"). The list of supported locales is listed below:
+
+- German (de)
+- English (en)
+- Japanese (jp)
+- Russian (ru)
+- Chinese (China) (zh-cn)
+- Chinese (Taiwan) (zh-tw)
diff --git a/src/Info.plist b/src/Info.plist
index f94b2c9..f2f7339 100644
--- a/src/Info.plist
+++ b/src/Info.plist
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
- <string>gnuautomake</string>
+ <string>debmake</string>
<key>CFBundleName</key>
- <string>GNU Automake</string>
+ <string>debmake</string>
<key>DocSetPlatformFamily</key>
- <string>automake</string>
+ <string>debmake</string>
<key>isDashDocset</key>
<true/>
</dict>
diff --git a/src/icon.png b/src/icon.png
index 9b18522..364a3e8 100644
--- a/src/icon.png
+++ b/src/icon.png
Binary files differ
diff --git a/src/index.sh b/src/index.sh
index f4d898e..be1a508 100755
--- a/src/index.sh
+++ b/src/index.sh
@@ -6,7 +6,7 @@ shift
get_title() {
FILE="$1"
- PATTERN="<title>.*\(automake\).*</title>"
+ PATTERN="<title>.*</title>"
#Find pattern in file
grep -Eo "$PATTERN" "$FILE" |