summaryrefslogtreecommitdiffstats
path: root/ocaml/0install.spec
blob: 5d94ba7680be1500d08f7b58c97b8c9ee2272e99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%global cache_dir /var/cache/0install.net

Name:           0install
Version:        2.5.1
Release:        1%{?dist}
Summary:        A decentralized cross-distribution software installation system

License:        LGPLv2
URL:            http://0install.net
Source0:        http://downloads.sf.net/project/zero-install/%{name}/%{version}/%{name}-%{version}.tar.bz2
Patch0:         %{name}-2.5.1-destdir.patch

#BuildArch:      
BuildRequires:  python-devel
BuildRequires:  ocaml >= 3.10.0
BuildRequires:  ocaml-findlib-devel
BuildRequires:  ocaml-camlp4-devel
BuildRequires:  ocaml-curl-devel
BuildRequires:  ocaml-extlib-devel
BuildRequires:  ocaml-lwt-devel
BuildRequires:  ocaml-ounit-devel
BuildRequires:  ocaml-ssl-devel
BuildRequires:  ocaml-xmlm-devel
BuildRequires:  ocaml-yojson-devel
BuildRequires:  libev-devel
BuildRequires:  gettext
BuildRequires:  desktop-file-utils

Requires(pre):  shadow-utils

# for icons
Requires:       hicolor-icon-theme

Provides:       zeroinstall-injector = %{version}-%{release}
Obsoletes:      zeroinstall-injector < %{version}-%{release}

%description
Zero Install is a decentralised cross-distribution software
installation system available under the LGPL. It allows software
developers to publish programs directly from their own web-sites,
while supporting features familiar from centralised distribution
repositories such as shared libraries, automatic updates and digital
signatures. It is intended to complement, rather than replace, the
operating system's package management. 0install packages never
interfere with those provided by the distribution.

0install does not define a new packaging format; unmodified tarballs
or zip archives can be used. Instead, it defines an XML metadata
format to describe these packages and the dependencies between them. A
single metadata file can be used on multiple platforms (e.g. Ubuntu,
Debian, Fedora, openSUSE, Mac OS X and Windows), assuming binary or
source archives are available that work on those systems.

0install also has some interesting features not often found in
traditional package managers. For example, while it will share
libraries whenever possible, it can always install multiple versions
of a package in parallel when there are conflicting
requirements. Installation is always side-effect-free (each package is
unpacked to its own directory and will not touch shared directories
such as /usr/bin), making it ideal for use with sandboxing
technologies and virtualisation.

The XML file describing the program's requirements can also be
included in a source-code repository, allowing full dependency
handling for unreleased developer versions. For example, a user can
clone a Git repository and build and test the program, automatically
downloading newer versions of libraries where necessary, without
interfering with the versions of those libraries installed by their
distribution, which continue to be used for other software.


%prep
%setup -q
%patch0 -p1 -b .destdir


%build
make


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

desktop-file-validate \
    $RPM_BUILD_ROOT%{_datadir}/applications/0install.desktop

%find_lang zero-install


%pre
# Add the "zeroinst" user.
# This is not used by default, but is required if you want to
# set up sharing of downloads later.
getent group  zeroinst >/dev/null || groupadd -r zeroinst
getent passwd zeroinst >/dev/null || \
useradd -r -g zeroinst -d %{cache_dir} -s /sbin/nologin \
    -c "Zero Install shared cache" zeroinst
exit 0

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files -f zero-install.lang
%doc COPYING README.md
%{_bindir}/0*
%{python_sitelib}/*
%{_datadir}/applications/0install.desktop
%{_datadir}/icons/hicolor/*/apps/zeroinstall.*
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/0*
%dir %{_datadir}/fish
%dir %{_datadir}/fish/completions
%{_datadir}/fish/completions/0*.fish
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_0*
%{_mandir}/man1/0*
%dir %{cache_dir}
%attr(755,zeroinst,zeroinst) %{cache_dir}/implementations


%changelog
* Mon Jan 20 2014 Michel Salim <salimma@fedoraproject.org> - 2.5.1-1
- Rename package to 0install
- Update to 2.5.1

* Wed Aug 14 2013 Michel Salim <salimma@fedoraproject.org> - 2.3.3-1
- Update to 2.3.3

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Jul  5 2013 Michel Salim <salimma@fedoraproject.org> - 2.3-1
- Update to 2.3

* Mon May  6 2013 Michel Salim <salimma@fedoraproject.org> - 2.2-1
- Update to 2.2

* Fri Apr  5 2013 Michel Salim <salimma@fedoraproject.org> - 2.1-1
- Update to 2.1

* Wed Mar  6 2013 Michel Salim <salimma@fedoraproject.org> - 2.0-1
- Update to 2.0

