| 1 |
Description: strip unused scripts and targets from installation |
| 2 |
By default, the upstream Makefile installs Python scripts in a very |
| 3 |
non-standard way to a very non-standard location. Since these are not required |
| 4 |
for building dictionaries, they are not installed with this package. This also |
| 5 |
removes the Make targets to invoke them. |
| 6 |
Author: Sebastian Humenda <[email protected]> |
| 7 |
Last-Update: 2020-12-31 |
| 8 |
|
| 9 |
Index: freedict-tools/Makefile |
| 10 |
=================================================================== |
| 11 |
--- freedict-tools.orig/Makefile |
| 12 |
+++ freedict-tools/Makefile |
| 13 |
@@ -10,37 +10,13 @@ PREFIX ?= usr |
| 14 |
DESTDIR ?= |
| 15 |
INSTALLDIR ?= $(abspath $(DESTDIR)/$(PREFIX)/share/freedict) |
| 16 |
|
| 17 |
-dirs = api JMdict lib mk xquery xsl/inc |
| 18 |
+dirs = JMdict lib mk xquery xsl/inc |
| 19 |
TARGET_INSTALL_DIRS = $(addprefix $(INSTALLDIR)/tools/, $(dirs)) |
| 20 |
|
| 21 |
|
| 22 |
-api: #! generate the api with information about all dictionaries and their downloads at the configured api path |
| 23 |
-api: |
| 24 |
- $(call mount_or_reuse); \ |
| 25 |
- $(call exc_pyscript,fd_api) || sleep 1; \ |
| 26 |
- $(call umount_or_keep) |
| 27 |
- @$(MAKE) -C $(FREEDICT_TOOLS) --no-print-directory api-validation |
| 28 |
- |
| 29 |
-# allow retrieval of API path from Makefile and from rule below |
| 30 |
-get_api_path=$(call exc_pyscript,fd_file_mgr,-a) | tr -d '\n' |
| 31 |
-api-path: #! print the output directory to the generated API file (read from configuration) (trailing newline is removed) |
| 32 |
- @$(call get_api_path) |
| 33 |
- |
| 34 |
-api-validation: #! validate the freedict-database.xml against its RNG schema |
| 35 |
- xmllint --noout --relaxng freedict-database.rng $(shell $(call get_api_path))/freedict-database.xml |
| 36 |
- |
| 37 |
- |
| 38 |
- |
| 39 |
- |
| 40 |
mount: #! mount or synchronize FreeDict releases / generated dictionaries |
| 41 |
$(call exc_pyscript,fd_file_mgr,-m) |
| 42 |
|
| 43 |
-need-update: #! queries for unreleased dictionaries or for those with newer source changes |
| 44 |
- @$(call mount_or_reuse); \ |
| 45 |
- $(call exc_pyscript,fd_api,-n)\ |
| 46 |
- || sleep 1; \ |
| 47 |
- $(call umount_or_keep) |
| 48 |
- |
| 49 |
umount: #! runs umount / clean up actions for unmounting remote volumes (if SSH is used) |
| 50 |
@$(call exc_pyscript,fd_file_mgr,-u) |
| 51 |
|
| 52 |
@@ -146,9 +122,8 @@ mk_venv: #! initialise a new (Python) vi |
| 53 |
fi |
| 54 |
|
| 55 |
# NOTE: the directories below HAVE to be on one line |
| 56 |
-INSTALL_DIRS := api api/generator api/file_manager api/generator/apigen mk xquery xsl/inc |
| 57 |
-INSTALL_PATHS := $(wildcard api/*.py api/generator/*.py api/generator/apigen/*.py api/file_manager/*.py \ |
| 58 |
- freedict-database.rng \ |
| 59 |
+INSTALL_DIRS := mk xquery xsl/inc |
| 60 |
+INSTALL_PATHS := $(wildcard freedict-database.rng \ |
| 61 |
mk/*.mk xsl/inc/* \ |
| 62 |
xquery/* xsl/tei2c5.xsl) |
| 63 |
install: #! install the tools to $$DESTDIR/$PREFIX/share/freedict (default /usr/local/share/freedict) |
| 64 |
@@ -173,4 +148,4 @@ release: $(BUILD_DIR)/freedict-tools-$(V |
| 65 |
release-path: #! print the output directory to which releases are deployed (read from configuration); trailing newline is removed |
| 66 |
@$(call exc_pyscript,fd_file_mgr,-r) | tr -d '\n' |
| 67 |
|
| 68 |
-.PHONY: release install api all mount umount api-validation |
| 69 |
+.PHONY: release install all mount umount |