]> git.pld-linux.org Git - packages/mock.git/blob - mock.spec
updated to 1.1.38
[packages/mock.git] / mock.spec
1 # TODO
2 # - pldize (drop usermode/consoleapps), check deps
3 # - kill configure bashism
4 # - bash completion subpackage
5 Summary:        Builds packages inside chroots
6 Name:           mock
7 Version:        1.1.38
8 Release:        0.3
9 License:        GPL v2+
10 Group:          Development/Tools
11 Source0:        https://git.fedorahosted.org/cgit/mock.git/snapshot//%{name}-%{version}.tar.xz
12 # Source0-md5:  dc3d5c4ed6657d158a30d949f7baac88
13 URL:            https://fedoraproject.org/wiki/Projects/Mock
14 BuildRequires:  perl-base
15 BuildRequires:  python-devel
16 BuildRequires:  rpm-pythonprov
17 BuildRequires:  rpmbuild(macros) >= 1.219
18 BuildRequires:  xz
19 Requires(postun):       /usr/sbin/groupdel
20 Requires(pre):  /usr/bin/getgid
21 Requires(pre):  /usr/sbin/groupadd
22 Requires:       bash
23 Requires:       createrepo
24 Requires:       pigz
25 Requires:       python >= 1:2.6
26 Requires:       python-decoratortools
27 Requires:       tar
28 Requires:       usermode
29 Requires:       yum >= 2.4
30 Requires:       yum-utils >= 1.1.9
31 Provides:       group(mock)
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Mock creates chroots and builds packages in them. Its only task is to
37 reliably populate a chroot and attempt to build a package in that
38 chroot.
39
40 %prep
41 %setup -q
42
43 # keep for reference to build pld files
44 install -d sample-configs
45 mv etc/mock/{fedora,epel}-*.cfg sample-configs
46
47 %build
48 mkdir build
49 %{__aclocal}
50 %{__automake}
51 %{__autoconf} --force
52 bash %configure
53 %{__make}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 %{__make} install \
58         DESTDIR=$RPM_BUILD_ROOT
59
60 %py_postclean
61
62 install -d $RPM_BUILD_ROOT/var/lib/mock
63 install -d $RPM_BUILD_ROOT/var/cache/mock
64 ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/mock
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %pre
70 %groupadd -r -g 208 mock
71
72 %postun
73 if [ "$1" = "0" ]; then
74         %groupremove mock
75 fi
76
77 %files
78 %defattr(644,root,root,755)
79 %doc sample-configs
80 %attr(755,root,root) %{_bindir}/mock
81 %attr(755,root,root) %{_bindir}/mockchain
82 %attr(755,root,root) %{_sbindir}/mock
83 %{_mandir}/man1/mock*.1*
84
85 %dir %{_sysconfdir}/%{name}
86 %config(noreplace) %{_sysconfdir}/%{name}/*.cfg
87 %config(noreplace) %{_sysconfdir}/%{name}/*.ini
88 %config(noreplace) /etc/pam.d/%{name}
89 %config(noreplace) /etc/security/console.apps/%{name}
90 /etc/bash_completion.d/mock
91
92 %dir %{py_sitescriptdir}/mockbuild
93 %{py_sitescriptdir}/mockbuild/*.py[co]
94 %dir %{py_sitescriptdir}/mockbuild/plugins
95 %{py_sitescriptdir}/mockbuild/plugins/*.py[co]
96
97 # build dir
98 %attr(2775, root, mock) %dir /var/lib/mock
99
100 # cache dir
101 %attr(2775, root, mock) %dir /var/cache/mock
This page took 0.107072 seconds and 3 git commands to generate.