From 22ed80212ed0be93eb66ed37eb3066f53aa7106e Mon Sep 17 00:00:00 2001 From: Graham Pugh Date: Mon, 20 Jan 2020 15:59:55 +0100 Subject: [PATCH] Fix Makefile paths --- CHANGELOG.md | 1 + JSSImporter.py | 2 +- Makefile | 26 +++++++++++++------------- pkg/jssimporter/.gitignore | 2 +- pkg/jssimporter/Bom.txt | 7 +++---- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dfe497..469e351 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. This projec ### Added - Retained compatibility with AutoPkg 1.x (Python 2) while adding compatibility for AutoPkg 2.x (Python 3). +- Moved supporting files from `/Library/Application Support/JSSImporter` to `/Library/AutoPkg/JSSImporter`. ## [1.0.3] - 2019-10-04 diff --git a/JSSImporter.py b/JSSImporter.py index 17776c9..dde1fd5 100644 --- a/JSSImporter.py +++ b/JSSImporter.py @@ -32,7 +32,7 @@ sys.modules['_elementtree'] = None ElementTree = importlib.import_module('xml.etree.ElementTree') -sys.path.insert(0, '/Library/Application Support/JSSImporter') +sys.path.insert(0, '/Library/AutoPkg/JSSImporter') import jss # Ensure that python-jss dependency is at minimum version diff --git a/Makefile b/Makefile index d2a36f1..e65e2b1 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,10 @@ PKG_BUILD := $(CURDIR)/pkg/jssimporter/build PKG_VERSION := $(shell defaults read $(CURDIR)/pkg/jssimporter/build-info.plist version) JSS_GIT_ROOT := $(abspath $(CURDIR)/../python-jss) -objects = "$(PKG_ROOT)/Library/Application Support/JSSImporter/requests" \ - "$(PKG_ROOT)/Library/Application Support/JSSImporter/boto" \ +objects = "$(PKG_ROOT)/Library/AutoPkg/JSSImporter/requests" \ + "$(PKG_ROOT)/Library/AutoPkg/JSSImporter/boto" \ $(PKG_ROOT)/Library/AutoPkg/autopkglib/JSSImporter.py \ - "$(PKG_ROOT)/Library/Application Support/JSSImporter/jss" + "$(PKG_ROOT)/Library/AutoPkg/JSSImporter/jss" default : $(PKG_BUILD)/jssimporter-$(PKG_VERSION).pkg @@ -19,16 +19,16 @@ $(PKG_BUILD)/jssimporter-$(PKG_VERSION).pkg: $(objects) cd $(CURDIR)/pkg && $(MUNKIPKG) jssimporter -"$(PKG_ROOT)/Library/Application Support/JSSImporter/boto": +"$(PKG_ROOT)/Library/AutoPkg/JSSImporter/boto": @echo "Installing boto into JSSImporter support directory" - #pip install --install-option="--prefix=$(PKG_ROOT)/Library/Application Support/JSSImporter/boto" --ignore-installed boto - pip install --target "$(PKG_ROOT)/Library/Application Support/JSSImporter" --ignore-installed boto + #pip install --install-option="--prefix=$(PKG_ROOT)/Library/AutoPkg/JSSImporter/boto" --ignore-installed boto + pip3 install --target "$(PKG_ROOT)/Library/AutoPkg/JSSImporter" --ignore-installed boto -"$(PKG_ROOT)/Library/Application Support/JSSImporter/requests": +"$(PKG_ROOT)/Library/AutoPkg/JSSImporter/requests": @echo "Installing requests into JSSImporter support directory" - #pip install --install-option="--prefix=$(PKG_ROOT)/Library/Application Support/JSSImporter/requests" --ignore-installed requests - pip install --target "$(PKG_ROOT)/Library/Application Support/JSSImporter" --ignore-installed requests + #pip install --install-option="--prefix=$(PKG_ROOT)/Library/AutoPkg/JSSImporter/requests" --ignore-installed requests + pip3 install --target "$(PKG_ROOT)/Library/AutoPkg/JSSImporter" --ignore-installed requests $(PKG_ROOT)/Library/AutoPkg/autopkglib/JSSImporter.py: @@ -38,14 +38,14 @@ $(PKG_ROOT)/Library/AutoPkg/autopkglib/JSSImporter.py: chmod 755 "$(PKG_ROOT)/Library/AutoPkg/autopkglib/JSSImporter.py" -"$(PKG_ROOT)/Library/Application Support/JSSImporter/jss": +"$(PKG_ROOT)/Library/AutoPkg/JSSImporter/jss": @echo "Installing python-jss" - mkdir -p "$(PKG_ROOT)/Library/Application Support/JSSImporter" - cp -Rf "$(JSS_GIT_ROOT)/jss" "$(PKG_ROOT)/Library/Application Support/JSSImporter" + mkdir -p "$(PKG_ROOT)/Library/AutoPkg/JSSImporter" + cp -Rf "$(JSS_GIT_ROOT)/jss" "$(PKG_ROOT)/Library/AutoPkg/JSSImporter" .PHONY : clean clean : @echo "Cleaning up package root" rm $(PKG_ROOT)/Library/AutoPkg/autopkglib/JSSImporter.py - rm -rf "$(PKG_ROOT)/Library/Application Support/JSSImporter/"* + rm -rf "$(PKG_ROOT)/Library/AutoPkg/JSSImporter/"* rm $(CURDIR)/pkg/jssimporter/build/*.pkg diff --git a/pkg/jssimporter/.gitignore b/pkg/jssimporter/.gitignore index 6f1d9bc..c0afea6 100644 --- a/pkg/jssimporter/.gitignore +++ b/pkg/jssimporter/.gitignore @@ -5,5 +5,5 @@ build/ # package products -payload/Library/Application Support/JSSImporter/* +payload/Library/AutoPkg/JSSImporter/* payload/Library/AutoPkg/autopkglib/* diff --git a/pkg/jssimporter/Bom.txt b/pkg/jssimporter/Bom.txt index 0d4beff..2b47b47 100644 --- a/pkg/jssimporter/Bom.txt +++ b/pkg/jssimporter/Bom.txt @@ -1,8 +1,7 @@ . 40755 0/0 ./Library 41775 0/80 -./Library/Application Support 40755 0/80 -./Library/Application Support/JSSImporter 40755 0/80 -./Library/Application Support/JSSImporter/jss 40755 0/80 +./Library/AutoPkg 40755 0/80 +./Library/AutoPkg/JSSImporter 40755 0/80 +./Library/AutoPkg/JSSImporter/jss 40755 0/80 ./Library/AutoPkg 40755 0/80 ./Library/AutoPkg/autopkglib 40755 0/80 -