|
@@ -47,22 +47,25 @@ parts:
|
|
|
override-build: |
|
|
|
# Remove LICENCE-part of insteonplm, which causes pip to fail
|
|
|
echo "Fixing broken insteonplm install"
|
|
|
- PPACKAGES="$(pwd)/../python-packages/"
|
|
|
- INSTEONPLM="${PPACKAGES}/$(basename "$(ls ${PPACKAGES} | grep insteonplm*.tar.gz --max-count=1)")"
|
|
|
- echo " * Extracting ${INSTEONPLM}"
|
|
|
- SCFG=$(tar -xvzf "${INSTEONPLM}" | grep setup.cfg --max-count=1)
|
|
|
- BFILE="${INSTEONPLM}.bup"
|
|
|
- if [ ! -f "${BFILE}" ]; then
|
|
|
- echo "Creating backup * ${BFILE}"
|
|
|
- mv -f "${INSTEONPLM}" "${BFILE}"
|
|
|
+ PKGS="$(pwd)/../python-packages"
|
|
|
+ IPKG="$(ls ${PKGS}/insteonplm*.tar.gz | tail -n 1)"
|
|
|
+ BIPKG="${HOME}/$(basename ${IPKG}.bup)"
|
|
|
+ if [ ! -f "${BIPKG}" ]; then
|
|
|
+ echo -e " * Creating backup to\n\tTO: ${BIPKG}\n\t<= ${IPKG}"
|
|
|
+ cp "${IPKG}" "${BIPKG}"
|
|
|
+ else
|
|
|
+ echo -e " * Restoring backup\n\tFROM: ${BIPKG}\n\t=> ${IPKG}"
|
|
|
+ cp "${BIPKG}" "${IPKG}"
|
|
|
fi
|
|
|
- echo " * Editing ${SCFG}"
|
|
|
+ echo " * Insteonplm file: ${IPKG}"
|
|
|
+ SCFG=$(tar -xvzf "${IPKG}" | grep setup.cfg --max-count=1)
|
|
|
+ rm "${IPKG}"
|
|
|
+ echo " * Editing setup.cfg file: ${SCFG}"
|
|
|
sed -i '/^license_file/d' "${SCFG}"
|
|
|
- echo " * Compressing ${INSTEONPLM}"
|
|
|
- tar -zcf "${INSTEONPLM}" $(dirname "${SCFG}")
|
|
|
- echo " * Updated ${INSTEONPLM}"
|
|
|
- rm -rf $(dirname "${SCFG}")
|
|
|
- echo " * Deleted $(dirname ${SCFG})"
|
|
|
+ echo " * Compressing $(dirname ${SCFG}) to: ${IPKG}"
|
|
|
+ tar -zcf "${IPKG}" "$(dirname ${SCFG})"
|
|
|
+ echo " * Deleting tmp-folder $(dirname ${SCFG})"
|
|
|
+ rm -rf "$(dirname ${SCFG})"
|
|
|
snapcraftctl build
|
|
|
requirements:
|
|
|
- requirements_all.txt
|