components/asciidoc/Makefile
changeset 1510 2a70db54adec
child 1948 2d1537e7942d
equal deleted inserted replaced
1509:9b41420b4385 1510:2a70db54adec
       
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 
       
    22 #
       
    23 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 
       
    26 include ../../make-rules/shared-macros.mk
       
    27 
       
    28 COMPONENT_NAME=		asciidoc
       
    29 COMPONENT_VERSION=	8.6.8
       
    30 COMPONENT_PROJECT_URL=	http://www.methods.co.nz/asciidoc/
       
    31 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    33 COMPONENT_ARCHIVE_HASH= \
       
    34     sha256:ffb67f59dccaf6f15db72fcd04fdf21a2f9b703d31f94fcd0c49a424a9fcfbc4
       
    35 COMPONENT_ARCHIVE_URL=	 http://downloads.sourceforge.net/project/$(COMPONENT_NAME)/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
       
    36 COMPONENT_BUGDB=	utility/asciidoc
       
    37 
       
    38 include ../../make-rules/prep.mk
       
    39 include ../../make-rules/configure.mk
       
    40 include ../../make-rules/ips.mk
       
    41 
       
    42 # AsciiDoc configuration and data files belong in /usr/share, not /etc based
       
    43 # on discussion from ARC pre-review.
       
    44 #
       
    45 CONFIGURE_OPTIONS +=    --sysconfdir=/usr/share
       
    46 
       
    47 # pkgdepend doesn't like the first line of a Python script to be:
       
    48 # '#!/usr/bin/env python' so turn it into '#!/usr/bin/python$(PYTHON_VERSION)'
       
    49 #
       
    50 COMPONENT_POST_INSTALL_ACTION += \
       
    51         $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
       
    52                 $(PROTOUSRBINDIR64)/asciidoc.py;
       
    53 COMPONENT_POST_INSTALL_ACTION += \
       
    54         $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
       
    55                 $(PROTOUSRBINDIR64)/a2x.py;
       
    56 
       
    57 COMPONENT_PRE_CONFIGURE_ACTION = \
       
    58         ($(CLONEY) $(SOURCE_DIR) $(@D))
       
    59 
       
    60 ASLR_MODE = $(ASLR_ENABLE)
       
    61 
       
    62 # common targets
       
    63 build:		$(BUILD_64)
       
    64 
       
    65 install:	$(INSTALL_64)
       
    66 
       
    67 # Tests require image/graphviz to be installed.  Some tests also want to run
       
    68 # programs named latex, lilypad, abc2ly and source-highlight which are not
       
    69 # available on Solaris, so these tests fail.
       
    70 #
       
    71 COMPONENT_PRE_TEST_ACTION = \
       
    72     (cd $(@D); \
       
    73      ln -s asciidoc.py asciidoc; \
       
    74      export PATH=$(@D):$$PATH; \
       
    75      cd tests; \
       
    76      python$(PYTHON_VERSION) ./asciidocapi.py; \
       
    77      if [ $$? -eq 0 ] ; \
       
    78        then print "asciidocapi test passed"; else print "asciidocapi test failed"; \
       
    79      fi; \
       
    80      python$(PYTHON_VERSION) ./testasciidoc.py update; \
       
    81      python$(PYTHON_VERSION) ./testasciidoc.py run; )
       
    82 
       
    83 test:           $(TEST_64)
       
    84 
       
    85 BUILD_PKG_DEPENDENCIES =        $(BUILD_TOOLS)
       
    86 
       
    87 include ../../make-rules/depend.mk