* Mon Feb 25 2013 Michel Salim <salimma@fedoraproject.org> - 1.16-1
- Update to 1.16

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Nov 19 2012 Michel Salim <salimma@fedoraproject.org> - 1.13-1
- Update to 1.13

* Wed Sep  5 2012 Michel Salim <salimma@fedoraproject.org> - 1.11-1
- Update to 1.11

* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jun 29 2012 Michel Salim <salimma@fedoraproject.org> - 1.9-1
- Update to 1.9
- Remove redundant %%{python_sitelib} declaration

* Wed May 23 2012 Michel Salim <salimma@fedoraproject.org> - 1.8-1
- Update to 1.8

* Tue Apr 24 2012 Michel Salim <salimma@fedoraproject.org> - 1.7-1
- Update to 1.7

* Thu Jan 26 2012 Michel Salim <salimma@fedoraproject.org> - 1.5-2
- Prune dependencies

* Thu Jan 26 2012 Michel Salim <salimma@fedoraproject.org> - 1.5-1
- Update to 1.5

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Jul 25 2011 Michel Salim <salimma@fedoraproject.org> - 1.2-1
- Update to 1.2

* Sat Jul  2 2011 Michel Salim <salimma@fedoraproject.org> - 1.1-2
- Further launcher script clean-up

* Wed Jun 29 2011 Michel Salim <salimma@fedoraproject.org> - 1.1-1
- Update to 1.1
- Remove --versions option, obsoleted in favor of '0alias launcher'

* Wed Jun 22 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-3
- Fix --versions handling of 0alias-generated launchers

* Wed Jun 15 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-2
- Add main category "System" to desktop entries

* Tue Jun 14 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-1
- Update to 1.0

* Tue May  3 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-0.rc1.1
- Update to 1.0rc1

* Thu Mar 17 2011 Michel Salim <salimma@fedoraproject.org> - 0.53-1
- Update to 0.53

* Sun Mar 13 2011 Michel Salim <salimma@fedoraproject.org> - 0.52-1
- Update to 0.52

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.49-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri Jul  9 2010 Michel Salim <salimma@fedoraproject.org> - 0.49-2
- Enable tests

* Fri Jul  9 2010 Michel Salim <salimma@fedoraproject.org> - 0.49-1
- Update to 0.49

* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.38-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sat Feb 28 2009 Michel Salim <salimma@fedoraproject.org> - 0.38-2
- Workaround for RHEL's desktop-file-utils
- Add missing dependency on xdg-utils

* Fri Feb 27 2009 Michel Salim <salimma@fedoraproject.org> - 0.38-1
- Update to 0.38
- Upgrades now preserve the existing menu, if modified

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.34-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.34-2
- Rebuild for Python 2.6

* Sun Aug  3 2008 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.34-1
- Update to 0.34

* Sat Apr  5 2008 Michel Salim <salimma@fedoraproject.org> - 0.32-1
- Update to 0.32
- Package .egg-info file on Fedora >= 9

* Fri Jan 18 2008 Michel Salim <michel.sylvan@gmail.com> - 0.31-1
- Update to 0.31

* Sat Sep  8 2007 Michel Salim <michel.sylvan@gmail.com> 0.30-2
- Update scriptlet that creates zeroinst user

* Wed Sep  5 2007 Michel Salim <michel.sylvan@gmail.com> 0.30-1
- Update to 0.30
- License is now versioned
- Incorporate changes from Thomas Leonard:
  * create zeroinst user
  * create shared cache

* Mon Dec 18 2006 Michel Salim <michel.salim@gmail.com> 0.24-3
- Rebuild for development branch

* Sat Nov 11 2006 Michel Salim <michel.salim@gmail.com> 0.24-2
- Allow installation of ix86 binaries on x86_64

* Sat Nov  4 2006 Michel Salim <michel.salim@gmail.com> 0.24-1
- Update to 0.24
- Not ghosting .pyos any longer

* Sun Oct  8 2006 Michel Salim <michel.salim@gmail.com> 0.23-1
- Update to 0.23

* Sun Mar  5 2006 Michel Salim <michel.salim@gmail.com> 0.18-4
- Removed left-behind pushd and popd

* Sat Feb 25 2006 Michel Salim <michel.salim@gmail.com> 0.18-3
- Add Python-related requirements, BuildReq on gnupg to decrypt upstream source

* Sat Feb 18 2006 Michel Salim <michel.salim@gmail.com> 0.18-2
- Use _mandir, discard CFLAGS and unused python_sitearch definition

* Thu Feb 16 2006 Michel Salim <michel.salim@gmail.com> 0.18-1
- Initial Fedora Extras release, based on upstream spec contributed by Juan Carlos Jimenez Garcia