2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Alexander Pyhalov
16 include ..
/..
/..
/make-rules
/shared-macros.mk
18 COMPONENT_NAME
= asciidoc
19 COMPONENT_VERSION
= 9.1.1
21 COMPONENT_SUMMARY
= Text based document generation tool
22 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
23 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
24 COMPONENT_ARCHIVE_HASH
= sha256
:ea39760ac2739496c14002902571592dc2ae2fa673296ec141a9e491d9c11fca
25 COMPONENT_ARCHIVE_URL
= https
://github.com
/asciidoc
/asciidoc-py3
/releases
/download
/$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE
)
26 COMPONENT_PROJECT_URL
= https
://asciidoc.org
/
27 COMPONENT_FMRI
= text
/$(COMPONENT_NAME
)
28 COMPONENT_CLASSIFICATION
= System
/Text Tools
29 COMPONENT_LICENSE
= GPLv2
31 include $(WS_MAKE_RULES
)/common.mk
33 CONFIGURE_ENV
+= PYTHON
=$(PYTHON
)
35 COMPONENT_PRE_CONFIGURE_ACTION
= \
36 ($(CLONEY
) $(SOURCE_DIR
) $(@D
))
38 # pkgdepend doesn't like the first line of a Python script to be:
39 # '#!/usr/bin/env python' so turn it into '#!/usr/bin/python$(PYTHON_VERSION)'
41 COMPONENT_POST_INSTALL_ACTION
+= \
42 $(GSED
) -i
-e
's?env python3?python$(PYTHON_VERSION)?' \
43 $(PROTOUSRBINDIR
)/asciidoc.py
;
44 COMPONENT_POST_INSTALL_ACTION
+= \
45 $(GSED
) -i
-e
's?env python3?python$(PYTHON_VERSION)?' \
46 $(PROTOUSRBINDIR
)/a2x.py
;
48 # AsciiDoc configuration and data files belong in /usr/share, not /etc based
49 # (Following what Oracle does for Solaris
50 CONFIGURE_OPTIONS
+= --sysconfdir
=$(USRSHAREDIR
)
52 COMPONENT_TEST_DIR
= $(@D
)/tests
53 COMPONENT_TEST_ENV_CMD
=
54 COMPONENT_TEST_ENV
= export PATH
=$(@D
):$$PATH;
56 $(PYTHON
) ..
/asciidocapi.py
; \
58 then
print "asciidocapi test passed"; \
59 else print "asciidocapi test failed"; \
61 $(PYTHON
) .
/testasciidoc.py update
--force; \
62 $(PYTHON
) .
/testasciidoc.py run
63 COMPONENT_TEST_TARGETS
=
65 COMPONENT_TEST_TRANSFORMS
+= \
69 '-e "/^[1-9][0-9]: /p" ' \
75 # Manually added dependencies:
76 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
77 PYTHON_REQUIRED_PACKAGES
+= library
/python
/pygments
78 REQUIRED_PACKAGES
+= image
/graphviz
79 REQUIRED_PACKAGES
+= library
/libxml2
80 REQUIRED_PACKAGES
+= library
/libxslt
81 REQUIRED_PACKAGES
+= web
/browser
/w3m
83 # Auto-generated dependencies