apparmor: use $(PYTHON3_VERSION)
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Thu, 25 Nov 2021 19:39:15 +0000 (16:39 -0300)
committerEneas U de Queiroz <cotequeiroz@gmail.com>
Thu, 25 Nov 2021 19:49:46 +0000 (16:49 -0300)
Instead of hardcoding the current python version, use PYTHON3_VERSION
from the python package.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
utils/apparmor/Makefile

index 58feeac605079b2d4b205ebd3337c88307811100..6a100aabc085b649eb2468462740b08196726460 100644 (file)
@@ -192,13 +192,13 @@ define Package/apparmor-utils/install
        $(INSTALL_DIR) $(1)/usr/share/apparmor/easyprof/templates $(1)/usr/share/apparmor/easyprof/policygroups
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)-utils/usr/share/apparmor/easyprof/templates/* $(1)/usr/share/apparmor/easyprof/templates/
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)-utils/usr/share/apparmor/easyprof/policygroups/* $(1)/usr/share/apparmor/easyprof/policygroups/
-       $(INSTALL_DIR) $(1)/usr/lib/python3.9/site-packages $(1)/usr/lib/python3.9/site-packages/apparmor $(1)/usr/lib/python3.9/site-packages/apparmor/rule
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)-utils/usr/lib/python3.9/site-packages/*.egg-info \
-               $(1)/usr/lib/python3.9/site-packages/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)-utils/usr/lib/python3.9/site-packages/apparmor/*.py \
-               $(1)/usr/lib/python3.9/site-packages/apparmor/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)-utils/usr/lib/python3.9/site-packages/apparmor/rule/*.py \
-               $(1)/usr/lib/python3.9/site-packages/apparmor/rule
+       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/apparmor $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/apparmor/rule
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)-utils/usr/lib/python$(PYTHON3_VERSION)/site-packages/*.egg-info \
+               $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)-utils/usr/lib/python$(PYTHON3_VERSION)/site-packages/apparmor/*.py \
+               $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/apparmor/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)-utils/usr/lib/python$(PYTHON3_VERSION)/site-packages/apparmor/rule/*.py \
+               $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/apparmor/rule
        $(INSTALL_DIR) $(1)/etc/init.d $(1)/lib/functions
        $(INSTALL_BIN) ./files/apparmor.sh $(1)/lib/functions/
        $(INSTALL_BIN) ./files/apparmor.init $(1)/etc/init.d/apparmor