pkg, ui rpm: improvements

- Added python3-packaging as dependency to load dynamically the
   protobuffers (python3-packaging for Fedora, python-rpm-packaging
   metapackage for OpenSuse).
 - Fixed patching protobuffers.
This commit is contained in:
Gustavo Iñiguez Goia 2024-12-26 23:17:53 +01:00
parent 1c2e1f68c7
commit 80eef7f163
Failed to generate hash of commit

View file

@ -19,7 +19,7 @@ Vendor: OpenSnitch project
Packager: Gustavo Iñiguez Goya <gooffy1@gmail.com>
Url: https://github.com/evilsocket/opensnitch
Requires: python3, python3-pip, (netcfg or setup), (python3-pyinotify or python3-inotify), python3-qt5
Recommends: (python3-slugify or python3-python-slugify), python3-notify2, python3-protobuf >= 3.0, python3-grpcio >= 1.10.0, (qgnomeplatform-qt5 or QGnomePlatform-qt5)
Recommends: (python3-slugify or python3-python-slugify), python3-notify2, python3-protobuf >= 3.0, python3-grpcio >= 1.10.0, (qgnomeplatform-qt5 or QGnomePlatform-qt5), (python3-packaging or python-rpm-packaging)
# avoid to depend on a particular python version
%global __requires_exclude ^python\\(abi\\) = 3\\..$
@ -78,7 +78,7 @@ fi
cd i18n; make; cd ..
cp -r i18n/locales/ opensnitch/i18n
pyrcc5 -o opensnitch/resources_rc.py opensnitch/res/resources.qrc
sed -i 's/^import ui_pb2/from . import ui_pb2/' opensnitch/ui_pb2*
find opensnitch/proto/ -name 'ui_pb2_grpc.py' -exec sed -i 's/^import ui_pb2/from . import ui_pb2/' {} \;
python3 setup.py build
%install