-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrpm.spec
54 lines (44 loc) · 1.26 KB
/
rpm.spec
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
Name: zkdeployment
Version: 0
Release: 1
Summary: ZooKeeper Deployment
Group: Applications/ZIM
Requires: cleanpython27
Requires: sbo
BuildRequires: cleanpython27
%define python /opt/cleanpython27/bin/python
##########################################################################
# Lines below this point normally shouldn't change
%define source %{name}-%{version}
Vendor: Zope Corporation
Packager: Zope Corporation <[email protected]>
License: ZPL
AutoReqProv: no
Source: %{source}.tgz
Prefix: /opt
BuildRoot: /tmp/%{name}
%description
%{summary}
%prep
%setup -n %{source}
%build
rm -rf %{buildroot}
mkdir %{buildroot} %{buildroot}/opt
cp -r $RPM_BUILD_DIR/%{source} %{buildroot}/opt/%{name}
%{python} %{buildroot}/opt/%{name}/install.py bootstrap
%{python} %{buildroot}/opt/%{name}/install.py buildout:extensions=
%{python} -m compileall -q -f -d /opt/%{name}/eggs \
%{buildroot}/opt/%{name}/eggs \
> /dev/null 2>&1 || true
rm -rf %{buildroot}/opt/%{name}/release-distributions
# Gaaaa! buildout doesn't handle relative paths in egg links. :(
sed -i s-/tmp/%{name}-- \
%{buildroot}/opt/%{name}/develop-eggs/zc.%{name}.egg-link
%clean
rm -rf %{buildroot}
rm -rf $RPM_BUILD_DIR/%{source}
%pre
rm -rf /opt/%{name}/eggs/setuptools*
%files
%defattr(-, root, root)
/opt/%{name}