summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Sieverdingbeck2018-07-10 23:40:56 +0200
committerIngo Sieverdingbeck2018-07-10 23:40:56 +0200
commit7de8b77b207fab9ff9721bb904ba5cf00b460ae2 (patch)
tree775bac9cb5f9e487d267ad7dfc18f1abc1f3e025
parentea9e807591bac8c2f4e33fa67dfea8a266bf341d (diff)
downloadaur-7de8b77b207fab9ff9721bb904ba5cf00b460ae2.tar.gz
fix for fakeroot build
-rw-r--r--PKGBUILD7
1 files changed, 7 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 5333e2bd834a..8554c2f921c9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,6 +28,13 @@ prepare() {
package() {
cd "${srcdir}/$_pkgname-$_pkgver.fedora27"
+ # setup.py imports AppInfo from Nagstamon.Config which leads to a import of keyring
+ # importing keyring fails in a fakeroot environment, which seems to be somehow related to a the keyring connection init triggered by the import
+ # to avoid the issue setup.py is rewritten here to resolve the need for the AppInfo import
+ name=$(sed '0,/class AppInfo/d' Nagstamon/Config.py | grep "NAME " | sed -e "s/^[\t ]*NAME = '//" -e "s/'$//")
+ version=$(sed '0,/class AppInfo/d' Nagstamon/Config.py | grep "VERSION " | sed -e "s/^[\t ]*VERSION = '//" -e "s/'$//")
+ sed -i setup.py -e "s/from Nagstamon.Config import AppInfo//" -e "s/AppInfo.NAME/'${name}'/" -e "s/AppInfo.VERSION/'${version}'/"
+ sed -i Nagstamon/setup.py -e "s/from Nagstamon.Config import AppInfo//" -e "s/AppInfo.NAME/'${name}'/" -e "s/AppInfo.VERSION/'${version}'/"
python setup.py install --prefix=/usr --root="$pkgdir"
}