Michel Alexandre Salim 6a15a9a
%global cache_dir /var/cache/0install.net
f91e681
%global upstream_name 0install
Michel Alexandre Salim f77a7be
#global prerel    rc1
fb9bcfb
fb870de
Name:    zeroinstall-injector
c968379
Version: 2.3.3
5c92de0
Release: 3%{?dist}
fb870de
Summary: The Zero Install Injector (0launch)
fb870de
fb870de
Group:   Applications/System
320914a
License: LGPLv2
fb870de
URL:     http://0install.net
f91e681
Source0: http://downloads.sf.net/project/zero-install/%{upstream_name}/%{version}/%{upstream_name}-%{version}.tar.bz2
fb870de
fb870de
BuildArch: noarch
Michel Alexandre Salim 73ec6b1
BuildRequires: python-devel >= 2.6
0e66abf
BuildRequires: desktop-file-utils
0e66abf
BuildRequires: gettext
121fdbf
# for-tests
260588d
BuildRequires: pygtk2 gnupg xdg-utils
121fdbf
BuildRequires: tar gzip bzip2 xz-lzma-compat
2f456c3
BuildRequires: python-coverage
121fdbf
# /for-tests
260588d
Requires:      pygtk2 gnupg sudo xdg-utils
121fdbf
Requires:      tar gzip bzip2 xz-lzma-compat
121fdbf
# for PackageKit support
121fdbf
Requires:      dbus-python
2f456c3
94386e9
Requires(pre): shadow-utils
fb870de
2f456c3
# for icons
2f456c3
Requires:      hicolor-icon-theme
2f456c3
fb870de
%description
0e66abf
The Zero Install Injector makes it easy for users to install software
0e66abf
without needing root privileges. It takes the URL of a program and
0e66abf
runs it (downloading it first if necessary). Any dependencies of the
0e66abf
program are fetched in the same way. The user controls which version
0e66abf
of the program and its dependencies to use.
0e66abf
0e66abf
Zero Install is a decentralized installation system (there is no
0e66abf
central repository; all packages are identified by URLs),
0e66abf
loosely-coupled (if different programs require different versions of a
0e66abf
library then both versions are installed in parallel, without
0e66abf
conflicts), and has an emphasis on security (all package descriptions
0e66abf
are GPG-signed, and contain cryptographic hashes of the contents of
0e66abf
each version). Each version of each program is stored in its own
0e66abf
sub-directory within the Zero Install cache (nothing is installed to
0e66abf
directories outside of the cache, such as /usr/bin) and no code from
0e66abf
the package is run during install or uninstall. The system can
0e66abf
automatically check for updates when software is run.
fb870de
fb870de
%prep
f91e681
%setup -q -n %{upstream_name}-%{version}
Michel Alexandre Salim 9527bba
fb870de
%build
fb870de
%{__python} setup.py build
fb870de
fb870de
%install
fb870de
rm -rf $RPM_BUILD_ROOT
fb9bcfb
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
fb9bcfb
mv "$RPM_BUILD_ROOT/usr/man" "$RPM_BUILD_ROOT/%{_datadir}/man"
fb9bcfb
mkdir -p "$RPM_BUILD_ROOT%{cache_dir}/implementations"
fb9bcfb
e8e0f90
desktop-file-validate \
e8e0f90
    $RPM_BUILD_ROOT%{_datadir}/applications/0install.desktop
e8e0f90
0e66abf
%find_lang zero-install
fb870de
121fdbf
%check
19bfa20
export PYTHONPATH=`pwd`
121fdbf
cd tests
121fdbf
for t in download packagekit; do
121fdbf
  mv test${t}.py{,.off}
121fdbf
done
121fdbf
./testall.py
121fdbf
fb870de
%clean
fb870de
rm -rf $RPM_BUILD_ROOT
fb870de
121fdbf
fb9bcfb
%pre
fb9bcfb
# Add the "zeroinst" user.
fb9bcfb
# This is not used by default, but is required if you want to
fb9bcfb
# set up sharing of downloads later.
94386e9
getent group  zeroinst >/dev/null || groupadd -r zeroinst
94386e9
getent passwd zeroinst >/dev/null || \
320914a
useradd -r -g zeroinst -d %{cache_dir} -s /sbin/nologin \
94386e9
    -c "Zero Install shared cache" zeroinst
