ffmpeg-6: fix COMPONENT_REVISION
[oi-userland.git] / components / web / apache2-modules / mod_wsgi / Makefile
blob351f093bbadb3f591c61b212e066c40de1012f68
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
23 # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2022 Niklas Poslovski
27 include ../../../../make-rules/shared-macros.mk
29 COMPONENT_NAME= mod_wsgi
30 COMPONENT_VERSION= 4.9.4
31 COMPONENT_REVISION = 2
32 COMPONENT_SUMMARY = mod_wsgi plugin for Apache Web Server v2.4
33 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
34 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
35 COMPONENT_ARCHIVE_HASH= sha256:8e762662ea5b01afc386bbcfbaa079748eb6203ab1d6d3a3dac9237f5666cfc9
36 COMPONENT_ARCHIVE_URL= https://pypi.python.org/packages/source/m/mod_wsgi/$(COMPONENT_ARCHIVE)
37 COMPONENT_PROJECT_URL= https://pypi.python.org/pypi/mod_wsgi/
38 COMPONENT_FMRI = web/server/apache-24/module/apache-wsgi
39 COMPONENT_CLASSIFICATION = Web Services/Application and Web Servers
40 COMPONENT_LICENSE = Apache-2.0
41 COMPONENT_LICENSE_FILE = LICENSE
43 SINGLE_PYTHON_VERSION = no
45 # The following four paragraphs are copied from setup.py.mk
46 # but since mod_wsgi doesn't use setup.py, we can't just include
47 # setup.py.mk
48 define python-rule
49 $(BUILD_DIR)/%-$(1)/.built: PYTHON_VERSION=$(1)
50 $(BUILD_DIR)/%-$(1)/.installed: PYTHON_VERSION=$(1)
51 endef
53 $(foreach pyver, $(PYTHON_VERSIONS), $(eval $(call python-rule,$(pyver))))
55 $(BUILD_DIR)/$(MACH64)-%/.built: BITS=64
56 $(BUILD_DIR)/$(MACH64)-%/.installed: BITS=64
58 BUILD_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built)
59 INSTALL_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed)
61 TEST_TARGET = $(NO_TESTS)
63 include $(WS_MAKE_RULES)/common.mk
65 APACHE_USR_PREFIX = /usr/apache2/2.4
67 # mod_wsgi does not support VPATH builds
68 COMPONENT_PRE_CONFIGURE_ACTION = \
69 ($(CLONEY) $(SOURCE_DIR) $(@D))
71 CONFIGURE_OPTIONS += --with-apxs=$(APACHE_USR_PREFIX)/bin/apxs
72 CONFIGURE_OPTIONS += --with-python=$(PYTHON)
74 # Without this the build is unable to find right C compiler
75 COMPONENT_BUILD_ENV += PATH="$(GCC_BINDIR):$(PATH)"
77 # The following is copied from setup.py.mk and adjusted
78 COMPONENT_POST_INSTALL_ACTION += \
79 for f in $(PROTO_DIR)$(APACHE_USR_PREFIX)/libexec/*.so ; do \
80 [[ -f $$f ]] || continue ; \
81 for v in $(PYTHON_VERSIONS) ; do \
82 [[ "$$f" == "$${f%%$$v.so}" ]] || continue 2 ; \
83 done ; \
84 $(MV) $$f $${f%%.so}-$(PYTHON_VERSION).so ; \
85 done ;
87 # We need to add -$(PYV) to package fmri
88 GENERATE_EXTRA_CMD += | \
89 $(GSED) -e 's/^\(set name=pkg.fmri [^@]*\)\(.*\)$$/\1-$$(PYV)\2/'
91 # Manually added dependencies
92 REQUIRED_PACKAGES += web/server/apache-24
94 # Auto-generated dependencies
95 PYTHON_REQUIRED_PACKAGES += runtime/python
96 REQUIRED_PACKAGES += system/library