bdcad69
# Pre-release
bdcad69
#%%global git_tag 2.1.0rc3
bdcad69
bdcad69
%global git_tag %{version}
d9c6d9f
0afdcda
Name:           gns3-gui
12e6bc8
Version:        2.1.5
dc9bc69
Release:        1%{?dist}
0afdcda
Summary:        GNS3 graphical user interface
0afdcda
0afdcda
License:        GPLv3+
0afdcda
URL:            http://gns3.com
d9c6d9f
Source0:        https://github.com/GNS3/%{name}/archive/v%{git_tag}/%{name}-%{git_tag}.tar.gz
0afdcda
Source1:        %{name}.desktop
0afdcda
Source2:        gns3.png
0afdcda
Source3:        %{name}.appdata.xml
0afdcda
0afdcda
BuildArch:      noarch
0afdcda
0afdcda
BuildRequires:  python3-devel 
0afdcda
BuildRequires:  desktop-file-utils
0afdcda
BuildRequires:  libappstream-glib
0afdcda
0afdcda
Requires: telnet 
0afdcda
Requires: cpulimit 
0afdcda
Requires: socat
0afdcda
Requires: python3-jsonschema 
0afdcda
Requires: python3-raven 
0afdcda
Requires: python3-psutil 
0afdcda
Requires: python3-qt5
0afdcda
Requires: gns3-net-converter >= 1.3.0
0afdcda
0afdcda
%description
0afdcda
GNS3 is a graphical network simulator that allows you to design complex network
0afdcda
topologies. You may run simulations or configure devices ranging from simple 
0afdcda
workstations to powerful routers. 
0afdcda
0afdcda
This package contains the client graphical user interface.
0afdcda
0afdcda
%prep
d9c6d9f
%autosetup -n %{name}-%{git_tag}
0afdcda
dbb2628
# Disable update alerts
dbb2628
sed -i 's/"check_for_update": True,/"check_for_update": False,/' gns3/settings.py
dbb2628
5707da2
# Disable anonymous data collection
5707da2
sed -i 's/"send_stats": True,/"send_stats": False,/' gns3/settings.py
5707da2
0afdcda
%build
0afdcda
%py3_build
0afdcda
0afdcda
%install
0afdcda
%py3_install
0afdcda
0afdcda
# Remove shebang
0afdcda
for lib in `find %{buildroot}/%{python3_sitelib}/ -name '*.py'`; do
0afdcda
 echo $lib
0afdcda
 sed -i '1{\@^#!/usr/bin/env python@d}' $lib
0afdcda
done
0afdcda
0afdcda
# Remove empty files
0afdcda
find %{buildroot}/%{python3_sitelib}/ -name '.keep' -type f -delete
0afdcda
0afdcda
# Remove exec perm
0afdcda
find %{buildroot}/%{python3_sitelib}/ -type f -exec chmod -x {} \;
0afdcda
0afdcda
# Desktop file
0afdcda
mkdir -p %{buildroot}%{_datadir}/pixmaps/
0afdcda
cp %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/
0afdcda
desktop-file-install                                    \
0afdcda
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \
0afdcda
%{SOURCE1}
0afdcda
0afdcda
# AppData
0afdcda
mkdir -p %{buildroot}/%{_datadir}/appdata/
0afdcda
install -m 644 %{SOURCE3} %{buildroot}/%{_datadir}/appdata/
0afdcda
0afdcda
%check
0afdcda
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml
0afdcda
0afdcda
0afdcda
%files 
0afdcda
%license LICENSE
0afdcda
%doc README.rst AUTHORS CHANGELOG
0afdcda
%{python3_sitelib}/gns3/
d9c6d9f
%{python3_sitelib}/gns3_gui*.egg-info/
0afdcda
%{_bindir}/gns3
0afdcda
%{_datadir}/applications/%{name}.desktop
0afdcda
%{_datadir}/pixmaps/gns3.png
0afdcda
%{_datadir}/appdata/%{name}.appdata.xml
0afdcda
0afdcda
%changelog
12e6bc8
* Sat Apr 21 2018 Athmane Madjoudj <athmane@fedoraproject.org> - 2.1.5-1
12e6bc8
- Update to 2.1.5 (rhbz #1569275)
12e6bc8
dc9bc69
* Sun Mar 18 2018 Athmane Madjoudj <athmane@fedoraproject.org> - 2.1.4-1
dc9bc69
- Update to 2.1.4 (rhbz #1554315)
dc9bc69
f64a42e
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-2
f64a42e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f64a42e
64215ca
* Sun Jan 21 2018 Athmane Madjoudj <athmane@fedoraproject.org> - 2.1.3-1
64215ca
- Update to 2.1.3 (rhbz #1536428)
64215ca
5707da2
* Thu Jan 18 2018 Athmane Madjoudj <athmane@fedoraproject.org> - 2.1.2-1
5707da2
- Update to 2.1.2 (rhbz #1532421)
5707da2
- Disable anonymous data collection
5707da2
390b616
* Sat Dec 30 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 2.1.1-1
390b616
- Update to 2.1.1 (rhbz #1528825)
390b616
bdcad69
* Mon Nov 20 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 2.1.0-1
bdcad69
- Update to 2.1.0 final
bdcad69
bf8372d
* Sat Nov 04 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 2.1.0-0.rc3
bf8372d
- Update to 2.1.0-0.rc3
bf8372d
d9c6d9f
* Sun Oct 15 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 2.1.0-0.rc1
d9c6d9f
- Update to 2.1.0 RC1
d9c6d9f
- Fix appdata
d9c6d9f
9875ca3
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-3
9875ca3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9875ca3
dbb2628
* Sun Jul 23 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 2.0.3-2
dbb2628
- Disable update alert
dbb2628
d596891
* Sat Jul 15 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 2.0.3-1
d596891
- Update to 2.0.3
d596891
1838abc
* Sat May 13 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 2.0.0-2
1838abc
- Update files section
1838abc
7bbf525
* Fri May 12 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 2.0.0-1
7bbf525
- Update to 2.0.0
7bbf525
1ecdbac
* Fri Apr 14 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 1.5.4-1
1ecdbac
- Update to 1.5.4
1ecdbac
e105e6f
* Sat Apr 01 2017 Athmane Madjoudj <athmane@fedoraproject.org> - 1.5.3-1
e105e6f
- Update to 1.5.3
e105e6f
3a5ed86
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-3
3a5ed86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
3a5ed86
ae485f5
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.5.2-2
ae485f5
- Rebuild for Python 3.6
ae485f5
c956b88
* Sun Sep 11 2016 Athmane Madjoudj <athmane@fedoraproject.org> - 1.5.2-1
c956b88
- Update to 1.5.2
c956b88
0afdcda
* Fri Aug 05 2016 Athmane Madjoudj <athmane@fedoraproject.org> - 1.5.1-2
0afdcda
- Fix appdata
0afdcda
0afdcda
* Tue Aug 02 2016 Athmane Madjoudj <athmane@fedoraproject.org> - 1.5.1-1
0afdcda
- Update to 1.5.1
0afdcda
- Fix the url
0afdcda
0afdcda
* Tue Aug 02 2016 Athmane Madjoudj <athmane@fedoraproject.org> - 1.5.0-2
0afdcda
- Minor spec fixes
0afdcda
- Provide AppData
0afdcda
0afdcda
* Tue Jul 05 2016 Athmane Madjoudj <athmane@fedoraproject.org> - 1.5.0-1
0afdcda
- Initial spec