Blob Blame Raw
Name:       pagekite
Version:    0.5.9.3
Release:    5%{?dist}
Summary:    Makes localhost servers visible to the world
License:    AGPLv3+ and Public Domain
Url:        http://pagekite.org/
Source0:    http://pagekite.net/pk/src/%{name}-%{version}.tar.gz
Source1:    %{name}.service

BuildArch:  noarch

BuildRequires: systemd
BuildRequires: python2-devel
BuildRequires: /usr/bin/pathfix.py

Requires:   python2-socksipychain
Requires:   setup

Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd

%description
System for running publicly visible servers (generally web servers) on machines
without a direct connection to the Internet, such as mobile devices or
computers behind restrictive firewalls. It works around NAT, firewalls and
IP-address limitations by using a combination of  tunnels and reverse proxies.

Natively supported protocols: HTTP, HTTPS
Partially supported protocols: IRC, Finger

Any other TCP-based service, including SSH and VNC, may be exposed as well to
clients supporting HTTP Proxies.

%prep
%setup -q

%build
pathfix.py -pni "%{__python2} %{py2_shbang_opts}" . scripts/%{name}_gtk

%install
install -d $RPM_BUILD_ROOT%{python2_sitelib}/%{name}
install -d $RPM_BUILD_ROOT%{python2_sitelib}/%{name}/proto
install -d $RPM_BUILD_ROOT%{python2_sitelib}/%{name}/ui
install -pm 0644 %{name}/*py $RPM_BUILD_ROOT%{python2_sitelib}/%{name}/
install -pm 0644 %{name}/proto/*py $RPM_BUILD_ROOT%{python2_sitelib}/%{name}/proto/
install -pm 0644 %{name}/ui/*py $RPM_BUILD_ROOT%{python2_sitelib}/%{name}/ui/

install -Dpm 0755 scripts/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}

install -Dpm 0644 etc/sysconfig/%{name}.fedora $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
install -Dpm 0644 etc/sysconfig/%{name}.fedora $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
install -Dpm 0644 etc/logrotate.d/%{name}.fedora $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
install -Dpm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service

install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/
install -Dpm 0644 etc/%{name}.d/* $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/
install -Dpm 0600 etc/%{name}.d/10_account.rc $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/

install -Dpm 0644 doc/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1

install -d -m 0755 $RPM_BUILD_ROOT/%{_localstatedir}/log/%{name}

%post
%systemd_post %{name}.service

%preun
%systemd_preun %{name}.service

%postun
%systemd_postun_with_restart %{name}.service

%files
%license COPYING
%doc README.md TODO.md
%{python2_sitelib}/%{name}/
%{_bindir}/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%if 0%{?rhel} && 0%{?rhel} <= 6
  %{_initrddir}/%{name}
%else
  %{_unitdir}/%{name}.service
%endif
%{_sysconfdir}/logrotate.d/%{name}
%attr(660,root,root) %config(noreplace) %{_sysconfdir}/%{name}.d/*
%{_mandir}/man1/%{name}.1*
%{_localstatedir}/log/%{name}

%changelog
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Mon Sep 10 2018 Lukas Zapletal <lzap+rpm@redhat.com> 0.5.9.3-3
- Fixed python2 shebangs

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Sun Jun 17 2018 Peter Robinson <pbrobinson@fedoraproject.org> 0.5.9.3-1
- 0.5.9.3, minor spec cleanups, use %%license

* Wed Feb 14 2018 Lukas Zapletal <lzap+rpm@redhat.com> 0.5.9.2-4
- Dropped EL5 support (macros)

* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.9.2-3
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6d-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6d-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.6d-6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6d-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Sep 18 2015 Lukas Zapletal <lzap+rpm@redhat.com> 0.5.6d-4
- Added missing systemd build require for EPEL7

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.6d-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.6d-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed Sep 04 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 0.5.6d-1
- new release

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.5a-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun Apr 07 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 0.5.5a-4
- require fix

* Tue Mar 19 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 0.5.5a-3
- package review items

* Wed Feb 20 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 0.5.5a-2
- Initial review
- Removed lapcat from the distribution

* Fri Feb 08 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 0.5.5a-1
- Initial version.