-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrpm.spec
49 lines (38 loc) · 844 Bytes
/
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
Name: zu
Version: 0.1
Release: 1
Summary: Become Zope
Group: Applications/Zope
Requires: zcuser-zope
##########################################################################
# 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 -c
%build
rm -rf %{buildroot}
mkdir %{buildroot} %{buildroot}/opt
cp -r $RPM_BUILD_DIR/%source %{buildroot}/opt/%{name}
cd %{buildroot}/opt/%{name}
gcc -o zu zu.c
%clean
rm -rf %{buildroot}
rm -rf $RPM_BUILD_DIR/%{source}
%posttrans
cp /opt/zu/zu /usr/bin
chown zope:zope /usr/bin/zu
chmod u+s /usr/bin/zu
%preun
rm /usr/bin/zu
%files
%defattr(-, root, root)
/opt/%{name}