From eeb6d5f851af0b791c4beff9c61c1ada80f0f027 Mon Sep 17 00:00:00 2001 From: Sergey Zhemoitel Date: Fri, 28 Aug 2020 19:05:51 +0300 Subject: [PATCH] Imported from SRPM --- .abf.yml | 2 ++ etcdmanager.rpmlintrc | 2 ++ etcdmanager.spec | 82 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 .abf.yml create mode 100644 etcdmanager.rpmlintrc create mode 100644 etcdmanager.spec diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..dd4aaa0 --- /dev/null +++ b/.abf.yml @@ -0,0 +1,2 @@ +sources: + etcdmanager-1.2.0.tar.gz: 5d560a7099ba220fd91adb20c1f0b0f64513cc74 diff --git a/etcdmanager.rpmlintrc b/etcdmanager.rpmlintrc new file mode 100644 index 0000000..ea7f91c --- /dev/null +++ b/etcdmanager.rpmlintrc @@ -0,0 +1,2 @@ +addFilter("E: dir-or-file-in-opt") + diff --git a/etcdmanager.spec b/etcdmanager.spec new file mode 100644 index 0000000..c3b2876 --- /dev/null +++ b/etcdmanager.spec @@ -0,0 +1,82 @@ +%define debug_package %nil +%define pkgname CryptoARMGOST +%define _optdir /opt + +Name: etcdmanager +Version: 1.2.0 +Release: 1 +Summary: A cross-platform GUI and ETCD client +URL: https://etcdmanager.io +Source0: https://github.com/i-Cell-Mobilsoft-Open-Source/etcdmanager/archive/%{version}/%{name}-%{version}.tar.gz +Source1000: %{name}.rpmlintrc +License: MIT +Group: Development/Other +BuildRequires: npm +BuildRequires: yarn +BuildRequires: imagemagick + +%description +This is a free, cross-platform ETCD v3 client and GUI. +The goal of the project is twofold: + + - Provide an efficient, modern GUI for desktop (Windows, +Linux, Mac), mobile (iOS and Android) and web. + - Cover all ETCD functionality. Anything you can do with +etcdctl, you should be able to do with this tool as well. +This app should be useful for simple and power users alike. + +%prep +%setup -q + +%build +yarn +yarn run electron:build:linux + +%install +install -d %{buildroot}%{_optdir}/%{name} + +%ifarch x86_64 +cp -a dist_electron/linux-unpacked/* %{buildroot}%{_optdir}/%{name} +%else +cp -a dist_electron/linux--ia32-unpacked/* %{buildroot}%{_optdir}/%{name} +%endif + +# install binary wrapper +mkdir -p %{buildroot}%{_bindir} +cat > %{buildroot}%{_bindir}/%{name} << EOF +#!/bin/bash +cd %{_optdir}/%{name} +./etcd-manager +EOF + +chmod 755 %{buildroot}%{_bindir}/%{name}* + +# install menu entry +mkdir -p %{buildroot}%{_datadir}/applications/ +cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF +[Desktop Entry] +Name=ETCD manager +Comment=GUI manager for ETCD +Exec=%{name} +Icon=%{name} +Terminal=false +Type=Application +StartupNotify=true +Categories=Network; +EOF + +# install menu icons +pushd build_files + for N in 16 22 24 32 48 128 256; do + install -d %{buildroot}%{_iconsdir}/hicolor/${N}x${N}/apps + convert -resize ${N}x${N} icon.png %{buildroot}%{_iconsdir}/hicolor/${N}x${N}/apps/%{name}.png + done +popd + + +%files +%doc README.md LICENSE +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_iconsdir}/hicolor/* +%{_optdir}/%{name}/*