-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
30 lines (23 loc) · 909 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
SOURCES=$(shell find . -name '*.py')
OUTPUT_PATH=build/plugin.video.ipfs
MY_VAR := $(shell echo whatever)
clean:
rm -rf build
rm -rf dist
build/plugin_video_ipfs.zip: build
rm -f build/plugin_video_ipfs.zip
cd build && zip -r plugin_video_ipfs.zip plugin.video.ipfs
build: $(SOURCES) fanart.jpg icon.png addon.xml resources/settings.xml
sed -i 's/id="plugin.video.ipfs" version="[^"]*"/id="plugin.video.ipfs" version="'$(shell poetry version --short)'"/' addon.xml
poetry build
mkdir -p $(OUTPUT_PATH)/ipfs
tar -xzf dist/ipfs-video-kodi-*.tar.gz -C dist --wildcards '*/ipfs_video_kodi'
cp -r dist/*/ipfs_video_kodi/* $(OUTPUT_PATH)
cp -r resources $(OUTPUT_PATH)
cp icon.png $(OUTPUT_PATH)
cp addon.xml $(OUTPUT_PATH)
cp fanart.jpg $(OUTPUT_PATH)
cp LICENSE.txt $(OUTPUT_PATH)
cp README.md $(OUTPUT_PATH)/README
package: build/plugin_video_ipfs.zip
unzip -t build/plugin_video_ipfs.zip