Skip to content

Commit

Permalink
enigma2-plugin-extensions-chocholousek-picons - created bb recipe and…
Browse files Browse the repository at this point in the history
… added to openatv feeds

thx @s3n0
  • Loading branch information
nickersk committed Feb 15, 2021
1 parent bbc4a46 commit 28b8f38
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions meta-oe/recipes-distros/openatv/image/openatv-feeds.bb
Expand Up @@ -47,6 +47,7 @@ RRECOMMENDS_${PN} = "\
enigma2-plugin-settings-defaultsat \
enigma2-plugin-extensions-specialjump \
enigma2-plugin-extensions-blurayplayer \
enigma2-plugin-extensions-chocholousek-picons \
enigma2-plugin-extensions-gbipboxclient \
enigma2-plugin-systemplugins-autobouquetsmaker \
${@bb.utils.contains("MACHINE_BRAND", "AZBOX", "enigma2-plugin-extensions-azplay enigma2-plugin-extensions-aziptv", "", d)} \
Expand Down
@@ -0,0 +1,66 @@
SUMMARY = "Plugin for updating Chocholousek's picons in Enigma2"
DESCRIPTION = "Enigma2 plugin for downloading and updating picons (almost all EU satellites)"
HOMEPAGE = "https://github.com/s3n0/e2plugins/ChocholousekPicons"
SECTION = "multimedia"
LICENSE = "GPLv2"

require conf/license/license-gplv2.inc

RDEPENDS_${PN} = "p7zip"

inherit gitpkgv gettext

SRCREV = "${AUTOREV}"
PV = "4.0.210214+gitr${SRCPV}"
PKGV = "4.0.210214+gitr${SRCPV}"
PR = "r1"

SRC_URI = "git://github.com/s3n0/e2plugins"

S = "${WORKDIR}/git/ChocholousekPicons/src"

do_compile() {
# generate translation .mo files
find ${S}/locale -name \*.po -execdir sh -c 'msgfmt "$0" -o `basename $0 .po`.mo' '{}' \;
}

PACKAGES =+ "${PN}-po"
FILES_${PN}-po = "${libdir}/enigma2/python/Plugins/Extensions/ChocholousekPicons/locale/*/*/*.po"
FILES_${PN} = "${libdir}/enigma2/python/Plugins/Extensions/ChocholousekPicons"
D_FILES_PN = "${D}${FILES_${PN}}"

do_install() {
install -d ${D_FILES_PN}
install -d ${D_FILES_PN}/images
install -d ${D_FILES_PN}/locale

install -m 644 ${S}/*.py *.log *.txt ${D_FILES_PN}
install -m 644 ${S}/images/*.* ${D_FILES_PN}/images
cp -rf ${S}/locale ${D_FILES_PN}
}

pkg_postinst_${PN}() {
#!/bin/sh
echo "*********************************************************"
echo " Chocholousek Picons - plugin ver.4.0.210130 "
echo " Enigma2 plugin/extensions "
echo " by s3n0 , 2018-2021 "
echo "*********************************************************"
echo " Successfully INSTALLED. You should restart Enigma2 now. "
echo "*********************************************************"
exit 0
}

pkg_postrm_${PN}() {
#!/bin/sh
[ "$1" != "upgrade" ] || exit 0 > /dev/null 2>&1 # prevent the OE2.5+ based Enigma2 for deleting files when the package is "upgrading"
rm -rf /usr/lib/enigma2/python/Plugins/Extensions/ChocholousekPicons > /dev/null 2>&1
echo "*********************************************************"
echo " Chocholousek Picons - plugin ver.4.0.210130 "
echo " Enigma2 plugin/extensions "
echo " by s3n0 , 2018-2021 "
echo "*********************************************************"
echo " Successfully REMOVED. You should restart Enigma2 now. "
echo "*********************************************************"
exit 0
}

5 comments on commit 28b8f38

@s3n0
Copy link

@s3n0 s3n0 commented on 28b8f38 Feb 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi.

I'm not familiar with this particular recipe.

Why is there a fixed version (number) of the plugin? Wouldn't it be better to extract the plugin version directly from the "version.txt" file from my github? The same way I do - in the case of my IPK compilation script or also according to the installation script (which is also published on my github, here: https://github.com/s3n0/e2plugins/blob/master/ChocholousekPicons/online-setup):
VER="$(wget -qO- --proxy off --no-check-certificate https://github.com/s3n0/e2plugins/raw/master/ChocholousekPicons/src/version.txt)"

@nickersk
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not so easy here, pkg version must be known before build is started. autorev will fetch always latest commit... versioning is possible if consistent git tags exists upstream...

@s3n0
Copy link

@s3n0 s3n0 commented on 28b8f38 Feb 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But does the wget tool still not work in these recipes ? With wget, the current version would always be loaded. Alternatively, if the recipe is taken care of by a GitHub server, then there are definitely some macros that can get data from another GitHub. Or am I wrong ?

BTW, thanks for the recipe :).

@nickersk
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetching and versioning works diferently within bitbake. will take deeper look on this later. one solution would be that after each update you set git tag, which can be taken by bitbake after.

@s3n0
Copy link

@s3n0 s3n0 commented on 28b8f38 Feb 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh... ok... thanks.

Please sign in to comment.