mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
6c82ee48a2
* add: opensnitch * enable the builddep then idk * a * alsdkfjalskj * sjdfl * idrk anymore * sdlkfj * comments * Update opensnitch.spec Signed-off-by: madomado <madonuko@outlook.com> * Update opensnitch.spec Signed-off-by: madomado <madonuko@outlook.com> * who would've guessed you need c++ * qmake? * cmake(Qt6) Signed-off-by: madomado <madonuko@outlook.com> * qt5-linguist Signed-off-by: madomado <madonuko@outlook.com> * maybe qt6? what? Signed-off-by: madomado <madonuko@outlook.com> --------- Signed-off-by: madomado <madonuko@outlook.com>
120 lines
3.0 KiB
RPMSpec
120 lines
3.0 KiB
RPMSpec
# Generated by go2rpm 1.16.0
|
|
%bcond check 1
|
|
%bcond bootstrap 0
|
|
|
|
# https://github.com/evilsocket/opensnitch
|
|
%global goipath github.com/evilsocket/opensnitch
|
|
Version: 1.7.0.0
|
|
|
|
%gometa -f
|
|
|
|
%global common_description %{expand:
|
|
OpenSnitch is a GNU/Linux interactive application firewall inspired by Little
|
|
Snitch.}
|
|
|
|
%global golicenses LICENSE ui/LICENSE\\\
|
|
ui/opensnitch/res/themes/dark/icons/LICENSE
|
|
%global godocs README.md ebpf_prog/README ui/requirements.txt\\\
|
|
ui/i18n/README.md example example example\\\
|
|
utils/packaging/daemon/deb/debian/changelog\\\
|
|
utils/packaging/ui/deb/debian/changelog
|
|
|
|
Name: opensnitch
|
|
Release: %autorelease
|
|
Summary: OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch
|
|
|
|
License: GPL-3.0-only AND LGPL-2.1-or-later
|
|
URL: %{gourl}
|
|
Source: %{gosource}
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: python3dist(pip)
|
|
BuildRequires: python3dist(setuptools) >= 61.0
|
|
BuildRequires: python3dist(wheel) >= 0.37.1
|
|
BuildRequires: python3dist(pyqt5)
|
|
BuildRequires: /usr/bin/lrelease-qt5
|
|
BuildRequires: protobuf-compiler
|
|
BuildRequires: pkgconfig(libnetfilter_queue)
|
|
#BuildRequires: protoc-gen-go
|
|
#BuildRequires: /usr/bin/protoc-gen-go-grpc
|
|
|
|
%description %{common_description}
|
|
|
|
%gopkg
|
|
|
|
|
|
%prep
|
|
%goprep -A
|
|
%autopatch -p1
|
|
|
|
export GOBIN=$(go env GOPATH | sed -E 's/:.+$//')/bin
|
|
echo $GOBIN > %_builddir/gobin
|
|
go install github.com/golang/protobuf/protoc-gen-go@latest
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.1
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
|
|
|
|
sed -i 's/@pip3 /@python3 -m pip /' ui/Makefile
|
|
|
|
%build
|
|
pushd ui
|
|
%make_build deps
|
|
popd
|
|
|
|
export GOBIN=$(cat %_builddir/gobin)
|
|
export PATH=$GOBIN:$PATH
|
|
pushd proto
|
|
%make_build
|
|
popd
|
|
|
|
pushd ui
|
|
%make_build
|
|
%pyproject_wheel
|
|
popd
|
|
|
|
%global gomodulesmode GO111MODULE=on
|
|
pushd daemon
|
|
%gobuild -o ../opensnitchd .
|
|
popd
|
|
|
|
|
|
%install
|
|
%gopkginstall
|
|
install -Dm755 opensnitchd -t %buildroot%_bindir
|
|
|
|
pushd ui
|
|
%if 0%{?fedora} <= 41
|
|
%py3_install
|
|
%else
|
|
%pyproject_install
|
|
%pyproject_save_files %name
|
|
%endif
|
|
popd
|
|
|
|
rm -rf %buildroot%python3_sitelib/tests/
|
|
cp -r %buildroot%python3_sitelib%_usr/ %buildroot%_usr/ --preserve=all --no-target-directory
|
|
rm -rf %buildroot%python3_sitelib%_usr
|
|
|
|
|
|
%if 0%{?fedora} <= 41
|
|
%files
|
|
%{python3_sitelib}/%name/
|
|
%{python3_sitelib}/%name-%{version}-py%{python3_version}.egg-info/
|
|
%else
|
|
%files -f %{pyproject_files}
|
|
%endif
|
|
%license LICENSE
|
|
%doc README.md
|
|
%_bindir/opensnitch-ui
|
|
%_bindir/opensnitchd
|
|
%_datadir/applications/opensnitch_ui.desktop
|
|
%_iconsdir/hicolor/48x48/apps/opensnitch-ui.png
|
|
%_iconsdir/hicolor/64x64/apps/opensnitch-ui.png
|
|
%_iconsdir/hicolor/scalable/apps/opensnitch-ui.svg
|
|
%_datadir/kservices5/kcm_opensnitch.desktop
|
|
%_metainfodir/io.github.evilsocket.opensnitch.appdata.xml
|
|
|
|
/usr/share/icons/hicolor/scalable/apps/opensnitch-ui.svg
|
|
|
|
%gopkgfiles
|