94386e9
exit 0
fb9bcfb
2f456c3
%post
2f456c3
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
2f456c3
2f456c3
%postun
2f456c3
if [ $1 -eq 0 ] ; then
2f456c3
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
2f456c3
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
2f456c3
fi
2f456c3
2f456c3
%posttrans
2f456c3
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
2f456c3
2f456c3
0e66abf
%files -f zero-install.lang
fb870de
%defattr(-,root,root,-)
f91e681
%doc COPYING README.md
fb870de
%{_bindir}/0*
0518928
%{_datadir}/applications/*.desktop
2f456c3
%{_datadir}/icons/hicolor/*/apps/zeroinstall.png
Michel Alexandre Salim 6a15a9a
%{_datadir}/icons/hicolor/scalable/apps/zeroinstall.svg
4aba738
%{python_sitelib}/zeroinstall/
378e51e
%if 0%{!?el5:1}
71b237d
%{python_sitelib}/*.egg-info
71b237d
%endif
fb870de
%{_mandir}/man1/0*
fb9bcfb
%dir %{cache_dir}
fb9bcfb
%attr(755,zeroinst,zeroinst) %{cache_dir}/implementations
36865f0
%dir %{_datadir}/bash-completion
36865f0
%dir %{_datadir}/bash-completion/completions
36865f0
%{_datadir}/bash-completion/completions/0install
f5c9751
%dir %{_datadir}/fish
f5c9751
%dir %{_datadir}/fish/completions
f5c9751
%{_datadir}/fish/completions/0install.fish
17d2a6a
%dir %{_datadir}/zsh
17d2a6a
%dir %{_datadir}/zsh/site-functions
17d2a6a
%{_datadir}/zsh/site-functions/_0install
17d2a6a
fb870de
fb870de
%changelog
5c92de0
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3-3
5c92de0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5c92de0
a4e3bf9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3-2
a4e3bf9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a4e3bf9
c968379
* Wed Aug 14 2013 Michel Salim <salimma@fedoraproject.org> - 2.3.3-1
c968379
- Update to 2.3.3
c968379
09c74d6
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-2
09c74d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
09c74d6
f5c9751
* Fri Jul  5 2013 Michel Salim <salimma@fedoraproject.org> - 2.3-1
f5c9751
- Update to 2.3
f5c9751
ef44d9b
* Mon May  6 2013 Michel Salim <salimma@fedoraproject.org> - 2.2-1
ef44d9b
- Update to 2.2
ef44d9b
cdb020c
* Fri Apr  5 2013 Michel Salim <salimma@fedoraproject.org> - 2.1-1
cdb020c
- Update to 2.1
cdb020c
f3af301
* Wed Mar  6 2013 Michel Salim <salimma@fedoraproject.org> - 2.0-1
f3af301
- Update to 2.0
f3af301
17d2a6a
* Mon Feb 25 2013 Michel Salim <salimma@fedoraproject.org> - 1.16-1
17d2a6a
- Update to 1.16
17d2a6a
c87f673
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-2
c87f673
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c87f673
f91e681
* Mon Nov 19 2012 Michel Salim <salimma@fedoraproject.org> - 1.13-1
f91e681
- Update to 1.13
f91e681
6925f1b
* Wed Sep  5 2012 Michel Salim <salimma@fedoraproject.org> - 1.11-1
6925f1b
- Update to 1.11
6925f1b
e6759fe
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-2
e6759fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e6759fe
3ad50d8
* Fri Jun 29 2012 Michel Salim <salimma@fedoraproject.org> - 1.9-1
3ad50d8
- Update to 1.9
3ad50d8
- Remove redundant %%{python_sitelib} declaration
3ad50d8
828ba31
* Wed May 23 2012 Michel Salim <salimma@fedoraproject.org> - 1.8-1
828ba31
- Update to 1.8
828ba31
5a8d3c0
* Tue Apr 24 2012 Michel Salim <salimma@fedoraproject.org> - 1.7-1
5a8d3c0
- Update to 1.7
5a8d3c0
260588d
* Thu Jan 26 2012 Michel Salim <salimma@fedoraproject.org> - 1.5-2
260588d
- Prune dependencies
260588d
82974eb
* Thu Jan 26 2012 Michel Salim <salimma@fedoraproject.org> - 1.5-1
82974eb
- Update to 1.5
82974eb
4e7cd5b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
4e7cd5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4e7cd5b
19bfa20
* Mon Jul 25 2011 Michel Salim <salimma@fedoraproject.org> - 1.2-1
19bfa20
- Update to 1.2
19bfa20
Michel Alexandre Salim d9bd7dc
* Sat Jul  2 2011 Michel Salim <salimma@fedoraproject.org> - 1.1-2
Michel Alexandre Salim d9bd7dc
- Further launcher script clean-up
Michel Alexandre Salim d9bd7dc
Michel Alexandre Salim 73ec6b1
* Wed Jun 29 2011 Michel Salim <salimma@fedoraproject.org> - 1.1-1
Michel Alexandre Salim 73ec6b1
- Update to 1.1
Michel Alexandre Salim 73ec6b1
- Remove --versions option, obsoleted in favor of '0alias launcher'
Michel Alexandre Salim 73ec6b1
Michel Alexandre Salim 9527bba
* Wed Jun 22 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-3
Michel Alexandre Salim 9527bba
- Fix --versions handling of 0alias-generated launchers
Michel Alexandre Salim 9527bba
Michel Alexandre Salim a10208a
* Wed Jun 15 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-2
Michel Alexandre Salim a10208a
- Add main category "System" to desktop entries
Michel Alexandre Salim a10208a
Michel Alexandre Salim f77a7be
* Tue Jun 14 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-1
Michel Alexandre Salim f77a7be
- Update to 1.0
Michel Alexandre Salim f77a7be
Michel Alexandre Salim 6a15a9a
* Tue May  3 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-0.rc1.1
Michel Alexandre Salim 6a15a9a
- Update to 1.0rc1
Michel Alexandre Salim 6a15a9a
f6612b9
* Thu Mar 17 2011 Michel Salim <salimma@fedoraproject.org> - 0.53-1
f6612b9
- Update to 0.53
f6612b9
2f456c3
* Sun Mar 13 2011 Michel Salim <salimma@fedoraproject.org> - 0.52-1
2f456c3
- Update to 0.52
2f456c3
88f7e21
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.49-3
88f7e21
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
88f7e21
121fdbf
* Fri Jul  9 2010 Michel Salim <salimma@fedoraproject.org> - 0.49-2
121fdbf
- Enable tests
121fdbf
0e66abf
* Fri Jul  9 2010 Michel Salim <salimma@fedoraproject.org> - 0.49-1
0e66abf
- Update to 0.49
0e66abf
ca68768
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.38-3
ca68768
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ca68768
468210f
* Sat Feb 28 2009 Michel Salim <salimma@fedoraproject.org> - 0.38-2
468210f
- Workaround for RHEL's desktop-file-utils
468210f
- Add missing dependency on xdg-utils
468210f
016c06c
* Fri Feb 27 2009 Michel Salim <salimma@fedoraproject.org> - 0.38-1
016c06c
- Update to 0.38
016c06c
- Upgrades now preserve the existing menu, if modified
016c06c
ebc1a7e
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.34-3
ebc1a7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ebc1a7e
eda48f6
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.34-2
eda48f6
- Rebuild for Python 2.6
eda48f6
4aba738
* Sun Aug  3 2008 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.34-1
4aba738
- Update to 0.34
4aba738
71b237d
* Sat Apr  5 2008 Michel Salim <salimma@fedoraproject.org> - 0.32-1
71b237d
- Update to 0.32
71b237d
- Package .egg-info file on Fedora >= 9
71b237d
320914a
* Fri Jan 18 2008 Michel Salim <michel.sylvan@gmail.com> - 0.31-1
320914a
- Update to 0.31
320914a
94386e9
* Sat Sep  8 2007 Michel Salim <michel.sylvan@gmail.com> 0.30-2
94386e9
- Update scriptlet that creates zeroinst user
94386e9
fb9bcfb
* Wed Sep  5 2007 Michel Salim <michel.sylvan@gmail.com> 0.30-1
fb9bcfb
- Update to 0.30
fb9bcfb
- License is now versioned
fb9bcfb
- Incorporate changes from Thomas Leonard:
fb9bcfb
  * create zeroinst user
fb9bcfb
  * create shared cache
fb9bcfb
3fff20e
* Mon Dec 18 2006 Michel Salim <michel.salim@gmail.com> 0.24-3
3fff20e
- Rebuild for development branch
3fff20e
c5214a1
* Sat Nov 11 2006 Michel Salim <michel.salim@gmail.com> 0.24-2
c5214a1
- Allow installation of ix86 binaries on x86_64
c5214a1
0770170
* Sat Nov  4 2006 Michel Salim <michel.salim@gmail.com> 0.24-1
0770170
- Update to 0.24
0770170
- Not ghosting .pyos any longer
0770170
020f627
* Sun Oct  8 2006 Michel Salim <michel.salim@gmail.com> 0.23-1
020f627
- Update to 0.23
020f627
fb870de
* Sun Mar  5 2006 Michel Salim <michel.salim@gmail.com> 0.18-4
fb870de
- Removed left-behind pushd and popd
fb870de
fb870de
* Sat Feb 25 2006 Michel Salim <michel.salim@gmail.com> 0.18-3
fb870de
- Add Python-related requirements, BuildReq on gnupg to decrypt upstream source
cdb020c
fb870de
* Sat Feb 18 2006 Michel Salim <michel.salim@gmail.com> 0.18-2
fb870de
- Use _mandir, discard CFLAGS and unused python_sitearch definition
fb870de
fb870de
* Thu Feb 16 2006 Michel Salim <michel.salim@gmail.com> 0.18-1
fb870de
- Initial Fedora Extras release, based on upstream spec contributed by Juan Carlos Jimenez Garcia