Skip to content

Commit

Permalink
Fix Makefile paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham Pugh committed Jan 20, 2020
1 parent f481f68 commit 22ed802
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion JSSImporter.py
Expand Up @@ -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
Expand Down
26 changes: 13 additions & 13 deletions Makefile
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion pkg/jssimporter/.gitignore
Expand Up @@ -5,5 +5,5 @@
build/

# package products
payload/Library/Application Support/JSSImporter/*
payload/Library/AutoPkg/JSSImporter/*
payload/Library/AutoPkg/autopkglib/*
7 changes: 3 additions & 4 deletions 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

0 comments on commit 22ed802

Please sign in to comment.