From 71bbbb7da8ab024e9bf9635be24d0a5abd61739c Mon Sep 17 00:00:00 2001
From: Thierry Parmentelat <thierry.parmentelat@inria.fr>
Date: Fri, 25 Nov 2022 15:18:42 +0100
Subject: [PATCH] fix packaging for f37 (2/n)

plc_api.php was missing
plus Server.py was misplaced, but that's just to remain in line with the previous package
---
 Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b138e053..87ce9135 100644
--- a/Makefile
+++ b/Makefile
@@ -24,10 +24,15 @@ all:
 install: install-python install-phpxmlrpc
 
 install-python:
-	pip install --target $(DESTDIR)/$(datadir)/plc_api .
+	# we mention --upgrade because otherwise
+	# pip install complains the php/ target already exists
+	# and it refuses to put plc_api.php in there
+	pip install --upgrade --target $(DESTDIR)/$(datadir)/plc_api .
 	# it's important that plcsh sits in /usr/share/plc_api
 	# and not under bin/ so that python can find the PLC/ modules
 	mv $(DESTDIR)/$(datadir)/plc_api/bin/plcsh $(DESTDIR)/$(datadir)/plc_api
+	mv $(DESTDIR)/$(datadir)/plc_api/bin/Server.py $(DESTDIR)/$(datadir)/Server.py
+	# the old recipe used to read
 	# python3 setup.py install \
 	#     --install-purelib=$(DESTDIR)/$(datadir)/plc_api \
 	#     --install-scripts=$(DESTDIR)/$(datadir)/plc_api \
-- 
2.47.0